News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Bug: When using items that sell as items in box there are errors at checkout

Started by escozul, September 23, 2016, 14:25:31 PM

Previous topic - Next topic

escozul

I think I've come across a bug here!

Ok so I have on my site products that are displayed as single items but are sold only as big packs of 500 or so in a box. For example little soaps. Like this product here:
http://ta-panda.gr/products/hotels/room/σαπούνι-30gr-sea-and-sky-detail

So on the product page there are no issues. If someone tries to change the quantity field to a number not incremented by 500 the system automatically changes it down to the closest multiple of 500. So you get increments of 500: 500, 1000, 1500 etc.

When you go to cart though, you can change the quantity there as well. So you might change the quantity from 500 to 700. When you hit update, a waring pops up that you are not allowed to purchase to quantities different from increments of 500. That is correct but the quantity is not fixed properly. Instead of removing 200 out of 700 and thus having 500 again it ADDS the difference and the fixed number is now... 900!

Try 800 and hit refresh you are taken to 1100!
1400 is turned into 1800 and so on! Instead of subtraction the code uses addition! Does anyone know where that correction is made so we can fix it?

You can test it on my site here: http://ta-panda.gr/products/hotels/room/σαπούνι-30gr-sea-and-sky-detail using this product to add it to your cart and try to change the quantities just before the checkout!


Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

escozul

Oh thanks! I appreciate it. Since you know how to fix it, you might know where this whole adition-subtraction takes place and if possible you could point the right files? I can make a temporary fix and provide a suggestion for a permanent solution.

That might save you some time. :)