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

#   Characteristics not working with stock control

##

- **[lanzanet](/forum/user/7823-lanzanet "View lanzanet's Profile")**
- [![lanzanet's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7823.png)](/forum/user/7823-lanzanet "View lanzanet's Profile") Topic Author
- [ Offline](/forum/user/7823-lanzanet)

Less More

- Posts: 107
- Thank you received: 3
-
-

12 years 7 months ago -  12 years 7 months ago [\#146660](#146660) by [lanzanet](/forum/user/7823-lanzanet "View lanzanet's Profile")  *[Characteristics not working with stock control](/forum/3-bug-report/866345-characteristics-not-working-with-stock-control#146660 "I'm testing my site and I'm still having the characteristics problem. I have a product with two characteristics fields (C1 and C2) and each characteristic has two values (C1-1, C1-2, C2-1, C2-2). If I...")* was created by *[lanzanet](/forum/user/7823-lanzanet "View lanzanet's Profile")*

I'm testing my site and I'm still having the characteristics problem. I have a product with two characteristics fields (C1 and C2) and each characteristic has two values (C1-1, C1-2, C2-1, C2-2). If I have 3 untits of this product and I only have the stock in the main product, I understand that the client only can buy 3 units of some characteristics combination and not 3 units os each characteristics combination, and this is what is happening in my site.

May hikashop work like I think it must work or I'm mistaken?

OPTIONS are working worse than characteristics. You can buy an unlimited number of products in the same purchase though you only have 3 units.

I can't put online my site due to this errors.

I'm using last version 2.3.0

Please, help. Thanks.

Last edit: 12 years 7 months ago by [lanzanet](/forum/user/7823-lanzanet "View lanzanet's Profile").

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

12 years 7 months ago [\#146673](#146673) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Characteristics not working with stock control](/forum/3-bug-report/866345-characteristics-not-working-with-stock-control#146673 "I'm testing my site and I'm still having the characteristics problem. I have a product with two characteristics fields (C1 and C2) and each characteristic has two values (C1-1, C1-2, C2-1, C2-2). If I...")*

Hi,
Can you tell me how do you exactly want to set the stock control of your product ? Note that with characteristics you can :
1. Set a quantity through the "quantity" option of each variants of your product so that the stock will be managed independently of their main product.

2. Only set a quantity through the main product so that the stock can only be managed through the main product configuration page.

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

- **[lanzanet](/forum/user/7823-lanzanet "View lanzanet's Profile")**
- [![lanzanet's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7823.png)](/forum/user/7823-lanzanet "View lanzanet's Profile") Topic Author
- [ Offline](/forum/user/7823-lanzanet)

Less More

- Posts: 107
- Thank you received: 3
-
-

12 years 7 months ago -  12 years 7 months ago [\#146676](#146676) by [lanzanet](/forum/user/7823-lanzanet "View lanzanet's Profile")  Replied by *[lanzanet](/forum/user/7823-lanzanet "View lanzanet's Profile")* on topic *[Characteristics not working with stock control](/forum/3-bug-report/866345-characteristics-not-working-with-stock-control#146676 "I'm testing my site and I'm still having the characteristics problem. I have a product with two characteristics fields (C1 and C2) and each characteristic has two values (C1-1, C1-2, C2-1, C2-2). If I...")*

Hi. Thanks for answering.

I've explained it above. I've a product with 3 stock units and I want to control only these 3 units. This product has 2 characteristics with 2 variants on each characteristic and with an unlimited stock on all 4 variants (it may be result on only the stock control on the main product).

Then I can buy 3 units of each combination of characteristics resulting on 12 units that I can buy, and I only have 3 on stock.

Maybe if you buy less (or equal) than 3 units on different purchases it may work, but if you do what I've said in the same purchase it doesn't work. You can add to cart 3 units of one variant, and then without going to checkout choose other variant and then add 3 units and so on with all variants, and then you can go to checkout and buy 12 units of a product that has only 3 on stock.

Please help. Thanks.

Last edit: 12 years 7 months ago by [lanzanet](/forum/user/7823-lanzanet "View lanzanet's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84NjYzNDUtY2hhcmFjdGVyaXN0aWNzLW5vdC13b3JraW5nLXdpdGgtc3RvY2stY29udHJvbD90bXBsPW1hcmtkb3du) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14276
-
-

12 years 7 months ago [\#146704](#146704) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Characteristics not working with stock control](/forum/3-bug-report/866345-characteristics-not-working-with-stock-control#146704 "I'm testing my site and I'm still having the characteristics problem. I have a product with two characteristics fields (C1 and C2) and each characteristic has two values (C1-1, C1-2, C2-1, C2-2). If I...")*

Hi,

Thank you for bearing with us. Such debugging is quite complex to do and we're having a hard time just keeping up with "easy" support so I hadn't the time to look at the issue until now.

Please add the code: Code:

$quantity_for_same_main_product =&amp; $this-&gt;_getGlobalQuantityOfVariants($cartContent,$product,$cart_product_id_for_product); if($quantity_for_same_main_product&gt;$product-&gt;product_quantity){ $in_excess = $quantity_for_same_main_product-$product-&gt;product_quantity; if($quantity&gt;$in_excess){ $quantity=$product-&gt;wanted_quantity=$quantity-$in_excess; $quantity_for_same_main_product=$quantity_for_same_main_product - $in_excess; }else{ $quantity_for_same_main_product=$quantity_for_same_main_product - $quantity; $quantity=$product-&gt;wanted_quantity=0; } }

after the line: Code:

$product-&gt;product_quantity = $parentProduct-&gt;product_quantity;

in the file administrator/components/com_hikashop/classes/cart.php and that should fix the problem (it did on my tests). Please let us know how it goes so that we can publish a hot fix build of the new version or continue to work on the issue.

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

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

- **[lanzanet](/forum/user/7823-lanzanet "View lanzanet's Profile")**
- [![lanzanet's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7823.png)](/forum/user/7823-lanzanet "View lanzanet's Profile") Topic Author
- [ Offline](/forum/user/7823-lanzanet)

Less More

- Posts: 107
- Thank you received: 3
-
-

12 years 7 months ago -  12 years 7 months ago [\#146707](#146707) by [lanzanet](/forum/user/7823-lanzanet "View lanzanet's Profile")  Replied by *[lanzanet](/forum/user/7823-lanzanet "View lanzanet's Profile")* on topic *[Characteristics not working with stock control](/forum/3-bug-report/866345-characteristics-not-working-with-stock-control#146707 "I'm testing my site and I'm still having the characteristics problem. I have a product with two characteristics fields (C1 and C2) and each characteristic has two values (C1-1, C1-2, C2-1, C2-2). If I...")*

Thanks Nicolas. It works!

Only one thing, the message of 'Limit reached. You can't add the product ...' appears in english and I've configured the shop in spanish. Can I change the language message so the clients could understand it?

Thanks!!

Last edit: 12 years 7 months ago by [lanzanet](/forum/user/7823-lanzanet "View lanzanet's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC84NjYzNDUtY2hhcmFjdGVyaXN0aWNzLW5vdC13b3JraW5nLXdpdGgtc3RvY2stY29udHJvbD90bXBsPW1hcmtkb3du) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86320
- Thank you received: 14276
-
-

12 years 7 months ago [\#146718](#146718) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Characteristics not working with stock control](/forum/3-bug-report/866345-characteristics-not-working-with-stock-control#146718 "I'm testing my site and I'm still having the characteristics problem. I have a product with two characteristics fields (C1 and C2) and each characteristic has two values (C1-1, C1-2, C2-1, C2-2). If I...")*

The message is displayed in the current language on my end.
If that's not the case on your website, it probably means that it's just not yet translated for your language and you would have to edit your translation file via the Languages tab of the configuration in order to check on that.

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

- **[lanzanet](/forum/user/7823-lanzanet "View lanzanet's Profile")**
- [![lanzanet's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar7823.png)](/forum/user/7823-lanzanet "View lanzanet's Profile") Topic Author
- [ Offline](/forum/user/7823-lanzanet)

Less More

- Posts: 107
- Thank you received: 3
-
-

12 years 7 months ago [\#146741](#146741) by [lanzanet](/forum/user/7823-lanzanet "View lanzanet's Profile")  Replied by *[lanzanet](/forum/user/7823-lanzanet "View lanzanet's Profile")* on topic *[Characteristics not working with stock control](/forum/3-bug-report/866345-characteristics-not-working-with-stock-control#146741 "I'm testing my site and I'm still having the characteristics problem. I have a product with two characteristics fields (C1 and C2) and each characteristic has two values (C1-1, C1-2, C2-1, C2-2). If I...")*

Hi Nicolas, the LIMIT_REACHED var was not translated in my language file. I've edited it and now it works fine.

Thanks!

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

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

[](#top)
