ruboo Posted January 15, 2007 Share Posted January 15, 2007 I had a problem with order, when customer added some product to his shopping cart, then comes back later, checks out, and if you meanwhile disabled the product from your catalog (set inactive), the customer was still able to purchase it, and later I had problems asking him to choose replacment, or arrange refund, a lot of headache so you can change in includes/classes/shopping_cart.php // products price $product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); to // products price $product_query = tep_db_query("select products_id, products_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "' and products_status = '1'"); and ------------------------------ $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); to $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$products_id . "' and pd.products_id = p.products_id and p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "'"); hope that helps someone:) Link to comment Share on other sites More sharing options...
wheeloftime Posted January 15, 2007 Share Posted January 15, 2007 I had a problem with order, when customer added some product to his shopping cart, then comes back later, checks out, and if you meanwhile disabled the product from your catalog (set inactive), the customer was still able to purchase it, and later I had problems asking him to choose replacment, or arrange refund, a lot of headacheso you can change in includes/classes/shopping_cart.php Hello Arman, Though the solution might work it is not the correct way to go! If you want to make sure someone can not checkout with a product which has been disabled/got 0 stock you can set your admin->configuration->stock->allow checkout to false. Of course the option Check Stock Level should be set to true. regards, Howard Link to comment Share on other sites More sharing options...
ruboo Posted January 15, 2007 Author Share Posted January 15, 2007 Hello Arman, Though the solution might work it is not the correct way to go! If you want to make sure someone can not checkout with a product which has been disabled/got 0 stock you can set your admin->configuration->stock->allow checkout to false. Of course the option Check Stock Level should be set to true. regards, Howard Hi Howard, It is set to false, but still customer is able to check out, it does not check inactive status, only if set to 0. Can you please check Link to comment Share on other sites More sharing options...
wheeloftime Posted January 15, 2007 Share Posted January 15, 2007 Hi Howard, It is set to false, but still customer is able to check out, it does not check inactive status, only if set to 0. Can you please check Hi Arman, I don't have to check as it is true what you say. I thought it was about stock but I understand now it is a product once available but temporarily not while stock stays larger then zero. I guess it is a feature when you use a direct link to inactive products for special customers but normally your applied changes would be a sound thing to do ! I'll pass this through to the development team members and if there is going to be another update for MS2.2 they might include these fixes... Thanks, Howard Link to comment Share on other sites More sharing options...
gregy Posted January 31, 2007 Share Posted January 31, 2007 is there any idea for temporarily fix? Link to comment Share on other sites More sharing options...
wheeloftime Posted January 31, 2007 Share Posted January 31, 2007 is there any idea for temporarily fix? Sorry ? The fix is right on top of this thread. Apply it and you'll be fine. Link to comment Share on other sites More sharing options...
gregy Posted January 31, 2007 Share Posted January 31, 2007 hmm .. sorry didn't try it because in next thread (second) you gave us advice about settings but didn't worked for me .. i'm going to implement it now! thanx for support! Link to comment Share on other sites More sharing options...
satish Posted January 31, 2007 Share Posted January 31, 2007 A simple cron script that should check a baskets and the product table. It runs once a day or can be execued on product delete. Regards, Satish Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does. Link to comment Share on other sites More sharing options...
wheeloftime Posted January 31, 2007 Share Posted January 31, 2007 hmm .. sorry didn't try it because in next thread (second) you gave us advice about settings but didn't worked for me .. i'm going to implement it now! thanx for support! I gave you advice about settings and this thread in case you meant what was described here. Link to comment Share on other sites More sharing options...
gregy Posted January 31, 2007 Share Posted January 31, 2007 back again :) This fix above works, except, customer can continue shopping.. but without product :) I finished my purchase with shipping costs added to nothing :) anyway .. this is better as before when they were able to purchase thanx Link to comment Share on other sites More sharing options...
gregy Posted January 31, 2007 Share Posted January 31, 2007 A simple cron script that should check a baskets and the product table.It runs once a day or can be execued on product delete. Regards, Satish sounds good .. any sentance for cron to insert to? Link to comment Share on other sites More sharing options...
gregy Posted June 6, 2008 Share Posted June 6, 2008 Hi I didn't had this problem again in this time, but it came back. Yesterday we have had about 1600 customers at once. Half of them were trying to buy tickets. And the result? Stock went to negative -1 and bunch of emails confirmations with empty products (with zero's) Is there a way that OSC can check stock on every step .. even on final ... to put all orders in row, to check for stock one by one. Dunno what to do .. thanx Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.