Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Stock subtraction from database - help needed


13Moons

Recommended Posts

Posted

I am not yet using oscommerce, still exploring the conversion. I accept credit cards for offline processing, PayPal and mail payments. From my understanding product stock is subtracted from the database during the customers checkout process. I do understand the order can be cancelled by me later and the stock is returned. Due to credit card denials, incomplete Paypal and mail payments that never show I need to handle the stock removal differently. I want the stock to be removed from the database when I approve the transaction, not when the customer completes the transaction.

First am I correct in the way the current release handles stock removal? If so, is there any mods out there that can do it the way I need? If not can anyone point out to me where in the code the stock removal occurs?

Since a degree of stock control is one of the important reasons for me to convert my site to a database, I think this is an essential part of oscommerce for me to understand.

Thanks for the time

Jeff Brown

Posted

Hi there,

 

Yes you are right stock can be removed from the stock quantity on checkout confirmation and restocked if the order is cancelled.

 

But you can also turn this off so the when an order is placed the stock is not removed.

 

As for removing it when an order status is changed by yourself this might have to be done manually but heres a contribution that might save you a little time!

 

Quickly Update Product Stock http://www.oscommerce.com/community/contributions,558

 

Hope this helps, maybe someone knows of a mod to do it automatically using an if statement and order_status field, ie if the order status is changed to 'processing' the stock is deducted?

Reddy to Rumble

 

Thank you osCommerce and all who Contribute to her!

Posted

Thanks for clarifying the point stock is removed.

I have checked out the Quick Update Stock contribution and it looks very helpful for restocking and other changes. However not for daily orders.

I guess I'm a bit surprised the choice of when to remove stock isn't already part of oscommerce. Only 25-35% of mail payments arrive but I sure wouldn't not have them, as those that do show are at least 20% of our sales! And cash in the mail 5%. Maybe most store owners just don't accept payments this way.

Hopefully somebody can point out where to start and I can "attempt" the mod. I can already get a php page to say "Hello World" :wink:

Jeff

Archived

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

×
×
  • Create New...