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

#   HikaSerial/HikaShop product quantity not working

##

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

Less More

- Posts: 59
- Thank you received: 2
-
-

13 years 11 months ago -  13 years 11 months ago [\#80303](#80303) by [d2dpcs](/forum/user/10531-d2dpcs "View d2dpcs's Profile")  *[HikaSerial/HikaShop product quantity not working](/forum/17-serial-how-to/76427-hikaserial-hikashop-product-quantity-not-working#80303 "I linked the product quantity between HikaShop and HikaSerial successfully. While testing the import of serials, the product quantity updated properly. When I deleted the serials I used while testing...")* was created by *[d2dpcs](/forum/user/10531-d2dpcs "View d2dpcs's Profile")*

I linked the product quantity between HikaShop and HikaSerial successfully. While testing the import of serials, the product quantity updated properly. When I deleted the serials I used while testing the imports, the product quantity DID NOT update properly. They are removed from the Serials list, but the number of products is not lowered in the backend or frontend.

Edit: Removing quantity, and saving, when viewing product in HikaShop fixed the issue. I would rather not have to do this, though.

Thanks,
Eric

Last edit: 13 years 11 months ago by [d2dpcs](/forum/user/10531-d2dpcs "View d2dpcs's Profile"). Reason: marked solved

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE3LXNlcmlhbC1ob3ctdG8vNzY0MjctaGlrYXNlcmlhbC1oaWthc2hvcC1wcm9kdWN0LXF1YW50aXR5LW5vdC13b3JraW5nP3RtcGw9bWFya2Rvd24=) 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: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

13 years 11 months ago -  13 years 11 months ago [\#80326](#80326) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[HikaSerial/HikaShop product quantity not working](/forum/17-serial-how-to/76427-hikaserial-hikashop-product-quantity-not-working#80326 "I linked the product quantity between HikaShop and HikaSerial successfully. While testing the import of serials, the product quantity updated properly. When I deleted the serials I used while testing...")*

Hi,

Thansk for the report.
I have made a patch which would be in the next release (1.5.1)
You can edit the file "administrator/com_hikaserial/classes/serial.php" and update the delete function.
You just have to add two line just before the end of the function Code:

public function delete($elements) { // // Content of the "delete" function. // // Update product quantity - Just add these two lines at the end of the function, before the last "return". $productClass = hikaserial::get('class.product'); $productClass-&gt;refreshQuantities(); return $result; }

With it, the product quantity link would be reprocess (synchronize) each time a serial is deleted.

Regards,

---

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

Last edit: 13 years 11 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile").

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

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

Less More

- Posts: 59
- Thank you received: 2
-
-

13 years 11 months ago -  13 years 11 months ago [\#80437](#80437) by [d2dpcs](/forum/user/10531-d2dpcs "View d2dpcs's Profile")  Replied by *[d2dpcs](/forum/user/10531-d2dpcs "View d2dpcs's Profile")* on topic *[HikaSerial/HikaShop product quantity not working](/forum/17-serial-how-to/76427-hikaserial-hikashop-product-quantity-not-working#80437 "I linked the product quantity between HikaShop and HikaSerial successfully. While testing the import of serials, the product quantity updated properly. When I deleted the serials I used while testing...")*

Thanks for the immediate response as always. I edited the file with your two lines before, and outside, the return false bracket (received error upon deleting serial) and within the bracket like below (serial deleted, but did not update product quantity). Thanks, Eric. Code:

public function delete($elements) { if(!is_array($elements)) { $elements = array($elements); } $config = hikaserial::config(); JPluginHelper::importPlugin('hikaserial'); $dispatcher = JDispatcher::getInstance(); $do = true; $dispatcher-&gt;trigger('onBeforeSerialDelete', array(&amp;$elements, &amp;$do)); if(!$do) { $productClass = hikaserial::get('class.product'); $productClass-&gt;refreshQuantities(); return false; }

Last edit: 13 years 11 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile").

The following user(s) said Thank You: [Jerome](/forum/user/80-jerome "View Jerome's Profile")

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

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

Less More

- Posts: 59
- Thank you received: 2
-
-

13 years 11 months ago [\#80703](#80703) by [d2dpcs](/forum/user/10531-d2dpcs "View d2dpcs's Profile")  Replied by *[d2dpcs](/forum/user/10531-d2dpcs "View d2dpcs's Profile")* on topic *[HikaSerial/HikaShop product quantity not working](/forum/17-serial-how-to/76427-hikaserial-hikashop-product-quantity-not-working#80703 "I linked the product quantity between HikaShop and HikaSerial successfully. While testing the import of serials, the product quantity updated properly. When I deleted the serials I used while testing...")*

Jerome, I see that you thanked me, but didn't address the fact that it didn't work for me. I'm just writing this to let you know that a little bit of clarification is needed. Thanks, Eric.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE3LXNlcmlhbC1ob3ctdG8vNzY0MjctaGlrYXNlcmlhbC1oaWthc2hvcC1wcm9kdWN0LXF1YW50aXR5LW5vdC13b3JraW5nP3RtcGw9bWFya2Rvd24=) 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: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

13 years 11 months ago [\#80710](#80710) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[HikaSerial/HikaShop product quantity not working](/forum/17-serial-how-to/76427-hikaserial-hikashop-product-quantity-not-working#80710 "I linked the product quantity between HikaShop and HikaSerial successfully. While testing the import of serials, the product quantity updated properly. When I deleted the serials I used while testing...")*

Hi,

Sorry, I misunderstood your previous message.
After using the code tag on your tag, I see that your modification is not the right one.
The code should be at the end of the function, at the "real" end.
Code:

$dispatcher-&gt;trigger('onAfterSerialDelete', array(&amp;$elements)); } // Update product quantity // $productClass = hikaserial::get('class.product'); $productClass-&gt;refreshQuantities(); return $result; } public function consume($serial_id, $extra_data = null, $checkUser = true) { $app = JFactory::getApplication(); $config = hikaserial::config();

Regards,

---

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

The following user(s) said Thank You: [d2dpcs](/forum/user/10531-d2dpcs "View d2dpcs's Profile")

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

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

Less More

- Posts: 59
- Thank you received: 2
-
-

13 years 11 months ago [\#80713](#80713) by [d2dpcs](/forum/user/10531-d2dpcs "View d2dpcs's Profile")  Replied by *[d2dpcs](/forum/user/10531-d2dpcs "View d2dpcs's Profile")* on topic *[HikaSerial/HikaShop product quantity not working](/forum/17-serial-how-to/76427-hikaserial-hikashop-product-quantity-not-working#80713 "I linked the product quantity between HikaShop and HikaSerial successfully. While testing the import of serials, the product quantity updated properly. When I deleted the serials I used while testing...")*

Yes, that worked for me. Thanks for the clarification.

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

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

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

Time to create page: 0.061 seconds

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