I'm having the same problem.
It breaks the page, page becomes white, with only product images and title and product_code not styled, but that's it.
I have the exact same code you used too ( using original from HS 2.6.0)
Php failed to render the rest of the code, so there's an error somewhere in there, ???
Anyways, I wrote a little php as I only need to know if a user form a certain group.
So i just use Joomla functions to get it.
First I made template override for prodcut's listing_price.php to my templates html>com_hikashop>products directory.
The open the copied listing_price.php and added this code:
$user = JFactory::getUser();
//Get group id number array
$usergroup = $user->getAuthorisedGroups();
Then create conditional statement to show the prices you want to show to that group.
if(in_array(10,$usergroup)){
if(isset($this->element->main->product_msrp) && !(@$this->row->product_msrp > 0.0) )
$this->row->product_msrp = $this->element->main->product_msrp;
if(isset($this->row->product_msrp) && @$this->row->product_msrp > 0.0 && JRequest::getCmd('layout') == 'show' && $this->params->get('from_module','') == ''){ ?>
<div class="hikashop_product_msrp_price hikashop_product_price_full">
<span class="hikashop_product_msrp_price_title">
<?php
echo JText::_('PRODUCT_MSRP_BEFORE');
?>
</span>
<span class="hikashop_product_price">
<?php
$mainCurr = $this->currencyHelper->mainCurrency();
$app = JFactory::getApplication();
$currCurrency = $app->getUserState( HIKASHOP_COMPONENT.'.currency_id', $mainCurr );
$msrpCurrencied = $this->currencyHelper->convertUniquePrice($this->row->product_msrp,$mainCurr,$currCurrency);
if($msrpCurrencied == $this->row->product_msrp)
echo $this->currencyHelper->format($this->row->product_msrp,$mainCurr);
else
echo $this->currencyHelper->format($msrpCurrencied,$currCurrency).' ('.$this->currencyHelper->format($this->row->product_msrp,$mainCurr).')';
?>
</span>
</div>
<?php }
}?>
.... further down the page.....
if(in_array(10,$usergroup)){
if(isset($this->row->product_msrp) && @$this->row->product_msrp > 0.0 && JRequest::getCmd('layout') == 'show' && $this->params->get('from_module','') == ''){
echo '<span class="hikashop_product_our_price_title">'.JText::_('PRODUCT_MSRP_AFTER').'</span> ';
}
}
In my case groupid = 10, which is a group I created callled: Retailers.
So now, If log in using a retailers account I see both prices.
Now the I just have to alter the Product's Price ACL ( Prices and taxes section) , enter a 'Retail price' (for retailers) and 'Price' for consume and click the ACL and deselect retailers, I think????
Please Hikashop crew, correct me if I wrong, but shouldn't that disable 'Price' and force Hikashop to use the 'Retail price' ???
Thx in advance.
I wanted isolate the retail price from the price and only show it to retailers who want to buy this stores products.