VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product pricing => Topic started by: rickkh on December 16, 2014, 03:49:06 AM

Title: VM3- What function checks and updates quanity when updating directly in cart
Post by: rickkh on December 16, 2014, 03:49:06 AM
Hi,

I am trying to find the function (JS/PHP) that updates the quantity in the cart in VM3 when:
1- enter 2.5, price changes to 25
2- enter 2a, price changes to 2

I am just trying to understand the internals of VM3 a bit and I'm trying to find this function...

Thanks!
Title: Re: VM3- What function checks and updates quanity when updating directly in cart
Post by: rickkh on December 17, 2014, 03:12:22 AM
Nobody knows? I am trying to figure this out because I must make VM3 work with decimal (0.5, 1.5, etc.) quantities. I figured out half the solution, now I can add 0.5 from the products list. However when I try changing to 2.5 (for example) from the cart and I press enter or update, the value changes to 25. When I try 2a, value changes to 2. 1a1, value changes to 11. This leads me to believe that there's a preg_replace or some JS replace somewhere but I can't find it!!! Any help would be very appreciate it.

Once I have a full solution working for the decimal I will post it.