Hide price of several products
11 years 9 months ago #183693
by Rixters
Hide price of several products was created by Rixters
-- HikaShop version -- : 1410292333
-- Joomla version -- : 3.3.6
Is it possible to hide the price of just several products? (In general I set "Show price" to "yes", but I want to exclude some products because the price differs as it includes custom work.)
-- Joomla version -- : 3.3.6
Is it possible to hide the price of just several products? (In general I set "Show price" to "yes", but I want to exclude some products because the price differs as it includes custom work.)
Please Log in or Create an account to join the conversation.
11 years 9 months ago #183696
by Xavier
Replied by Xavier on topic Hide price of several products
Hi,
Yes you can by editing for example the view "product / listing_img_title" for the default product listing and add code like:
After:
Yes you can by editing for example the view "product / listing_img_title" for the default product listing and add code like:
Code:
$toHide = array('1','2','3');
$defShowPrice = $this->params->get('show_price');
if(in_array($this->row->product_id,$toHide)){
$this->params->set('show_price',0);
}else{
$this->params->set('show_price',$defShowPrice);
}
Code:
if($this->params->get('show_price','-1')=='-1'){
$config =& hikashop_config();
$this->params->set('show_price',$config->get('show_price'));
}
Please Log in or Create an account to join the conversation.
Time to create page: 0.147 seconds