dá uma olhada aqui:
http://www.matlockmediagroup.com/how-to ... -opencart/
How to handle Pre Orders in OpenCart
Posted on Jan 20, 2013 in OpenCart Tutorial, Tutorials
How to handle Pre Orders in OpenCart
OpenCart does a great job of handeling many aspects of eCommerce. However, PreOrders can be a bit confusing.
The problem surfaces when you want to allow PreOrders but prevent the purchase of Out of Stock items.
An Out of Stock item is one which is not in the inventory, by this definition a item for Pre-Order is also classified as Out Of Stock.
This guide will show how to handle these special cases.
1. Allow purchase of Out Of Stock items.
This may sound counter productive but stick with me. Customers won’t be allowed to purchase Pre-Order Items without it, remember that a product is only given the status Pre-Order when its product quantity is zero.
Go to System->Settings->[edit] (Default Store)->Options (Tab) and scroll down to “Stock” and set the following Options:
Show Out Of Stock Warning: No
Stock Checkout: Yes
Out Of Stock Status: “Out of Stock” <- Default when adding new products.
OpenCart Tutorial - Allow out of stock purchases
2. Set Product as PreOrder.
First Got to Catalog->Products->[edit] (Chosen Product)->Data (Tab) Set the following Settings:
Quantity: 0
Minimum Quantity: (your discretion)
Subtract Stock: No
Out Of Stock Status: “Pre-Order”
Screen Shot 2013-01-20 at 5.06.03 PM
3. Set Product Quantities.
This is the most important part. This is where everything comes together.
Go to Catalog->Products->[edit] (Chosen Product)->Options (Tab)
Even If the product only has one variation, it still needs to have an option set here. Also, make sure that Required is set to “yes”
If you need help setting default option values please Click Here
OpenCart Tutorial - Options
Conclusion:
Lets break down whats happening here, in the Data Tab the Out Of Stock Status only shows “Pre-Order” when the Stock Quantity reaches Zero.
and looks like this:
OpenCart Tutorial - Pre Order Status example
The reason we set Subtract Stock to “No” (Data Tab) is so that when we want to change the status to “In Stock,” all we need to do is set the Quantity to “1″. Think of this Quantity setting only as a trigger for the Stock Status.
Next, when we set the Stock Quantities (Options Tab), this is the real stock quantity for the item. Once the quantity for each option reaches Zero the option is no longer available and the user is not allowed to add it to the cart. This solves the problem of the user purchasing a product which is no longer available.
Known Issues:
I see only one scenario which is not covered. OpenCart doesn’t allow you to enable Pre-Sales on a product but prevent sales on product options by option quantity. This means even though a product option may only have 5 items available, the user can still checkout with 100 in their cart. This will not do…..
Update: With a little modification of OpenCart source code, we now have a nice little rejection if someone tries to add a quantity which is too large for the chosen Option.
OpenCart PreOrder stock quantities
Update: Still, if someone wanted to be scandalous, they could put 1 in the Qty field and repeatedly click “ADD TO CART”, and because OpenCart doesn’t remove the quantity until after checkout we need to do some handeling in the cart itself via another mod.