Author Topic: Bug: When using items that sell as items in box there are errors at checkout  (Read 1091 times)

escozul

  • Beginner
  • *
  • Posts: 26
  • Skype Name: 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!

escozul

  • Beginner
  • *
  • Posts: 26
  • Skype Name: escozul
Is there an info on that yet?

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9180
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
I just noticed it, interesting bug :-) I will fix it soon.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

escozul

  • Beginner
  • *
  • Posts: 26
  • Skype Name: 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. :)

escozul

  • Beginner
  • *
  • Posts: 26
  • Skype Name: escozul
Any news on that one? Has it been fixed?