VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: travelbaba on September 05, 2013, 12:39:57 PM

Title: product in stock error
Post by: travelbaba on September 05, 2013, 12:39:57 PM
Hello,

I have an interesting problem:

I use CSVI to update with a cronjob the products in stock, every hour. The table comes from the software of the shop.

When the availability is > 0 everything run smooth, the availability is real.

But when the availability is <0 the problem arises. THis could happen in the shop because in the software the availability of a product  is 0, but the product is alredy in new orders, so it reserve the products for the order and in reality the availability is minus.

Basically the error in virtuemart is that when the availability is minus, it sums the minus that is present in viertuemart from the past update with the minus of the new update, so basically in 24 hours I get a sum of 24 minus updates.

Anybody has an idea?

For me is totally ok to set something like: if product_in_stock is <0 than set product_in_stock=0.

Thanks!!!

Matteo
Title: Re: product in stock error
Post by: jenkinhill on September 05, 2013, 13:23:31 PM
Is this with the current version, VM2.0.22c ?
Title: Re: product in stock error
Post by: travelbaba on September 05, 2013, 13:31:56 PM
Hello, thanks for reply.

No, is version 2.0.20b.

Do you think will be correct in the new version?

Matteo
Title: Re: product in stock error
Post by: jenkinhill on September 05, 2013, 13:40:42 PM
There are a lot of bug fixes, and 2.0.22 is a strongly recommended security update: http://virtuemart.net/news/list-all-news/446-important-security-release-vm-team-at-joomladay-germany

Try on a backup of the site first.
Title: Re: product in stock error
Post by: travelbaba on September 05, 2013, 15:14:01 PM
Hello,
i will update the production ready site ASAP.

I've tryed in a back up system and still does the same error:

CSVI:

if availability in the table >0 takes the value from the table

if availability in the table < 0 virtuemart makes products_in_stock - value in table!!!

help!!!

Matteo

Title: Re: product in stock error
Post by: travelbaba on September 05, 2013, 16:17:30 PM
It could be helpful for me just to set to 0 when availability is minus!!!!

THanks

Matteo
Title: Re: product in stock error
Post by: travelbaba on September 11, 2013, 13:12:42 PM
Looks like there is no solution to this problem?

THanks anyway
Title: Re: product in stock error
Post by: Maxim Pishnyak on September 12, 2013, 10:19:43 AM
What it's so difficult to get rid of negatives BEFORE import?