Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Hi,

 

I use stock quantity to control my stock status. I set my stock quantity to -100 for items that only have ONE unit. So when customer ordered, it automatically becomes -101 stock quantity.

 

I want to DISALLOW checkout if the stock is -101.

 

May I know how can I do that? Where to edit? Is it Checkout Process? Shopping Cart?

 

Please help.

Best regards,

Koh Kho King

Posted

Doesn't the stock go down when ordered? Have you tried setting the quantity to 1 and then change the stock settings so checkout is not allow if the quantity is 0? That's the normal way of doing it, unless I'm not understanding the question.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

  • 3 weeks later...
Posted

Doesn't the stock go down when ordered? Have you tried setting the quantity to 1 and then change the stock settings so checkout is not allow if the quantity is 0? That's the normal way of doing it, unless I'm not understanding the question.

 

Hi Jack,

 

Thanks very much for replying.

 

I do understand that OSC has the feature to disallow checkout when the quantity becomes 0, but I do not want to disallow checkout for that.

 

I only want to have a clause where when quantity becomes -101, checkout is disallowed. I only want to disallow checkout when the quantity is -101. The reason I want so is that for product that I only have ONE unit stock, I can set the stock quantity to -100, and when someone ordered, it becomes -101 and others will not be able to order again.

Best regards,

Koh Kho King

Posted

@@khoking

 

That makes NO sense. If you have ONE item, set the quantity to ONE.. Once it is sold, that's it !

 

Chris

Posted

Sounds looney to me as well but try this in checkout_process.php

 

Change

 

// Out of Stock

if ( (STOCK_ALLOW_CHECKOUT != 'true') && ($any_out_of_stock == true) ) {

 

to

// Out of Stock

if ( (STOCK_ALLOW_CHECKOUT != 'true') && ($any_out_of_stock == true)|| tep_get_products_stock($products_id) == -101 ) {

 

HTH

 

G

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...