Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Inventory doesn't adjust


Shooter

Recommended Posts

My client spent pretty much all day entering the inventory for her store. This morning, after receiving 2 new orders, she noticed that the Quantity on hand was unchanged. We tried marking the order "Shipped," but that didn't adjust the Quantity either. I do have "True" marked for Subtract Stock under Configuration/Stock. How does this work???

 

Thanx,

Wm

Link to comment
Share on other sites

Hi, I got the same problem as you do!

However I can't figure out what's causing it since months :(

I've made few threads about this issue here on forum, but no one made a response that would help yet...

 

Maybe we should try to help by our own.

What contributions do You use to maintain stock ? Easy populate ?

 

Do You use paypal IPN shopping cart ( I do and I belive that it's causing this problem )

 

Regards

x4ntos

Link to comment
Share on other sites

What contributions do You use to maintain stock ? Easy populate ?

 

Do You use paypal IPN shopping cart ( I do and I belive that it's causing this problem )

 

I have no contributions from osC yet. The only module I have installed is an Authorize.net module from MerchantPlus, since I couldn't get the built-in one to work. I haven't tried to install any of the Inventory modules yet.

 

Wm

Link to comment
Share on other sites

I have no contributions from osC yet. The only module I have installed is an Authorize.net module from MerchantPlus, since I couldn't get the built-in one to work. I haven't tried to install any of the Inventory modules yet.

 

Wm

 

 

please copy in all settings you have in admin -> store > stock

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

Title                                        Value          Action

Check stock level                  true 

Subtract stock                            true              Info

Allow Checkout                          true            Info

Mark product out of stock  Backordered      Info

Stock Re-order level                  3            Info

 

this looks ok. Have a link ready to the payment module used? I'd need to see if it does it's own checkout process or use the original Have you still got a vanilla checkout_process.php?

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

this looks ok. Have a link ready to the payment module used? I'd need to see if it does it's own checkout process or use the original  Have you still got a vanilla checkout_process.php?

 

No, that file is a new version from NaviGate. It's an Authorize.net module. I have pasted a text version here. (Not pasting the entire file here, to conserve the forum space.)

 

Wm

Link to comment
Share on other sites

No, that file is a new version from NaviGate. It's an Authorize.net module. I have pasted a text version here. (Not pasting the entire file here, to conserve the forum space.)

 

Wm

 

well the code has the stock update:

tep_db_query("update " . TABLE_PRODUCTS . " set products_quantity = '" . $stock_left . "' where

 

If it still doesn't deduct stock, I'd do a logging of the checkout_process variables for stock in a logfile. You know how to do that?

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

well the code has the stock update:

tep_db_query("update " . TABLE_PRODUCTS . " set products_quantity = '" . $stock_left . "' where

 

If it still doesn't deduct stock, I'd do a logging of the checkout_process variables for stock in a logfile. You know how to do that?

 

I have NO Idea how to do that...

 

Wm

Link to comment
Share on other sites

I have NO Idea how to do that...

 

Wm

 

create a new file logfile.txt in catalog, and make it chmod 777

 

add to your checkout file at several points where variables are filled this code right below the row where the variable has been defined

 

$time=date("d M Y H:i:s");
$logfile=fopen(DIR_FS_CATALOG . 'logfile.txt',"a");
fputs($logfile,$time . " - replace\n");
fclose($logfile);

 

see the word replace? you have to replace it by the variable you want to log.

Here an example:

      if ((DOWNLOAD_ENABLED != 'true') || (!$stock_values['products_attributes_filename'])) {
       $stock_left = $stock_values['products_quantity'] - $order->products[$i]
['qty'];
$time=date("d M Y H:i:s");
$logfile=fopen(DIR_FS_CATALOG . 'logfile.txt',"a");
fputs($logfile,$time . " - quantity before: " .$stock_values['products_quantity'] .  "\n");
fputs($logfile,$time . " - quantity after: " .$order->products[$i]
['qty'].  "\n");
fputs($logfile,$time . " - stock left: " .$stock_left  .  "\n");
fclose($logfile);
     } else {
       $stock_left = $stock_values['products_quantity'];
     }

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

  • 4 weeks later...

Initially, my stock levels were working properly. Now, it does not work - I had PayPal IPN installed and that seemed to have caused problems so I removed it - my stock problem is still present.

 

My settings are:

Check stock level true

Subtract stock true

Allow Checkout true

Mark product out of stock ***

Stock Re-order level 5

 

What happened (if anything) to solve the problem?

Link to comment
Share on other sites

Initially, my stock levels were working properly. Now, it does not work - I had PayPal IPN installed and that seemed to have caused problems so I removed it - my stock problem is still present.

 

My settings are:

Check stock level true

Subtract stock true

Allow Checkout true

Mark product out of stock ***

Stock Re-order level 5

 

What happened (if anything) to solve the problem?

 

what's not working? Quantity not substracted or status not set or both.

 

Use the logging code tweaked to your needs to find the issue, your parameters are fine.

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

what's not working? Quantity not substracted or status not set or both.

 

Use the logging code tweaked to your needs to find the issue, your parameters are fine.

 

The quantity was not being subtracted. I spend over 5 hours researching this issue... and finally found the problem, well at least for me:

 

I had the "enable download" set to true. I remember making the change from false and now can see that my inventory problems began at the same time. As soon as I set it to "false", quantity subtraction working again.

 

Thank you so very much for taking the time to respond. I truly appreciate it!! I hope this may help others with the same problem. Have a very nice day :thumbsup:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...