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

#   Every time we sell a product is scaled by two unit

##

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

Less More

- Posts: 89
- Thank you received: 1
-
- [](http://www.insegnalo.it)
-

13 years 9 months ago [\#87790](#87790) by [insegnalo](/forum/user/12331-insegnalo "View insegnalo's Profile")  *[Every time we sell a product is scaled by two unit](/forum/22-market-bug-report/77881-every-time-we-sell-a-product-is-scaled-by-two-unit#87790 "Hi,  When a product is associated with a Vendor, if it has a defined quantity  every time we sell a product is scaled by two units  Practically the order marked &quot;order&#95;type&quot; = subsale decreases the availability of the product  I hope it is clear  Regards  Fabio")* was created by *[insegnalo](/forum/user/12331-insegnalo "View insegnalo's Profile")*

Hi,

When a product is associated with a Vendor, if it has a defined quantity

every time we sell a product is scaled by two units

Practically the order marked "order_type" = subsale decreases the availability of the product

I hope it is clear

Regards

Fabio

---

Configuration:
Joomla: 2.5.9
Hikashop: 2.1.1
Hikamarket: 1.1.2

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0Lzc3ODgxLWV2ZXJ5LXRpbWUtd2Utc2VsbC1hLXByb2R1Y3QtaXMtc2NhbGVkLWJ5LXR3by11bml0P3RtcGw9bWFya2Rvd24=) 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 9 months ago [\#87803](#87803) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Every time we sell a product is scaled by two unit](/forum/22-market-bug-report/77881-every-time-we-sell-a-product-is-scaled-by-two-unit#87803 "Hi,  When a product is associated with a Vendor, if it has a defined quantity  every time we sell a product is scaled by two units  Practically the order marked &quot;order&#95;type&quot; = subsale decreases the availability of the product  I hope it is clear  Regards  Fabio")*

Hi,

Please update the file " administrator/components/com_hikashop/classes/order_product.php " and change the block Code:

if(!empty($product-&gt;product_id)) { if(empty($update-&gt;no_update_qty)) { $updates[$product-&gt;order_product_quantity][] = (int)$product-&gt;product_id; }

By: Code:

if(!empty($product-&gt;product_id)) { if(empty($product-&gt;no_update_qty)) { $updates[$product-&gt;order_product_quantity][] = (int)$product-&gt;product_id; }

It would solve the problem of "no_update_qty".

Regards,

---

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

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

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

Less More

- Posts: 89
- Thank you received: 1
-
- [](http://www.insegnalo.it)
-

13 years 9 months ago [\#88155](#88155) by [insegnalo](/forum/user/12331-insegnalo "View insegnalo's Profile")  Replied by *[insegnalo](/forum/user/12331-insegnalo "View insegnalo's Profile")* on topic *[Every time we sell a product is scaled by two unit](/forum/22-market-bug-report/77881-every-time-we-sell-a-product-is-scaled-by-two-unit#88155 "Hi,  When a product is associated with a Vendor, if it has a defined quantity  every time we sell a product is scaled by two units  Practically the order marked &quot;order&#95;type&quot; = subsale decreases the availability of the product  I hope it is clear  Regards  Fabio")*

Hi jerome

thanks for the patch.

I also saw that is also double-counted the number of times it is used a discount.

Always when the product is assigned a seller

regards

Fabio

---

Configuration:
Joomla: 2.5.9
Hikashop: 2.1.1
Hikamarket: 1.1.2

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0Lzc3ODgxLWV2ZXJ5LXRpbWUtd2Utc2VsbC1hLXByb2R1Y3QtaXMtc2NhbGVkLWJ5LXR3by11bml0P3RtcGw9bWFya2Rvd24=) 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 9 months ago -  13 years 9 months ago [\#88160](#88160) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Every time we sell a product is scaled by two unit](/forum/22-market-bug-report/77881-every-time-we-sell-a-product-is-scaled-by-two-unit#88160 "Hi,  When a product is associated with a Vendor, if it has a defined quantity  every time we sell a product is scaled by two units  Practically the order marked &quot;order&#95;type&quot; = subsale decreases the availability of the product  I hope it is clear  Regards  Fabio")*

Hi,

You can abort the "discount code" copy in the class order (administrator/components/com_hikamarket/classes/order.php) by adding the "order_discount_code" into the "forbidden" fields. Code:

foreach(get_object_vars($order-&gt;old) as $key =&gt; $value) { if(in_array($key, array('order_id', 'order_number', 'order_invoice_id', 'order_invoice_number', 'order_discount_code'))) // "order_discount_code" Added in this line. continue;

We are currently working on a real management of orders in hikamarket sub orders for HikaMarket 1.1.0.
But with HikaShop 2.1.0, this modification would not more required. The "discount use" would not be modified for HikaMarket sub sales.

Regards,

---

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

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

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

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

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

Less More

- Posts: 89
- Thank you received: 1
-
- [](http://www.insegnalo.it)
-

13 years 9 months ago [\#89084](#89084) by [insegnalo](/forum/user/12331-insegnalo "View insegnalo's Profile")  Replied by *[insegnalo](/forum/user/12331-insegnalo "View insegnalo's Profile")* on topic *[Every time we sell a product is scaled by two unit](/forum/22-market-bug-report/77881-every-time-we-sell-a-product-is-scaled-by-two-unit#89084 "Hi,  When a product is associated with a Vendor, if it has a defined quantity  every time we sell a product is scaled by two units  Practically the order marked &quot;order&#95;type&quot; = subsale decreases the availability of the product  I hope it is clear  Regards  Fabio")*

Hi Jerome,

I upgraded to 2.1 and hikashop hikamarket 1.1

The problem continues to exist.

That is, two units are subtracted if the product is associated with a vendor.

I need to make some changes?

Regards
Fabio

---

Configuration:
Joomla: 2.5.9
Hikashop: 2.1.1
Hikamarket: 1.1.2

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzIyLW1hcmtldC1idWctcmVwb3J0Lzc3ODgxLWV2ZXJ5LXRpbWUtd2Utc2VsbC1hLXByb2R1Y3QtaXMtc2NhbGVkLWJ5LXR3by11bml0P3RtcGw9bWFya2Rvd24=) 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 9 months ago [\#89148](#89148) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Every time we sell a product is scaled by two unit](/forum/22-market-bug-report/77881-every-time-we-sell-a-product-is-scaled-by-two-unit#89148 "Hi,  When a product is associated with a Vendor, if it has a defined quantity  every time we sell a product is scaled by two units  Practically the order marked &quot;order&#95;type&quot; = subsale decreases the availability of the product  I hope it is clear  Regards  Fabio")*

Hi,

I made new tests and I have found a configuration which still generate your problem.
I made a patch for HikaShop and we are uploading the new packages of HikaShop 2.1.0 which would fix your issue.

Please re-download HikaShop 2.1.0 and sorry for the inconvenient.

Regards,

---

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

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

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

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