Skip to main content

When removing a product from cart, options remain

More
14 years 8 months ago #34927 by yellowhousejake
Howdy,

When I have a product that has options, and the user chooses an option, everything works fine. But when the user removes the product from the cart, the selected options remain with no way to remove them. I don't think I did anything wrong setting up the option, it is just a product in an unpublished category, nothing special.

Thanks,

DAve

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #34972 by nicolas
Hi,

That's strange as we don't have that problem on our end.

Could you edit the file administrator/components/com_hikashop/classes/cart.php and change the line:

$query = 'DELETE FROM '.hikashop_table('cart_product').' WHERE cart_product_id = '.$cartContent[$id]->cart_product_id. ' OR cart_product_parent_id = '.$id.' OR cart_product_id = '.$cartContent[$id]->cart_product_parent_id;


to:

$query = 'DELETE FROM '.hikashop_table('cart_product').' WHERE cart_product_id = '.$cartContent[$id]->cart_product_id. ' OR cart_product_parent_id = '.$id.' OR cart_product_id = '.$cartContent[$id]->cart_product_parent_id.' OR cart_product_option_parent_id='.$cartContent[$id]->cart_product_id;

and try again ? Does that solves the problem ?

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #35038 by yellowhousejake
Fixed. I tried several combinations of products with options and without, deleting products in different orders, every time the cart went to empty.

Thank you!

DAve

Please Log in or Create an account to join the conversation.

More
14 years 8 months ago #35039 by nicolas
Great, we'll add that for next release.

Please Log in or Create an account to join the conversation.

Time to create page: 0.168 seconds
Powered by Kunena Forum