ruboo
Jan 15 2007, 08:56 AM
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:)
wheeloftime
Jan 15 2007, 09:27 AM
QUOTE (ruboo @ Jan 15 2007, 09:56 AM)

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
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
ruboo
Jan 15 2007, 10:07 AM
QUOTE (wheeloftime @ Jan 15 2007, 09:27 AM)

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
wheeloftime
Jan 15 2007, 10:57 AM
QUOTE (ruboo @ Jan 15 2007, 11:07 AM)

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
gregy
Jan 31 2007, 09:13 AM
is there any idea for temporarily fix?
wheeloftime
Jan 31 2007, 11:11 AM
QUOTE (gregy @ Jan 31 2007, 10:13 AM)

is there any idea for temporarily fix?
Sorry ? The fix is right on top of this thread. Apply it and you'll be fine.
gregy
Jan 31 2007, 11:16 AM
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!
satish
Jan 31 2007, 11:40 AM
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
wheeloftime
Jan 31 2007, 11:43 AM
QUOTE (gregy @ Jan 31 2007, 12:16 PM)

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.
gregy
Jan 31 2007, 11:46 AM
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
gregy
Jan 31 2007, 11:50 AM
QUOTE (satish @ Jan 31 2007, 12:40 PM)

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?
gregy
Jun 6 2008, 06:25 AM
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