VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: sandomatyas on July 08, 2024, 15:28:43 PM

Title: Modify product price with plgVmPrepareCartProduct and product_override_price
Post by: sandomatyas on July 08, 2024, 15:28:43 PM
Hi

I wrote a small VM custom plugin that uses some parameters and plgVmPrepareCartProduct to modify the product's cart price. It's quite similar to text_input and works almost the same.

My problem is with the product price overrides. When I use product_override_price, plgVmPrepareCartProduct modifies $modificatorSum but product_override_price overrides it.

Is it possible to add my custom extra price using plgVmPrepareCartProduct even when the product price is overridden?

Thank you.
Title: Re: Modify product price with plgVmPrepareCartProduct and product_override_price
Post by: Jörgen on July 11, 2024, 11:45:02 AM
The product price override is AFAIK an override, that's it. It is a legacy function from VM 1.xx and can not be mixed with the never flexible price system. Not much of any help. Maybe someone else has any ideas.

Jörgen @ Kreativ Fotografi