[Skip to main content](#vessel-content)

#   No prices displayed until member registered

##

- **[tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")**
- [![tjharvey's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-02-07.jpg)](/forum/user/9960-tjharvey "View tjharvey's Profile") Topic Author
- [ Offline](/forum/user/9960-tjharvey)

Less More

- Posts: 206
- Thank you received: 26
-
-
-
- [](http://www.UK-LEDs.com)
-

13 years 9 months ago [\#88406](#88406) by [tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")  *[No prices displayed until member registered](/forum/4-how-to/78013-no-prices-displayed-until-member-registered#88406 "I have a site where i want to have the products showing, however no prices displayed until they're registered, Is there a way that can do this?")* was created by *[tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")*

I have a site where i want to have the products showing, however no prices displayed until they're registered, Is there a way that can do this?

---

I'm not an expert at this, if i post on your thread i'm doing so with the best of my knowledge and just trying to help ![:)](/media/kunena/emoticons/3.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc4MDEzLW5vLXByaWNlcy1kaXNwbGF5ZWQtdW50aWwtbWVtYmVyLXJlZ2lzdGVyZWQ/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 8 months ago [\#88552](#88552) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[No prices displayed until member registered](/forum/4-how-to/78013-no-prices-displayed-until-member-registered#88552 "I have a site where i want to have the products showing, however no prices displayed until they're registered, Is there a way that can do this?")*

I think that you will have to edit the views "product / listing_price" and add a check on the user to display or not the price.

The check should be something like: Code:

if(hikashop_loadUser() != null){ ... }

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc4MDEzLW5vLXByaWNlcy1kaXNwbGF5ZWQtdW50aWwtbWVtYmVyLXJlZ2lzdGVyZWQ/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")**
- [![tjharvey's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-02-07.jpg)](/forum/user/9960-tjharvey "View tjharvey's Profile") Topic Author
- [ Offline](/forum/user/9960-tjharvey)

Less More

- Posts: 206
- Thank you received: 26
-
-
-
- [](http://www.UK-LEDs.com)
-

13 years 8 months ago -  13 years 8 months ago [\#88592](#88592) by [tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")  Replied by *[tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")* on topic *[No prices displayed until member registered](/forum/4-how-to/78013-no-prices-displayed-until-member-registered#88592 "I have a site where i want to have the products showing, however no prices displayed until they're registered, Is there a way that can do this?")*

> Xavier wrote: I think that you will have to edit the views "product / listing\_price" and add a check on the user to display or not the price.
>
> The check should be something like:
>
> Code:
>
> if(hikashop_loadUser() != null){ ... }

Code:

Code of the view "product &#124; listing_price"

That's the code that comes up, where would i add it?

Also once they're registered (and i put them in a specific user group) how would i do this? (with the prices then being displayed)

---

I'm not an expert at this, if i post on your thread i'm doing so with the best of my knowledge and just trying to help ![:)](/media/kunena/emoticons/3.png ":)")

Last edit: 13 years 8 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc4MDEzLW5vLXByaWNlcy1kaXNwbGF5ZWQtdW50aWwtbWVtYmVyLXJlZ2lzdGVyZWQ/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

13 years 8 months ago [\#88636](#88636) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[No prices displayed until member registered](/forum/4-how-to/78013-no-prices-displayed-until-member-registered#88636 "I have a site where i want to have the products showing, however no prices displayed until they're registered, Is there a way that can do this?")*

Hi,

You can use replace Code:

&lt;span class="hikashop_product_price_full&lt;?php echo $class; ?&gt;"&gt; &lt;?php if(empty($this-&gt;row-&gt;prices)){ echo JText::_('FREE_PRICE'); }else{

By Code:

&lt;span class="hikashop_product_price_full&lt;?php echo $class; ?&gt;"&gt; &lt;?php if(empty($this-&gt;row-&gt;prices)){ echo JText::_('FREE_PRICE'); } else if(hikashop_loadUser() == null){ echo JText::_('PLEASE_LOGIN'); // Or any other text } else {

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc4MDEzLW5vLXByaWNlcy1kaXNwbGF5ZWQtdW50aWwtbWVtYmVyLXJlZ2lzdGVyZWQ/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")**
- [![tjharvey's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-02-07.jpg)](/forum/user/9960-tjharvey "View tjharvey's Profile") Topic Author
- [ Offline](/forum/user/9960-tjharvey)

Less More

- Posts: 206
- Thank you received: 26
-
-
-
- [](http://www.UK-LEDs.com)
-

13 years 8 months ago [\#88641](#88641) by [tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")  Replied by *[tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")* on topic *[No prices displayed until member registered](/forum/4-how-to/78013-no-prices-displayed-until-member-registered#88641 "I have a site where i want to have the products showing, however no prices displayed until they're registered, Is there a way that can do this?")*

Hi Jerome,

I tried this and it didn't work, [ tradelights.co.uk/index.php/product/35-p...w-e27-40w-equivalent](http://tradelights.co.uk/index.php/product/35-pharox-400-screw-e27-40w-equivalent)

Thanks

Tom

---

I'm not an expert at this, if i post on your thread i'm doing so with the best of my knowledge and just trying to help ![:)](/media/kunena/emoticons/3.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc4MDEzLW5vLXByaWNlcy1kaXNwbGF5ZWQtdW50aWwtbWVtYmVyLXJlZ2lzdGVyZWQ/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 8 months ago [\#88760](#88760) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[No prices displayed until member registered](/forum/4-how-to/78013-no-prices-displayed-until-member-registered#88760 "I have a site where i want to have the products showing, however no prices displayed until they're registered, Is there a way that can do this?")*

Hi,

That's because in the code previously given, if the price is free it's displayed if the user is registered or not.
To hide it too when the price is free, you can use this code: Code:

if(hikashop_loadUser() == null){ echo JText::_('PLEASE_LOGIN'); // Or any other text } else {

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc4MDEzLW5vLXByaWNlcy1kaXNwbGF5ZWQtdW50aWwtbWVtYmVyLXJlZ2lzdGVyZWQ/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")**
- [![tjharvey's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-02-07.jpg)](/forum/user/9960-tjharvey "View tjharvey's Profile") Topic Author
- [ Offline](/forum/user/9960-tjharvey)

Less More

- Posts: 206
- Thank you received: 26
-
-
-
- [](http://www.UK-LEDs.com)
-

13 years 8 months ago -  13 years 8 months ago [\#88761](#88761) by [tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")  Replied by *[tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")* on topic *[No prices displayed until member registered](/forum/4-how-to/78013-no-prices-displayed-until-member-registered#88761 "I have a site where i want to have the products showing, however no prices displayed until they're registered, Is there a way that can do this?")*

> Xavier wrote: Hi,
>
> That's because in the code previously given, if the price is free it's displayed if the user is registered or not.
> To hide it too when the price is free, you can use this code:
>
> Code:
>
> if(hikashop_loadUser() == null){ echo JText::_('PLEASE_LOGIN'); // Or any other text } else {

This code is in the modification which Jerome gave to me:

> Jerome wrote: Hi,
>
> You can use replace
>
> Code:
>
>  &lt;span class="hikashop_product_price_full&lt;?php echo $class; ?&gt;"&gt; &lt;?php if(empty($this-&gt;row-&gt;prices)){ echo JText::_('FREE_PRICE'); }else{
>
>
>
> By Code:
>
>  &lt;span class="hikashop_product_price_full&lt;?php echo $class; ?&gt;"&gt; &lt;?php if(empty($this-&gt;row-&gt;prices)){ echo JText::_('FREE_PRICE'); } else if(hikashop_loadUser() == null){ echo JText::_('PLEASE_LOGIN'); // Or any other text } else {
>
>
>
>
> Regards,

However it's still not working ![:/](/irritated.gif ":/")

---

I'm not an expert at this, if i post on your thread i'm doing so with the best of my knowledge and just trying to help ![:)](/media/kunena/emoticons/3.png ":)")

Last edit: 13 years 8 months ago by [tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc4MDEzLW5vLXByaWNlcy1kaXNwbGF5ZWQtdW50aWwtbWVtYmVyLXJlZ2lzdGVyZWQ/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 8 months ago -  13 years 8 months ago [\#88770](#88770) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[No prices displayed until member registered](/forum/4-how-to/78013-no-prices-displayed-until-member-registered#88770 "I have a site where i want to have the products showing, however no prices displayed until they're registered, Is there a way that can do this?")*

You have to place the loadUser check before the check for the empty price. Code:

&lt;span class="hikashop_product_price_full&lt;?php echo $class; ?&gt;"&gt; &lt;?php if(hikashop_loadUser() == null){ echo JText::_('PLEASE_LOGIN'); // Or any other text continue; } else { if(empty($this-&gt;row-&gt;prices)){ echo JText::_('FREE_PRICE'); }else{

Last edit: 13 years 8 months ago by [Xavier](/forum/user/4105-xavier "View Xavier's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc4MDEzLW5vLXByaWNlcy1kaXNwbGF5ZWQtdW50aWwtbWVtYmVyLXJlZ2lzdGVyZWQ/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")**
- [![tjharvey's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-02-07.jpg)](/forum/user/9960-tjharvey "View tjharvey's Profile") Topic Author
- [ Offline](/forum/user/9960-tjharvey)

Less More

- Posts: 206
- Thank you received: 26
-
-
-
- [](http://www.UK-LEDs.com)
-

13 years 8 months ago [\#88771](#88771) by [tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")  Replied by *[tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")* on topic *[No prices displayed until member registered](/forum/4-how-to/78013-no-prices-displayed-until-member-registered#88771 "I have a site where i want to have the products showing, however no prices displayed until they're registered, Is there a way that can do this?")*

> Xavier wrote: You have to place the loadUser check before the check for the empty price.
>
> Code:
>
> &lt;span class="hikashop_product_price_full&lt;?php echo $class; ?&gt;"&gt; &lt;?php if(hikashop_loadUser() == null){ echo JText::_('PLEASE_LOGIN'); // Or any other text continue; } else { if(empty($this-&gt;row-&gt;prices)){ echo JText::_('FREE_PRICE'); }else{

Still not working ![:/](/irritated.gif ":/")
[ tradelights.co.uk/index.php/product/35-p...w-e27-40w-equivalent](http://tradelights.co.uk/index.php/product/35-pharox-400-screw-e27-40w-equivalent)

Here's the code:
Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 2.0.0 * @author hikashop.com * @copyright (C) 2010-2012 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;span class="hikashop_product_price_full&lt;?php echo $class; ?&gt;"&gt; &lt;?php if(hikashop_loadUser() == null){ echo JText::_('PLEASE_LOGIN'); // Or any other text continue; } else { if(empty($this-&gt;row-&gt;prices)){ echo JText::_('FREE_PRICE'); }else{ $first=true; echo JText::_('PRICE_BEGINNING'); foreach($this-&gt;row-&gt;prices as $price){ if($first)$first=false; else echo JText::_('PRICE_SEPARATOR'); if(!empty($this-&gt;unit) &amp;&amp; isset($price-&gt;unit_price)){ $price =&amp; $price-&gt;unit_price; } if(!isset($price-&gt;price_currency_id))$price-&gt;price_currency_id = hikashop_getCurrency(); echo '&lt;span class="hikashop_product_price"&gt;'; if($this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value_with_tax,$price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax')==2&#124;&#124;!$this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value,$price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_AFTER_TAX'); } if($this-&gt;params-&gt;get('show_original_price','-1')=='-1'){ $config =&amp; hikashop_config(); $defaultParams = $config-&gt;get('default_params'); $this-&gt;params-&gt;set('show_original_price',$defaultParams['show_original_price']); } if($this-&gt;params-&gt;get('show_original_price') &amp;&amp; !empty($price-&gt;price_orig_value)){ echo JText::_('PRICE_BEFORE_ORIG'); if($this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value_with_tax,$price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax')==2&#124;&#124;!$this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value,$price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_AFTER_TAX'); } echo JText::_('PRICE_AFTER_ORIG'); } echo '&lt;/span&gt; '; if(!empty($this-&gt;row-&gt;discount)){ if($this-&gt;params-&gt;get('show_discount',3)==3){ $config =&amp; hikashop_config(); $defaultParams = $config-&gt;get('default_params'); $this-&gt;params-&gt;set('show_discount',$defaultParams['show_discount']); } if($this-&gt;params-&gt;get('show_discount')==1){ echo '&lt;span class="hikashop_product_discount"&gt;'.JText::_('PRICE_DISCOUNT_START'); if(bccomp($this-&gt;row-&gt;discount-&gt;discount_flat_amount,0,5)!==0){ echo $this-&gt;currencyHelper-&gt;format(-1*$this-&gt;row-&gt;discount-&gt;discount_flat_amount,$price-&gt;price_currency_id); }else{ echo -1*$this-&gt;row-&gt;discount-&gt;discount_percent_amount.'%'; } echo JText::_('PRICE_DISCOUNT_END').'&lt;/span&gt;'; }elseif($this-&gt;params-&gt;get('show_discount')==2){ echo '&lt;span class="hikashop_product_price_before_discount"&gt;'.JText::_('PRICE_DISCOUNT_START'); if($this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value_without_discount_with_tax,$price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax')==2&#124;&#124;!$this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value_without_discount,$price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_AFTER_TAX'); } if($this-&gt;params-&gt;get('show_original_price') &amp;&amp; !empty($price-&gt;price_orig_value_without_discount_with_tax)){ echo JText::_('PRICE_BEFORE_ORIG'); if($this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value_without_discount_with_tax,$price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax')==2&#124;&#124;!$this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value_without_discount,$price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_AFTER_TAX'); } echo JText::_('PRICE_AFTER_ORIG'); } echo JText::_('PRICE_DISCOUNT_END').'&lt;/span&gt;'; } } } echo JText::_('PRICE_END'); } ?&gt;&lt;/span&gt;

---

I'm not an expert at this, if i post on your thread i'm doing so with the best of my knowledge and just trying to help ![:)](/media/kunena/emoticons/3.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc4MDEzLW5vLXByaWNlcy1kaXNwbGF5ZWQtdW50aWwtbWVtYmVyLXJlZ2lzdGVyZWQ/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 8 months ago [\#88841](#88841) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[No prices displayed until member registered](/forum/4-how-to/78013-no-prices-displayed-until-member-registered#88841 "I have a site where i want to have the products showing, however no prices displayed until they're registered, Is there a way that can do this?")*

Sorry, I gave you a wrong code, thanks to use this one: Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 2.0.0 * @author hikashop.com * @copyright (C) 2010-2012 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;span class="hikashop_product_price_full&lt;?php echo $class; ?&gt;"&gt; &lt;?php if(hikashop_loadUser() == null){ echo JText::_('PLEASE_LOGIN'); // Or any other text } else if(empty($this-&gt;row-&gt;prices)) { echo JText::_('FREE_PRICE'); }else{ $first=true; echo JText::_('PRICE_BEGINNING'); foreach($this-&gt;row-&gt;prices as $price){ if($first)$first=false; else echo JText::_('PRICE_SEPARATOR'); if(!empty($this-&gt;unit) &amp;&amp; isset($price-&gt;unit_price)){ $price =&amp; $price-&gt;unit_price; } if(!isset($price-&gt;price_currency_id))$price-&gt;price_currency_id = hikashop_getCurrency(); echo '&lt;span class="hikashop_product_price"&gt;'; if($this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value_with_tax,$price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax')==2&#124;&#124;!$this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value,$price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_AFTER_TAX'); } if($this-&gt;params-&gt;get('show_original_price','-1')=='-1'){ $config =&amp; hikashop_config(); $defaultParams = $config-&gt;get('default_params'); $this-&gt;params-&gt;set('show_original_price',$defaultParams['show_original_price']); } if($this-&gt;params-&gt;get('show_original_price') &amp;&amp; !empty($price-&gt;price_orig_value)){ echo JText::_('PRICE_BEFORE_ORIG'); if($this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value_with_tax,$price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax')==2&#124;&#124;!$this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value,$price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_AFTER_TAX'); } echo JText::_('PRICE_AFTER_ORIG'); } echo '&lt;/span&gt; '; if(!empty($this-&gt;row-&gt;discount)){ if($this-&gt;params-&gt;get('show_discount',3)==3){ $config =&amp; hikashop_config(); $defaultParams = $config-&gt;get('default_params'); $this-&gt;params-&gt;set('show_discount',$defaultParams['show_discount']); } if($this-&gt;params-&gt;get('show_discount')==1){ echo '&lt;span class="hikashop_product_discount"&gt;'.JText::_('PRICE_DISCOUNT_START'); if(bccomp($this-&gt;row-&gt;discount-&gt;discount_flat_amount,0,5)!==0){ echo $this-&gt;currencyHelper-&gt;format(-1*$this-&gt;row-&gt;discount-&gt;discount_flat_amount,$price-&gt;price_currency_id); }else{ echo -1*$this-&gt;row-&gt;discount-&gt;discount_percent_amount.'%'; } echo JText::_('PRICE_DISCOUNT_END').'&lt;/span&gt;'; }elseif($this-&gt;params-&gt;get('show_discount')==2){ echo '&lt;span class="hikashop_product_price_before_discount"&gt;'.JText::_('PRICE_DISCOUNT_START'); if($this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value_without_discount_with_tax,$price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax')==2&#124;&#124;!$this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value_without_discount,$price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_AFTER_TAX'); } if($this-&gt;params-&gt;get('show_original_price') &amp;&amp; !empty($price-&gt;price_orig_value_without_discount_with_tax)){ echo JText::_('PRICE_BEFORE_ORIG'); if($this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value_without_discount_with_tax,$price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax')==2&#124;&#124;!$this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value_without_discount,$price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_AFTER_TAX'); } echo JText::_('PRICE_AFTER_ORIG'); } echo JText::_('PRICE_DISCOUNT_END').'&lt;/span&gt;'; } } } echo JText::_('PRICE_END'); } ?&gt;&lt;/span&gt;

The following user(s) said Thank You: [tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc4MDEzLW5vLXByaWNlcy1kaXNwbGF5ZWQtdW50aWwtbWVtYmVyLXJlZ2lzdGVyZWQ/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")**
- [![tjharvey's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-02-07.jpg)](/forum/user/9960-tjharvey "View tjharvey's Profile") Topic Author
- [ Offline](/forum/user/9960-tjharvey)

Less More

- Posts: 206
- Thank you received: 26
-
-
-
- [](http://www.UK-LEDs.com)
-

13 years 8 months ago -  13 years 8 months ago [\#88845](#88845) by [tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")  Replied by *[tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")* on topic *[No prices displayed until member registered](/forum/4-how-to/78013-no-prices-displayed-until-member-registered#88845 "I have a site where i want to have the products showing, however no prices displayed until they're registered, Is there a way that can do this?")*

Hi Xavier,

Here's what i'm getting:
[ tradelights.co.uk/product/122-pharox-200...-20w-equivalent.html](http://tradelights.co.uk/product/122-pharox-200-screw-e27-20w-equivalent.html)

If you wish to login and try you've got an account with:
HikaShop
WY0P7B5Z

(user/pw)

Also, i can see all the displayed prices now (for different user groups, even though they're set at different levels)
Also Xavier, congratulations on 500 "Thank You"'s

---

I'm not an expert at this, if i post on your thread i'm doing so with the best of my knowledge and just trying to help ![:)](/media/kunena/emoticons/3.png ":)")

Last edit: 13 years 8 months ago by [tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc4MDEzLW5vLXByaWNlcy1kaXNwbGF5ZWQtdW50aWwtbWVtYmVyLXJlZ2lzdGVyZWQ/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 8 months ago [\#88925](#88925) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[No prices displayed until member registered](/forum/4-how-to/78013-no-prices-displayed-until-member-registered#88925 "I have a site where i want to have the products showing, however no prices displayed until they're registered, Is there a way that can do this?")*

Hi,

Thanks ![:)](/media/kunena/emoticons/3.png ":)")
Concerning the logs they don't work. Could you check that ?

Just to be sure of what you are needing, you want to hide the price and the add to cart button to all the not registered customers but display it for the registered ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc4MDEzLW5vLXByaWNlcy1kaXNwbGF5ZWQtdW50aWwtbWVtYmVyLXJlZ2lzdGVyZWQ/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")**
- [![tjharvey's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-02-07.jpg)](/forum/user/9960-tjharvey "View tjharvey's Profile") Topic Author
- [ Offline](/forum/user/9960-tjharvey)

Less More

- Posts: 206
- Thank you received: 26
-
-
-
- [](http://www.UK-LEDs.com)
-

13 years 8 months ago [\#88926](#88926) by [tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")  Replied by *[tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")* on topic *[No prices displayed until member registered](/forum/4-how-to/78013-no-prices-displayed-until-member-registered#88926 "I have a site where i want to have the products showing, however no prices displayed until they're registered, Is there a way that can do this?")*

Logs being login?

Yeah that's all right except its not when they register, when they are approved (and put into a custom user group) then I'd like the price displayed.

---

I'm not an expert at this, if i post on your thread i'm doing so with the best of my knowledge and just trying to help ![:)](/media/kunena/emoticons/3.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc4MDEzLW5vLXByaWNlcy1kaXNwbGF5ZWQtdW50aWwtbWVtYmVyLXJlZ2lzdGVyZWQ/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 8 months ago [\#88963](#88963) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[No prices displayed until member registered](/forum/4-how-to/78013-no-prices-displayed-until-member-registered#88963 "I have a site where i want to have the products showing, however no prices displayed until they're registered, Is there a way that can do this?")*

Yes I mean login. I can't login with the username and password given.

To restrict to a certain group, you will have to check on the user group so use something like:
$regUser = hikashop_loadUser()
if($regUser == null &#124;&#124; !in_array('theGroupID',$regUser-&gt;group_id){

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc4MDEzLW5vLXByaWNlcy1kaXNwbGF5ZWQtdW50aWwtbWVtYmVyLXJlZ2lzdGVyZWQ/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")**
- [![tjharvey's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-02-07.jpg)](/forum/user/9960-tjharvey "View tjharvey's Profile") Topic Author
- [ Offline](/forum/user/9960-tjharvey)

Less More

- Posts: 206
- Thank you received: 26
-
-
-
- [](http://www.UK-LEDs.com)
-

13 years 8 months ago [\#88979](#88979) by [tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")  Replied by *[tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")* on topic *[No prices displayed until member registered](/forum/4-how-to/78013-no-prices-displayed-until-member-registered#88979 "I have a site where i want to have the products showing, however no prices displayed until they're registered, Is there a way that can do this?")*

The id is 9, so would it be:

$regUser = hikashop_loadUser()
if($regUser == null &#124;&#124; !in_array('9',$regUser-&gt;group_id){

try:

HikaShop
hikashop

as the user/pw

---

I'm not an expert at this, if i post on your thread i'm doing so with the best of my knowledge and just trying to help ![:)](/media/kunena/emoticons/3.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc4MDEzLW5vLXByaWNlcy1kaXNwbGF5ZWQtdW50aWwtbWVtYmVyLXJlZ2lzdGVyZWQ/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 8 months ago [\#89010](#89010) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[No prices displayed until member registered](/forum/4-how-to/78013-no-prices-displayed-until-member-registered#89010 "I have a site where i want to have the products showing, however no prices displayed until they're registered, Is there a way that can do this?")*

You will need something like: Code:

&lt;?php $regUser = hikashop_loadUser(true); if($regUser != null){ $db = JFactory::getDBO(); $query = 'SELECT group_id FROM '.hikashop_table('user_usergroup_map',false).' WHERE user_id ='.$regUser-&gt;user_cms_id; $db-&gt;setQuery($query); $regUser = $db-&gt;loadResultArray(); }else{ $regUser = array(); } if(!in_array('9',$regUser)){ echo "Hide the price"; } ?&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc4MDEzLW5vLXByaWNlcy1kaXNwbGF5ZWQtdW50aWwtbWVtYmVyLXJlZ2lzdGVyZWQ/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")**
- [![tjharvey's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-02-07.jpg)](/forum/user/9960-tjharvey "View tjharvey's Profile") Topic Author
- [ Offline](/forum/user/9960-tjharvey)

Less More

- Posts: 206
- Thank you received: 26
-
-
-
- [](http://www.UK-LEDs.com)
-

13 years 8 months ago [\#89012](#89012) by [tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")  Replied by *[tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")* on topic *[No prices displayed until member registered](/forum/4-how-to/78013-no-prices-displayed-until-member-registered#89012 "I have a site where i want to have the products showing, however no prices displayed until they're registered, Is there a way that can do this?")*

> Xavier wrote: You will need something like:
>
> Code:
>
> &lt;?php $regUser = hikashop_loadUser(true); if($regUser != null){ $db = JFactory::getDBO(); $query = 'SELECT group_id FROM '.hikashop_table('user_usergroup_map',false).' WHERE user_id ='.$regUser-&gt;user_cms_id; $db-&gt;setQuery($query); $regUser = $db-&gt;loadResultArray(); }else{ $regUser = array(); } if(!in_array('9',$regUser)){ echo "Hide the price"; } ?&gt;

So that would become:
Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 2.0.0 * @author hikashop.com * @copyright (C) 2010-2012 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;span class="hikashop_product_price_full&lt;?php echo $class; ?&gt;"&gt; &lt;?php $regUser = hikashop_loadUser(true); if($regUser != null){ $db = JFactory::getDBO(); $query = 'SELECT group_id FROM '.hikashop_table('user_usergroup_map',false).' WHERE user_id ='.$regUser-&gt;user_cms_id; $db-&gt;setQuery($query); $regUser = $db-&gt;loadResultArray(); }else{ $regUser = array(); } if(!in_array('9',$regUser)){ echo "Hide the price"; } ?&gt; $first=true; echo JText::_('PRICE_BEGINNING'); foreach($this-&gt;row-&gt;prices as $price){ if($first)$first=false; else echo JText::_('PRICE_SEPARATOR'); if(!empty($this-&gt;unit) &amp;&amp; isset($price-&gt;unit_price)){ $price =&amp; $price-&gt;unit_price; } if(!isset($price-&gt;price_currency_id))$price-&gt;price_currency_id = hikashop_getCurrency(); echo '&lt;span class="hikashop_product_price"&gt;'; if($this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value_with_tax,$price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax')==2&#124;&#124;!$this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value,$price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_AFTER_TAX'); } if($this-&gt;params-&gt;get('show_original_price','-1')=='-1'){ $config =&amp; hikashop_config(); $defaultParams = $config-&gt;get('default_params'); $this-&gt;params-&gt;set('show_original_price',$defaultParams['show_original_price']); } if($this-&gt;params-&gt;get('show_original_price') &amp;&amp; !empty($price-&gt;price_orig_value)){ echo JText::_('PRICE_BEFORE_ORIG'); if($this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value_with_tax,$price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax')==2&#124;&#124;!$this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value,$price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_AFTER_TAX'); } echo JText::_('PRICE_AFTER_ORIG'); } echo '&lt;/span&gt; '; if(!empty($this-&gt;row-&gt;discount)){ if($this-&gt;params-&gt;get('show_discount',3)==3){ $config =&amp; hikashop_config(); $defaultParams = $config-&gt;get('default_params'); $this-&gt;params-&gt;set('show_discount',$defaultParams['show_discount']); } if($this-&gt;params-&gt;get('show_discount')==1){ echo '&lt;span class="hikashop_product_discount"&gt;'.JText::_('PRICE_DISCOUNT_START'); if(bccomp($this-&gt;row-&gt;discount-&gt;discount_flat_amount,0,5)!==0){ echo $this-&gt;currencyHelper-&gt;format(-1*$this-&gt;row-&gt;discount-&gt;discount_flat_amount,$price-&gt;price_currency_id); }else{ echo -1*$this-&gt;row-&gt;discount-&gt;discount_percent_amount.'%'; } echo JText::_('PRICE_DISCOUNT_END').'&lt;/span&gt;'; }elseif($this-&gt;params-&gt;get('show_discount')==2){ echo '&lt;span class="hikashop_product_price_before_discount"&gt;'.JText::_('PRICE_DISCOUNT_START'); if($this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value_without_discount_with_tax,$price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax')==2&#124;&#124;!$this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value_without_discount,$price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_AFTER_TAX'); } if($this-&gt;params-&gt;get('show_original_price') &amp;&amp; !empty($price-&gt;price_orig_value_without_discount_with_tax)){ echo JText::_('PRICE_BEFORE_ORIG'); if($this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value_without_discount_with_tax,$price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax')==2&#124;&#124;!$this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value_without_discount,$price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_AFTER_TAX'); } echo JText::_('PRICE_AFTER_ORIG'); } echo JText::_('PRICE_DISCOUNT_END').'&lt;/span&gt;'; } } } echo JText::_('PRICE_END'); } ?&gt;&lt;/span&gt;

Right?

---

I'm not an expert at this, if i post on your thread i'm doing so with the best of my knowledge and just trying to help ![:)](/media/kunena/emoticons/3.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc4MDEzLW5vLXByaWNlcy1kaXNwbGF5ZWQtdW50aWwtbWVtYmVyLXJlZ2lzdGVyZWQ/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 8 months ago [\#89114](#89114) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[No prices displayed until member registered](/forum/4-how-to/78013-no-prices-displayed-until-member-registered#89114 "I have a site where i want to have the products showing, however no prices displayed until they're registered, Is there a way that can do this?")*

Code:

&lt;?php /** * @package HikaShop for Joomla! * @version 2.0.0 * @author hikashop.com * @copyright (C) 2010-2012 HIKARI SOFTWARE. All rights reserved. * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html */ defined('_JEXEC') or die('Restricted access'); ?&gt;&lt;span class="hikashop_product_price_full&lt;?php echo $class; ?&gt;"&gt; &lt;?php $regUser = hikashop_loadUser(true); if($regUser != null){ $db = JFactory::getDBO(); $query = 'SELECT group_id FROM '.hikashop_table('user_usergroup_map',false).' WHERE user_id ='.$regUser-&gt;user_cms_id; $db-&gt;setQuery($query); $regUser = $db-&gt;loadResultArray(); }else{ $regUser = array(); } if(!in_array('9',$regUser)){ echo JText::_('PLEASE_LOGIN'); // Or any other text } else if(empty($this-&gt;row-&gt;prices)) { echo JText::_('FREE_PRICE'); }else{ $first=true; echo JText::_('PRICE_BEGINNING'); foreach($this-&gt;row-&gt;prices as $price){ if($first)$first=false; else echo JText::_('PRICE_SEPARATOR'); if(!empty($this-&gt;unit) &amp;&amp; isset($price-&gt;unit_price)){ $price =&amp; $price-&gt;unit_price; } if(!isset($price-&gt;price_currency_id))$price-&gt;price_currency_id = hikashop_getCurrency(); echo '&lt;span class="hikashop_product_price"&gt;'; if($this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value_with_tax,$price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax')==2&#124;&#124;!$this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value,$price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_AFTER_TAX'); } if($this-&gt;params-&gt;get('show_original_price','-1')=='-1'){ $config =&amp; hikashop_config(); $defaultParams = $config-&gt;get('default_params'); $this-&gt;params-&gt;set('show_original_price',$defaultParams['show_original_price']); } if($this-&gt;params-&gt;get('show_original_price') &amp;&amp; !empty($price-&gt;price_orig_value)){ echo JText::_('PRICE_BEFORE_ORIG'); if($this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value_with_tax,$price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax')==2&#124;&#124;!$this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value,$price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_AFTER_TAX'); } echo JText::_('PRICE_AFTER_ORIG'); } echo '&lt;/span&gt; '; if(!empty($this-&gt;row-&gt;discount)){ if($this-&gt;params-&gt;get('show_discount',3)==3){ $config =&amp; hikashop_config(); $defaultParams = $config-&gt;get('default_params'); $this-&gt;params-&gt;set('show_discount',$defaultParams['show_discount']); } if($this-&gt;params-&gt;get('show_discount')==1){ echo '&lt;span class="hikashop_product_discount"&gt;'.JText::_('PRICE_DISCOUNT_START'); if(bccomp($this-&gt;row-&gt;discount-&gt;discount_flat_amount,0,5)!==0){ echo $this-&gt;currencyHelper-&gt;format(-1*$this-&gt;row-&gt;discount-&gt;discount_flat_amount,$price-&gt;price_currency_id); }else{ echo -1*$this-&gt;row-&gt;discount-&gt;discount_percent_amount.'%'; } echo JText::_('PRICE_DISCOUNT_END').'&lt;/span&gt;'; }elseif($this-&gt;params-&gt;get('show_discount')==2){ echo '&lt;span class="hikashop_product_price_before_discount"&gt;'.JText::_('PRICE_DISCOUNT_START'); if($this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value_without_discount_with_tax,$price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax')==2&#124;&#124;!$this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_value_without_discount,$price-&gt;price_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_AFTER_TAX'); } if($this-&gt;params-&gt;get('show_original_price') &amp;&amp; !empty($price-&gt;price_orig_value_without_discount_with_tax)){ echo JText::_('PRICE_BEFORE_ORIG'); if($this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value_without_discount_with_tax,$price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_BEFORE_TAX'); } if($this-&gt;params-&gt;get('price_with_tax')==2&#124;&#124;!$this-&gt;params-&gt;get('price_with_tax')){ echo $this-&gt;currencyHelper-&gt;format($price-&gt;price_orig_value_without_discount,$price-&gt;price_orig_currency_id); } if($this-&gt;params-&gt;get('price_with_tax')==2){ echo JText::_('PRICE_AFTER_TAX'); } echo JText::_('PRICE_AFTER_ORIG'); } echo JText::_('PRICE_DISCOUNT_END').'&lt;/span&gt;'; } } } echo JText::_('PRICE_END'); } ?&gt;&lt;/span&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc4MDEzLW5vLXByaWNlcy1kaXNwbGF5ZWQtdW50aWwtbWVtYmVyLXJlZ2lzdGVyZWQ/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")**
- [![tjharvey's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-02-07.jpg)](/forum/user/9960-tjharvey "View tjharvey's Profile") Topic Author
- [ Offline](/forum/user/9960-tjharvey)

Less More

- Posts: 206
- Thank you received: 26
-
-
-
- [](http://www.UK-LEDs.com)
-

13 years 8 months ago -  13 years 8 months ago [\#89175](#89175) by [tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")  Replied by *[tjharvey](/forum/user/9960-tjharvey "View tjharvey's Profile")* on topic *[No prices displayed until member registered](/forum/4-how-to/78013-no-prices-displayed-until-member-registered#89175 "I have a site where i want to have the products showing, however no prices displayed until they're registered, Is there a way that can do this?")*

> Xavier wrote:
>
> Code:
>
> ...

still not ![:/](/irritated.gif ":/")

[ tradelights.co.uk/category/39-led-panel-lights.html](http://tradelights.co.uk/category/39-led-panel-lights.html)

---

I'm not an expert at this, if i post on your thread i'm doing so with the best of my knowledge and just trying to help ![:)](/media/kunena/emoticons/3.png ":)")

Last edit: 13 years 8 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc4MDEzLW5vLXByaWNlcy1kaXNwbGF5ZWQtdW50aWwtbWVtYmVyLXJlZ2lzdGVyZWQ/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14282
-
-

13 years 8 months ago [\#89354](#89354) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[No prices displayed until member registered](/forum/4-how-to/78013-no-prices-displayed-until-member-registered#89354 "I have a site where i want to have the products showing, however no prices displayed until they're registered, Is there a way that can do this?")*

You can simply add the code below at the beginning of the listing_price view file: Code:

&lt;?php $user = JFactory::getUser(); if($user-&gt;guest){ echo "Hide the price"; return; } ?&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc4MDEzLW5vLXByaWNlcy1kaXNwbGF5ZWQtdW50aWwtbWVtYmVyLXJlZ2lzdGVyZWQ/c3RhcnQ9MCZ0bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.132 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
