Author Topic: Booked, ordered products field get value 4294967295  (Read 1871 times)

Venkko

  • Jr. Member
  • **
  • Posts: 65
    • PikkuKoala
Booked, ordered products field get value 4294967295
« on: December 28, 2011, 10:39:21 am »
Hi!

Is this a bug or does this 4294967295 mean something?

I am using J 1.5.23 and VM2.0.0 stable.

If I have order where is 1 pcs product xxx123 and on product xxx123 there is stock level quantity 6 and “booked, ordered product” field with value 0.
After changing order status to shipped I get stock quantity 5 (which is correct , 6-1=5) but “booked, ordered product” have value 4294967295.

I know that this situation should not come up in normal situation but on some cases this could be possible and in my case it is problem if I want to get my stock controller to work as I would like to.



[attachment cleanup by admin]
www.pikkukoala.fi (J 1.5 & VM 1.1.5)
www.lastentavarat.fi (J 1.5.23 & V2.0.0)

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9997
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Booked, ordered products field get value 4294967295
« Reply #1 on: December 28, 2011, 22:28:25 pm »
haha interesting, thanks :-)

Is almost fixed, nice bug. Afaik we use unsigned int, so when you do 0-1 you get the highest number.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Venkko

  • Jr. Member
  • **
  • Posts: 65
    • PikkuKoala
Re: Booked, ordered products field get value 4294967295
« Reply #2 on: December 28, 2011, 23:17:31 pm »
So will this be fixed when VM 2.0.1 will be released?
www.pikkukoala.fi (J 1.5 & VM 1.1.5)
www.lastentavarat.fi (J 1.5.23 & V2.0.0)

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9997
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Booked, ordered products field get value 4294967295
« Reply #3 on: December 29, 2011, 16:33:40 pm »
oh I just removed the unsigned from the table.... the updater will adjust this. Just change the product_in_stock and product_ordered in __virtuemart_products, remove the unsigned and it should just count -1, which is correct.

When you start from 0, when you see later -5 in your stock, you knwo that you have to order 5.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/