Skip to main content

Hide Quantity and Wishlist When Item Sold Out

More
11 years 6 months ago #196549 by MyWorld
-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.0

If you notice, from the attached pic, the SMALL size is sold out. Should it not automatically hide the "quantity field" and "add to wishlist" option?

I would like those not to display when an size is sold out. How can I do that please?

Thank you!

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #196553 by nicolas
Hi,

No that's normal. A wishlist is a list of the things you would like to purchase in the future while a cart is a list of things ready to be purchased. So you can have out of stock products in a wishlist but not in a cart. That's why you can still add a product to your wishlist even if the product is out of stock.

If you don't want that, you should remove the code:
Code:
if(hikashop_level(1) && $this->params->get('add_to_wishlist') && $wishlistEnabled && !$hideForGuest && $this->config->get('display_add_to_wishlist_for_free_products', 1)) { if(!empty($this->row->has_options)) { if($this->params->get('add_to_cart', 1)) echo $this->cart->displayButton(JText::_('CHOOSE_OPTIONS'),'choose_options',$this->params,hikashop_contentLink('product&task=show&product_id='.$this->row->product_id.'&name='.$this->row->alias.$url_itemid.$this->category_pathway,$this->row),'window.location = \''.str_replace("'","\'",hikashop_contentLink('product&task=show&product_id='.$this->row->product_id.'&name='.$this->row->alias.$url_itemid.$this->category_pathway,$this->row)).'\';return false;',''); }else{ echo '<div id="hikashop_add_wishlist">' . $this->cart->displayButton(JText::_('ADD_TO_WISHLIST'), 'add', $this->params, $url, $wishlistAjax, '', @$this->row->product_max_per_order, 1, '', false) . '</div>'; } }
from the file "quantity" of the view "product" via the menu Display>Views.

Please Log in or Create an account to join the conversation.

Time to create page: 0.143 seconds
Powered by Kunena Forum