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

#   Product options remaining after product removed

##

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

Less More

- Posts: 3
- Thank you received: 0
-
-

8 years 8 months ago [\#290174](#290174) by [ccambie](/forum/user/56100-ccambie "View ccambie's Profile")  *[Product options remaining after product removed](/forum/27-checkout/894219-product-options-remaining-after-product-removed#290174 "-- HikaShop version -- : 3.3.0 -- Joomla version -- : 3.8.5 -- PHP version -- : 5.6.20  When the option &quot;Group options with product&quot; is on &quot;No&quot;, if you remove the main product from cart, the options remain so it is possible to order options without the product they are associated to. Is it possible to configure the shop so that the options are removed at the same time as the product ? I know that &quot;Group options with product&quot; allows that, but it doesn't suits my needs because then you can't change the quantity of the options.  Thanks in advance for your help.  Regards,")* was created by *[ccambie](/forum/user/56100-ccambie "View ccambie's Profile")*

-- HikaShop version -- : 3.3.0
-- Joomla version -- : 3.8.5
-- PHP version -- : 5.6.20

When the option "Group options with product" is on "No", if you remove the main product from cart, the options remain so it is possible to order options without the product they are associated to.
Is it possible to configure the shop so that the options are removed at the same time as the product ?
I know that "Group options with product" allows that, but it doesn't suits my needs because then you can't change the quantity of the options.

Thanks in advance for your help.

Regards,

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5NDIxOS1wcm9kdWN0LW9wdGlvbnMtcmVtYWluaW5nLWFmdGVyLXByb2R1Y3QtcmVtb3ZlZD90bXBsPW1hcmtkb3du) 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: 14326
-
-

8 years 8 months ago [\#290177](#290177) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Product options remaining after product removed](/forum/27-checkout/894219-product-options-remaining-after-product-removed#290177 "-- HikaShop version -- : 3.3.0 -- Joomla version -- : 3.8.5 -- PHP version -- : 5.6.20  When the option &quot;Group options with product&quot; is on &quot;No&quot;, if you remove the main product from cart, the options remain so it is possible to order options without the product they are associated to. Is it possible to configure the shop so that the options are removed at the same time as the product ? I know that &quot;Group options with product&quot; allows that, but it doesn't suits my needs because then you can't change the quantity of the options.  Thanks in advance for your help.  Regards,")*

Hi,

It's done like that on purpose. Normally, when you have that option turned off, it means that you want to allow customers to be able to purchase the options separately from the main product.

In that case, I would recommend to keep that option turned on, and modify the view displaying the cart on the checkout to have it display the products as if they were not grouped.
[ www.hikashop.com/support/documentation/1...-display.html#layout](https://www.hikashop.com/support/documentation/153-customize-the-display.html#layout)

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

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

Less More

- Posts: 3
- Thank you received: 0
-
-

8 years 8 months ago -  8 years 8 months ago [\#290276](#290276) by [ccambie](/forum/user/56100-ccambie "View ccambie's Profile")  Replied by *[ccambie](/forum/user/56100-ccambie "View ccambie's Profile")* on topic *[Product options remaining after product removed](/forum/27-checkout/894219-product-options-remaining-after-product-removed#290276 "-- HikaShop version -- : 3.3.0 -- Joomla version -- : 3.8.5 -- PHP version -- : 5.6.20  When the option &quot;Group options with product&quot; is on &quot;No&quot;, if you remove the main product from cart, the options remain so it is possible to order options without the product they are associated to. Is it possible to configure the shop so that the options are removed at the same time as the product ? I know that &quot;Group options with product&quot; allows that, but it doesn't suits my needs because then you can't change the quantity of the options.  Thanks in advance for your help.  Regards,")*

Thank you for your answer.
I have followed your advice, turned the option on and created a template override for product/cart.php.
I've commented the code below (line 145 and 380) : Code:

/* if($group &amp;&amp; !empty($product-&gt;cart_product_option_parent_id)) continue; */

Now, the options are separated from the product and are removed from cart when the product is removed.
Unfortunately, it is impossible to remove the options independently. I neither can change their quantity.

Do you have any idea for fixing this ?

Last edit: 8 years 8 months ago by [ccambie](/forum/user/56100-ccambie "View ccambie's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5NDIxOS1wcm9kdWN0LW9wdGlvbnMtcmVtYWluaW5nLWFmdGVyLXByb2R1Y3QtcmVtb3ZlZD90bXBsPW1hcmtkb3du) 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: 14326
-
-

8 years 8 months ago [\#290277](#290277) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Product options remaining after product removed](/forum/27-checkout/894219-product-options-remaining-after-product-removed#290277 "-- HikaShop version -- : 3.3.0 -- Joomla version -- : 3.8.5 -- PHP version -- : 5.6.20  When the option &quot;Group options with product&quot; is on &quot;No&quot;, if you remove the main product from cart, the options remain so it is possible to order options without the product they are associated to. Is it possible to configure the shop so that the options are removed at the same time as the product ? I know that &quot;Group options with product&quot; allows that, but it doesn't suits my needs because then you can't change the quantity of the options.  Thanks in advance for your help.  Regards,")*

That would be a lot more complex.
It would require modifying the code in administrator/components/com_hikashop/classes/cart.php
It's a lot more involved.
Maybe removing that code in there would help: Code:

if(!empty($cart-&gt;cart_products[ $p['id'] ]-&gt;cart_product_option_parent_id)) { $p['id'] = 0; continue; }

This might also need to be modified: Code:

if($pid == $p['id'] &#124;&#124; empty($cart_product-&gt;cart_product_option_parent_id) &#124;&#124; $cart_product-&gt;cart_product_option_parent_id != $p['id']) continue;

It would require some debugging / testing.

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

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

Less More

- Posts: 3
- Thank you received: 0
-
-

8 years 8 months ago [\#290372](#290372) by [ccambie](/forum/user/56100-ccambie "View ccambie's Profile")  Replied by *[ccambie](/forum/user/56100-ccambie "View ccambie's Profile")* on topic *[Product options remaining after product removed](/forum/27-checkout/894219-product-options-remaining-after-product-removed#290372 "-- HikaShop version -- : 3.3.0 -- Joomla version -- : 3.8.5 -- PHP version -- : 5.6.20  When the option &quot;Group options with product&quot; is on &quot;No&quot;, if you remove the main product from cart, the options remain so it is possible to order options without the product they are associated to. Is it possible to configure the shop so that the options are removed at the same time as the product ? I know that &quot;Group options with product&quot; allows that, but it doesn't suits my needs because then you can't change the quantity of the options.  Thanks in advance for your help.  Regards,")*

Thank you for your answer.
Yet we decided not to hack the component.
May this feature be implemented in a future version ?

Regards,

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5NDIxOS1wcm9kdWN0LW9wdGlvbnMtcmVtYWluaW5nLWFmdGVyLXByb2R1Y3QtcmVtb3ZlZD90bXBsPW1hcmtkb3du) 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: 14326
-
-

8 years 8 months ago [\#290406](#290406) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Product options remaining after product removed](/forum/27-checkout/894219-product-options-remaining-after-product-removed#290406 "-- HikaShop version -- : 3.3.0 -- Joomla version -- : 3.8.5 -- PHP version -- : 5.6.20  When the option &quot;Group options with product&quot; is on &quot;No&quot;, if you remove the main product from cart, the options remain so it is possible to order options without the product they are associated to. Is it possible to configure the shop so that the options are removed at the same time as the product ? I know that &quot;Group options with product&quot; allows that, but it doesn't suits my needs because then you can't change the quantity of the options.  Thanks in advance for your help.  Regards,")*

Hi,

We don't plan in adding that for now.
Besides you, no one reported such need so far. Maybe we could reconsider in the future if more people were interesting in supporting that.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg5NDIxOS1wcm9kdWN0LW9wdGlvbnMtcmVtYWluaW5nLWFmdGVyLXByb2R1Y3QtcmVtb3ZlZD90bXBsPW1hcmtkb3du) 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.081 seconds

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