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

product in stock error

Started by travelbaba, September 05, 2013, 12:39:57 PM

Previous topic - Next topic

travelbaba

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

jenkinhill

Is this with the current version, VM2.0.22c ?
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

travelbaba

Hello, thanks for reply.

No, is version 2.0.20b.

Do you think will be correct in the new version?

Matteo

jenkinhill

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.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

travelbaba

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


travelbaba

It could be helpful for me just to set to 0 when availability is minus!!!!

THanks

Matteo

travelbaba

Looks like there is no solution to this problem?

THanks anyway

Maxim Pishnyak

What it's so difficult to get rid of negatives BEFORE import?
You can support Community by voting for Project on the JED
https://extensions.joomla.org/extension/virtuemart/#reviews
Join us at
https://twitter.com/virtuemart