Skip to main content

Hide price of several products

More
11 years 9 months ago #183693 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.)

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

More
11 years 9 months ago #183696 by Xavier
Hi,

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); }
After:
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
Powered by Kunena Forum