Basic configuration of osCommerce, continued - Stock
(Page 4 of 4 )
Deciding how you want osCommerce to deal with your stock is a very tricky business, and you will be forced to do a bit of soul searching before defining the settings in this section. Ensuring that you have a coherent game plan when it comes to dealing with stock levels and how your application deals with these stock levels is paramount to the perceived and actual integrity and reliability of your system. If you are selling products that are not in stock, and are unable for some reason to fulfill your orders... Well, I don't need to continue on with the type of things word of mouth will spread about your store.
With that in mind, let's take a quick look at what the demo site's settings are:

What do these settings mean in terms of how osCommerce will behave when a customer is purchasing an item? Ok, the Check stock level setting simply means that osCommerce will retrieve the number of items in stock before the customer checks out. The Subtract stock setting means that once an item is purchased, the database is updated by subtracting the number of items purchased from the number of items in stock. Obviously you should be able to see that this effectively automates your stock control on the purchasing side of things.
The tricky bit is the Allow Checkout setting. Since we have set Check stock level to true, osCommerce is aware of how much stock is available when a customer attempts to make a purchase. Setting Allow Checkout to true is taking a bit of a risk because it is saying that I, as the retailer, am confident that I can ship the purchased product on time despite the fact it is not in stock at the moment. Since the demo site relies on Packt's ability to ship product, we have gone with true in this instance because Packt's business model is such that they can deliver books very quickly.
You really need to determine whether you can do the same for all of your products before setting this to true. Some people may view this as a trade-off. In other words, do you make a loss from not selling the product, or do you risk having to refund the customer if you can't get stock in quickly enough. From a business perspective, this is not particularly sound reasoning since your value as a business stems partly from your reputation of reliability. This is not worth trading on, so rather take the hit from a direct loss of sales instead of proving to be unreliable and endeavor to improve your stock control.
The final two settings are pretty easy to understand, and are not life threatening in any way. You can choose these to best suit you with little effort. The following screenshot shows how these settings influence the behavior of osCommerce when ordering products that have low stock. Take note of the Temporarily out of Stock message, and the notes below the product which informs the customer of their choice to continue with checkout because of our Allow Checkout setting:

Of course, if we had set the Allow Checkout setting to false, then the second line of the checkout message would have read:
Please alter the quantity of products marked with (Temporarily out of Stock), Thank you
Finally, we will see later on in the book in Chapter 10 on Tools, Tips, and Tricks how to use the Stock Re-order level setting along with a community contribution to let us know when it is time to re-order an item. For now, though, we say goodbye to stocks until the next chapter, when we begin dealing with data.
Please check back next week for the conclusion of this article.
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |
|
This article is excerpted from Building Online Stores with osCommerce: Professional Edition, written by David Mercer (PACKT, 2005; ISBN: 1904811140). Check it out at your favorite bookstore today. Buy this book now.
|
|