- Posts: 37
- Thank you received: 0
When removing a product from cart, options remain
- yellowhousejake
-
Topic Author
- Offline
Less
More
14 years 8 months ago #34927
by yellowhousejake
When removing a product from cart, options remain was created 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
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.
14 years 8 months ago #34972
by nicolas
Replied by nicolas on topic Re: When removing a product from cart, options remain
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 ?
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.
- yellowhousejake
-
Topic Author
- Offline
Less
More
- Posts: 37
- Thank you received: 0
14 years 8 months ago #35038
by yellowhousejake
Replied by yellowhousejake on topic Re: When removing a product from cart, options remain
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
Thank you!
DAve
Please Log in or Create an account to join the conversation.
14 years 8 months ago #35039
by nicolas
Replied by nicolas on topic Re: When removing a product from cart, options remain
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