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

#   Problem finding UpdateCart function for checkout cart.

##

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

Less More

- Posts: 55
- Thank you received: 0
-
-

9 years 8 months ago -  9 years 8 months ago [\#262461](#262461) by [gioferrario@gmail.com](/forum/user/35746-gioferrario-gmail-com "View gioferrario@gmail.com's Profile")  *[Problem finding UpdateCart function for checkout cart.](/forum/31-development/888866-problem-finding-updatecart-function-for-checkout-cart#262461 "-- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.6.5  Good day, I have a problem removing items in the checkout cart of Hikashop (version 2.6.3). I know that my version is not tle latest, but every other thing is working so I wanted to fix this before editing again everything. A Little intro: In my site I sell bike races photos, so I have done some modifications that allow the user to buy all his photos in one click, with a fixed price. The result is a cart with an item with a price &gt; than 0€ and the single photos (connected to the previous item) with 0€ value. My aim is to delete all 0€ value items when I delete (from cart) the parent item.  In the module cart (/com&#95;hikashop/views/product/tmpl/cart.php) everything is working. I edited the function updateCart in /com&#95;hikashop/controllers/product.php, now it updates not only a single product but an array of products.  The problem is in the checkout cart: /com&#95;hikashop/views/checkout/tmpl/cart.php. The remove button, only removes the main item and not the children. From the url of the button I noticed that it operates on product&#95;ids and not on cart&#95;product&#95;ids like the module cart. I double checked the function updateCart and my modification is also reproduced for product ids.  I am using firebug to debug my code, and the logs never print when I fire the button in checkout cart, while it works when I use module button. I also noticed that if I delete the function updateCart (with some items already in the cart) in /com&#95;hikashop/controllers/product.php the module cart stops working, but checkout cart still works.  The problem seems to be that I have edited the wrong function and there must be another updateCart () somewhere, but I cannot find it. I tried searching the function updatecart in all the files of the hickashop component folder, but the only one is in product.php. Is there another place in which I have to reproduce my modifications?  Thank you very much for your help, I hope my explanation is clear enough, I am not a good php developer I do it mainly for fun.")* was created by *[gioferrario@gmail.com](/forum/user/35746-gioferrario-gmail-com "View gioferrario@gmail.com's Profile")*

-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.6.5

Good day, I have a problem removing items in the checkout cart of Hikashop (version 2.6.3).
I know that my version is not tle latest, but every other thing is working so I wanted to fix this before editing again everything.
A Little intro:
In my site I sell bike races photos, so I have done some modifications that allow the user to buy all his photos in one click, with a fixed price.
The result is a cart with an item with a price &gt; than 0€ and the single photos (connected to the previous item) with 0€ value.
My aim is to delete all 0€ value items when I delete (from cart) the parent item.

In the module cart (/com_hikashop/views/product/tmpl/cart.php) everything is working. I edited the function updateCart in /com_hikashop/controllers/product.php, now it updates not only a single product but an array of products.

The problem is in the checkout cart: /com_hikashop/views/checkout/tmpl/cart.php.
The remove button, only removes the main item and not the children.
From the url of the button I noticed that it operates on product_ids and not on cart_product_ids like the module cart. I double checked the function updateCart and my modification is also reproduced for product ids.

I am using firebug to debug my code, and the logs never print when I fire the button in checkout cart, while it works when I use module button.
I also noticed that if I delete the function updateCart (with some items already in the cart) in /com_hikashop/controllers/product.php the module cart stops working, but checkout cart still works.

The problem seems to be that I have edited the wrong function and there must be another updateCart () somewhere, but I cannot find it.
I tried searching the function updatecart in all the files of the hickashop component folder, but the only one is in product.php.
Is there another place in which I have to reproduce my modifications?

Thank you very much for your help, I hope my explanation is clear enough, I am not a good php developer I do it mainly for fun.

- [ ![hikacart.jpg](/forum/attachment/36358) ](/forum/attachment/36358 "hikacart.jpg") [ ](/forum/attachment/36358?download=1 "hikacart.jpg")

Last edit: 9 years 8 months ago by [gioferrario@gmail.com](/forum/user/35746-gioferrario-gmail-com "View gioferrario@gmail.com's Profile").

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

9 years 8 months ago [\#262469](#262469) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Problem finding UpdateCart function for checkout cart.](/forum/31-development/888866-problem-finding-updatecart-function-for-checkout-cart#262469 "-- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.6.5  Good day, I have a problem removing items in the checkout cart of Hikashop (version 2.6.3). I know that my version is not tle latest, but every other thing is working so I wanted to fix this before editing again everything. A Little intro: In my site I sell bike races photos, so I have done some modifications that allow the user to buy all his photos in one click, with a fixed price. The result is a cart with an item with a price &gt; than 0€ and the single photos (connected to the previous item) with 0€ value. My aim is to delete all 0€ value items when I delete (from cart) the parent item.  In the module cart (/com&#95;hikashop/views/product/tmpl/cart.php) everything is working. I edited the function updateCart in /com&#95;hikashop/controllers/product.php, now it updates not only a single product but an array of products.  The problem is in the checkout cart: /com&#95;hikashop/views/checkout/tmpl/cart.php. The remove button, only removes the main item and not the children. From the url of the button I noticed that it operates on product&#95;ids and not on cart&#95;product&#95;ids like the module cart. I double checked the function updateCart and my modification is also reproduced for product ids.  I am using firebug to debug my code, and the logs never print when I fire the button in checkout cart, while it works when I use module button. I also noticed that if I delete the function updateCart (with some items already in the cart) in /com&#95;hikashop/controllers/product.php the module cart stops working, but checkout cart still works.  The problem seems to be that I have edited the wrong function and there must be another updateCart () somewhere, but I cannot find it. I tried searching the function updatecart in all the files of the hickashop component folder, but the only one is in product.php. Is there another place in which I have to reproduce my modifications?  Thank you very much for your help, I hope my explanation is clear enough, I am not a good php developer I do it mainly for fun.")*

Hi,

Why not putting the other products as "options" of the main one ?
Thanks to the setting "group options" in HikaShop you will then let the core manage the link between the product and his options.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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

Less More

- Posts: 55
- Thank you received: 0
-
-

9 years 8 months ago [\#262537](#262537) by [gioferrario@gmail.com](/forum/user/35746-gioferrario-gmail-com "View gioferrario@gmail.com's Profile")  Replied by *[gioferrario@gmail.com](/forum/user/35746-gioferrario-gmail-com "View gioferrario@gmail.com's Profile")* on topic *[Problem finding UpdateCart function for checkout cart.](/forum/31-development/888866-problem-finding-updatecart-function-for-checkout-cart#262537 "-- HikaShop version -- : 2.6.3 -- Joomla version -- : 3.6.5  Good day, I have a problem removing items in the checkout cart of Hikashop (version 2.6.3). I know that my version is not tle latest, but every other thing is working so I wanted to fix this before editing again everything. A Little intro: In my site I sell bike races photos, so I have done some modifications that allow the user to buy all his photos in one click, with a fixed price. The result is a cart with an item with a price &gt; than 0€ and the single photos (connected to the previous item) with 0€ value. My aim is to delete all 0€ value items when I delete (from cart) the parent item.  In the module cart (/com&#95;hikashop/views/product/tmpl/cart.php) everything is working. I edited the function updateCart in /com&#95;hikashop/controllers/product.php, now it updates not only a single product but an array of products.  The problem is in the checkout cart: /com&#95;hikashop/views/checkout/tmpl/cart.php. The remove button, only removes the main item and not the children. From the url of the button I noticed that it operates on product&#95;ids and not on cart&#95;product&#95;ids like the module cart. I double checked the function updateCart and my modification is also reproduced for product ids.  I am using firebug to debug my code, and the logs never print when I fire the button in checkout cart, while it works when I use module button. I also noticed that if I delete the function updateCart (with some items already in the cart) in /com&#95;hikashop/controllers/product.php the module cart stops working, but checkout cart still works.  The problem seems to be that I have edited the wrong function and there must be another updateCart () somewhere, but I cannot find it. I tried searching the function updatecart in all the files of the hickashop component folder, but the only one is in product.php. Is there another place in which I have to reproduce my modifications?  Thank you very much for your help, I hope my explanation is clear enough, I am not a good php developer I do it mainly for fun.")*

Thank you for your answer,
maily because I have already thousand of photos. The offer package is a recent need and I don't want to reload everithing if possible.
By the way, using options I have to create a specific parent product for each racer. With my changes the customer can buy everything that appear after filtering the race on the base of his number.
You gave me a good starting point, I will check how the option removal works, thank you!

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

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

[](#top)
