- Posts: 966
- Thank you received: 11
Hide Quantity and Wishlist When Item Sold Out
11 years 6 months ago #196549
by MyWorld
Hide Quantity and Wishlist When Item Sold Out was created 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!
-- 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.
11 years 6 months ago #196553
by nicolas
Replied by nicolas on topic Hide Quantity and Wishlist When Item Sold Out
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:
from the file "quantity" of the view "product" via the menu Display>Views.
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>';
}
}
Please Log in or Create an account to join the conversation.
Time to create page: 0.143 seconds