[Skip to main content](#vessel-content)

#   When removing a product from cart, options remain

##

- **[yellowhousejake](/forum/user/4221-yellowhousejake "View yellowhousejake's Profile")**
- [![yellowhousejake's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4221-yellowhousejake "View yellowhousejake's Profile") Topic Author
- [ Offline](/forum/user/4221-yellowhousejake)

Less More

- Posts: 37
- Thank you received: 0
-
-

14 years 10 months ago [\#34927](#34927) by [yellowhousejake](/forum/user/4221-yellowhousejake "View yellowhousejake's Profile")  *[When removing a product from cart, options remain](/forum/3-bug-report/34927-when-removing-a-product-from-cart-options-remain#34927 "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")* was created by *[yellowhousejake](/forum/user/4221-yellowhousejake "View yellowhousejake's Profile")*

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  [ ![&#91;img](http://www.hikashop.com/media/kunena/attachments/legacy/images/options.png) ](http://www.hikashop.com/media/kunena/attachments/legacy/images/options.png "&#91;img")

- [ ![options.png](/forum/attachment/2381) ](/forum/attachment/2381 "options.png") [ ](/forum/attachment/2381?download=1 "options.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8zNDkyNy13aGVuLXJlbW92aW5nLWEtcHJvZHVjdC1mcm9tLWNhcnQtb3B0aW9ucy1yZW1haW4/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

14 years 10 months ago [\#34972](#34972) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: When removing a product from cart, options remain](/forum/3-bug-report/34927-when-removing-a-product-from-cart-options-remain#34972 "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")*

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]-&gt;cart_product_id. ' OR cart_product_parent_id = '.$id.' OR cart_product_id = '.$cartContent[$id]-&gt;cart_product_parent_id;

to:

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

and try again ? Does that solves the problem ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8zNDkyNy13aGVuLXJlbW92aW5nLWEtcHJvZHVjdC1mcm9tLWNhcnQtb3B0aW9ucy1yZW1haW4/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[yellowhousejake](/forum/user/4221-yellowhousejake "View yellowhousejake's Profile")**
- [![yellowhousejake's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/4221-yellowhousejake "View yellowhousejake's Profile") Topic Author
- [ Offline](/forum/user/4221-yellowhousejake)

Less More

- Posts: 37
- Thank you received: 0
-
-

14 years 10 months ago [\#35038](#35038) by [yellowhousejake](/forum/user/4221-yellowhousejake "View yellowhousejake's Profile")  Replied by *[yellowhousejake](/forum/user/4221-yellowhousejake "View yellowhousejake's Profile")* on topic *[Re: When removing a product from cart, options remain](/forum/3-bug-report/34927-when-removing-a-product-from-cart-options-remain#35038 "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")*

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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8zNDkyNy13aGVuLXJlbW92aW5nLWEtcHJvZHVjdC1mcm9tLWNhcnQtb3B0aW9ucy1yZW1haW4/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

14 years 10 months ago [\#35039](#35039) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: When removing a product from cart, options remain](/forum/3-bug-report/34927-when-removing-a-product-from-cart-options-remain#35039 "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")*

Great, we'll add that for next release.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8zNDkyNy13aGVuLXJlbW92aW5nLWEtcHJvZHVjdC1mcm9tLWNhcnQtb3B0aW9ucy1yZW1haW4/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.049 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
