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

#   Wishlist and product quantity

##

- **[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")**
- [![kyratn's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/redswirl.jpg)](/forum/user/38342-kyratn "View kyratn's Profile") Topic Author
- [ Offline](/forum/user/38342-kyratn)

Less More

- Posts: 1119
- Thank you received: 114
-
- [](http://kyra.lt)
-

10 years 8 months ago [\#233235](#233235) by [kyratn](/forum/user/38342-kyratn "View kyratn's Profile")  *[Wishlist and product quantity](/forum/41-wishlist/883072-wishlist-and-product-quantity#233235 "Hi,  Reviewing one of my customers wishlist I noticed wrong wording added on product quantity. If product has quantity of 1 and adding it to wishlist in wishlist page you can see quantity 1 with 1 item in stock, all OK... However adding same product again will give you quantity of 2 and sold out which is a little bit wrong cause 1 product is for sale?  Is this my template/view customization wrong or this is hikashop by default? Is there a way to not add more products then there is in stock? Or add another wording if selected quantity is more then available?")* was created by *[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")*

Hi,

Reviewing one of my customers wishlist I noticed wrong wording added on product quantity.
If product has quantity of 1 and adding it to wishlist in wishlist page you can see quantity 1 with 1 item in stock, all OK...
However adding same product again will give you quantity of 2 and sold out which is a little bit wrong cause 1 product is for sale?

Is this my template/view customization wrong or this is hikashop by default?
Is there a way to not add more products then there is in stock? Or add another wording if selected quantity is more then available?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQxLXdpc2hsaXN0Lzg4MzA3Mi13aXNobGlzdC1hbmQtcHJvZHVjdC1xdWFudGl0eT90bXBsPW1hcmtkb3du) 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: 86586
- Thank you received: 14325
-
-

10 years 8 months ago [\#233250](#233250) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Wishlist and product quantity](/forum/41-wishlist/883072-wishlist-and-product-quantity#233250 "Hi,  Reviewing one of my customers wishlist I noticed wrong wording added on product quantity. If product has quantity of 1 and adding it to wishlist in wishlist page you can see quantity 1 with 1 item in stock, all OK... However adding same product again will give you quantity of 2 and sold out which is a little bit wrong cause 1 product is for sale?  Is this my template/view customization wrong or this is hikashop by default? Is there a way to not add more products then there is in stock? Or add another wording if selected quantity is more then available?")*

Hi,

On my end, the message I have is "Not enough in stock" and not "sold out".
So it works both cases.
So either the file "showcart" of the view "cart" has been modified, or there is a translation override for the translation key NOT_ENOUGH_STOCK which changes the text on your website.

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

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

- **[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")**
- [![kyratn's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/redswirl.jpg)](/forum/user/38342-kyratn "View kyratn's Profile") Topic Author
- [ Offline](/forum/user/38342-kyratn)

Less More

- Posts: 1119
- Thank you received: 114
-
- [](http://kyra.lt)
-

10 years 8 months ago -  10 years 8 months ago [\#233485](#233485) by [kyratn](/forum/user/38342-kyratn "View kyratn's Profile")  Replied by *[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")* on topic *[Wishlist and product quantity](/forum/41-wishlist/883072-wishlist-and-product-quantity#233485 "Hi,  Reviewing one of my customers wishlist I noticed wrong wording added on product quantity. If product has quantity of 1 and adding it to wishlist in wishlist page you can see quantity 1 with 1 item in stock, all OK... However adding same product again will give you quantity of 2 and sold out which is a little bit wrong cause 1 product is for sale?  Is this my template/view customization wrong or this is hikashop by default? Is there a way to not add more products then there is in stock? Or add another wording if selected quantity is more then available?")*

Hi,

Are you sure it is working. Cause I tried with default view of showcart and it was same. Adding same variant again with quantity of 1 to wishlist would give not on sale anymore. Looked into code and I see this: Code:

$stockText = "&lt;span class='hikashop_red_color'&gt;".JText::_('NOT_ENOUGH_STOCK')."&lt;/span&gt;";

but for unknown reason it dosesnt work for me....I also checked language file and everything is fine, no override and default is: Not enough in stock

I think this is the code responsible for this and it is same as in default hikashop view file:
Code:

&lt;?php $app = JFactory::getApplication(); $config =&amp; hikashop_config(); $i = 1; $k = 1; $total_quantity = 0; if(!empty($this-&gt;rows)){ $productClass = hikashop_get('class.product'); $group = $this-&gt;config-&gt;get('group_options',0); foreach($this-&gt;rows as $cart){ if($group &amp;&amp; $cart-&gt;cart_product_option_parent_id) continue; if(!@$cart-&gt;hide){ $total_quantity += $cart-&gt;cart_product_quantity; $productClass-&gt;addAlias($cart); $quantityLeft = $cart-&gt;product_quantity - $cart-&gt;cart_product_quantity; $inStock = 1; if(($cart-&gt;product_quantity - $cart-&gt;cart_product_quantity) &gt;= 0 &#124;&#124; $cart-&gt;product_quantity == -1){ if($cart-&gt;product_quantity == -1) $stockText = "&lt;span class='hikashop_green_color'&gt;".JText::sprintf('X_ITEMS_IN_STOCK',JText::_('HIKA_UNLIMITED'))."&lt;/span&gt;"; else $stockText = "&lt;span class='hikashop_green_color'&gt;".JText::sprintf('X_ITEMS_IN_STOCK',$cart-&gt;product_quantity)."&lt;/span&gt;"; }else{ if($cart-&gt;product_code != @$cart-&gt;cart_product_code){ $stockText = "&lt;span class='hikashop_red_color'&gt;".JText::_('HIKA_NOT_SALE_ANYMORE'). "&lt;/span&gt;"; }else{ $stockText = "&lt;span class='hikashop_red_color'&gt;".JText::_('NOT_ENOUGH_STOCK')."&lt;/span&gt;"; } $inStock = 0; } if($k ==1)$k = 0;else $k =1; ?&gt;

So what could be the problem?

Regards

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQxLXdpc2hsaXN0Lzg4MzA3Mi13aXNobGlzdC1hbmQtcHJvZHVjdC1xdWFudGl0eT90bXBsPW1hcmtkb3du) 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: 86586
- Thank you received: 14325
-
-

10 years 8 months ago [\#233512](#233512) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Wishlist and product quantity](/forum/41-wishlist/883072-wishlist-and-product-quantity#233512 "Hi,  Reviewing one of my customers wishlist I noticed wrong wording added on product quantity. If product has quantity of 1 and adding it to wishlist in wishlist page you can see quantity 1 with 1 item in stock, all OK... However adding same product again will give you quantity of 2 and sold out which is a little bit wrong cause 1 product is for sale?  Is this my template/view customization wrong or this is hikashop by default? Is there a way to not add more products then there is in stock? Or add another wording if selected quantity is more then available?")*

Hi,

It's indeed that piece of code which handle that. But as you can see there, there is no "sold out" message.
Maybe there is a misunderstanding ? Are you talking about the "Not on sale anymore" message ?

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

- **[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")**
- [![kyratn's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/redswirl.jpg)](/forum/user/38342-kyratn "View kyratn's Profile") Topic Author
- [ Offline](/forum/user/38342-kyratn)

Less More

- Posts: 1119
- Thank you received: 114
-
- [](http://kyra.lt)
-

10 years 8 months ago [\#233540](#233540) by [kyratn](/forum/user/38342-kyratn "View kyratn's Profile")  Replied by *[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")* on topic *[Wishlist and product quantity](/forum/41-wishlist/883072-wishlist-and-product-quantity#233540 "Hi,  Reviewing one of my customers wishlist I noticed wrong wording added on product quantity. If product has quantity of 1 and adding it to wishlist in wishlist page you can see quantity 1 with 1 item in stock, all OK... However adding same product again will give you quantity of 2 and sold out which is a little bit wrong cause 1 product is for sale?  Is this my template/view customization wrong or this is hikashop by default? Is there a way to not add more products then there is in stock? Or add another wording if selected quantity is more then available?")*

Hi,

Well yes, i am talking about not on sale anymore message. Which will show if item is sold out. However it will show again when adding 2 products which has stock quantity 1...Shouldnt message be displayed Not enough stock???

Problem is that if customer has 1 product in wishlist and will add it again. In hes wishlist he will see that item is not on sale anymore which is wrong. I hope you understand what i want to say??

Thanks

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

10 years 8 months ago [\#233582](#233582) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Wishlist and product quantity](/forum/41-wishlist/883072-wishlist-and-product-quantity#233582 "Hi,  Reviewing one of my customers wishlist I noticed wrong wording added on product quantity. If product has quantity of 1 and adding it to wishlist in wishlist page you can see quantity 1 with 1 item in stock, all OK... However adding same product again will give you quantity of 2 and sold out which is a little bit wrong cause 1 product is for sale?  Is this my template/view customization wrong or this is hikashop by default? Is there a way to not add more products then there is in stock? Or add another wording if selected quantity is more then available?")*

Hi,

Yes indeed the message "Not enough stock" should be displayed instead.
In your case the code creating the issue seems to be: Code:

if($cart-&gt;product_code != @$cart-&gt;cart_product_code){

So please replace it by: Code:

if($cart-&gt;product_quantity == 0){

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

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

- **[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")**
- [![kyratn's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/gallery/redswirl.jpg)](/forum/user/38342-kyratn "View kyratn's Profile") Topic Author
- [ Offline](/forum/user/38342-kyratn)

Less More

- Posts: 1119
- Thank you received: 114
-
- [](http://kyra.lt)
-

10 years 8 months ago [\#233615](#233615) by [kyratn](/forum/user/38342-kyratn "View kyratn's Profile")  Replied by *[kyratn](/forum/user/38342-kyratn "View kyratn's Profile")* on topic *[Wishlist and product quantity](/forum/41-wishlist/883072-wishlist-and-product-quantity#233615 "Hi,  Reviewing one of my customers wishlist I noticed wrong wording added on product quantity. If product has quantity of 1 and adding it to wishlist in wishlist page you can see quantity 1 with 1 item in stock, all OK... However adding same product again will give you quantity of 2 and sold out which is a little bit wrong cause 1 product is for sale?  Is this my template/view customization wrong or this is hikashop by default? Is there a way to not add more products then there is in stock? Or add another wording if selected quantity is more then available?")*

Hi,

Thank you Xavier it has fixed the issue.

Best Regards

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

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