I'm looking for a module so that a client can be able to buy the item, if the stock's level is 0 Is this feature available in OpenCart 1.5.x?
I have set the product for 2-3 days, although on site front it shows the product as out of stock. Is the delay of 2-3 days away to alert the client, and yet the customer is allowed to buy?
Firstly, you need to change the function that will exit the stock item from going to checkout Stops. Go to list / controller / checkout / checkout.fpp and
public function index () {// Valid carats are products and stock. If (($! $ - this-> Cart- & gt; Product () & amp; amp; amp; amp; amp; amp; amp; $ & gt; Session- & Gt; data ['voucher'])) || ($ $ - & gt; Histoc () & amp;! $ GetThis- & gt; Config- & gt; ('config_stock_checkout'))) {$ this- & gt; Redirect ($ this-> url- & gt; link ('Checkout / Cart')); } to
Public function index () {// Valid carriage is the product and the stock is. If (! $ $-> Cart-> Products () & amp; amp; amp; & amp; amp; amp; amp; amp; amp; amp; amp; $ (* this- &&; Session- & gt; Data ['Voucher']) This- & gt; Redirect ($ this->; url- & gt; link ('checkout / cart')); } I do not remember if this prevents you from adding to the car at first place then tell me. Good luck!
Update To change "out of stock" on the product page , I have changed it manually Settings in the store So that if he is not working for you then you can go to catalog / controller / product / product.fp and where you can see if ($ product_info ['quantity '] & Lt; = 0) {$ this-> Data ['stock'] = $ product_info ['stock_stats']; } Otherwise get ($-> this-> config- & gt; ('config_stock_display')) {$ this-> Data ['stock'] = $ product_info ['quantity']; } And {$ this-> data ['stock'] = $ this- & gt; Language-> Obtain ('text_instock'); } :
if ($ product_info ['quantity'] Data ['stock'] = "2-3 days"; } Otherwise get ($-> this-> config- & gt; ('config_stock_display')) {$ this-> Data ['stock'] = $ product_info ['quantity']; } And {$ this-> data ['stock'] = $ this- & gt; Language-> Obtain ('text_instock'); } Change any text within that bracket that works for you.
Comments
Post a Comment