Forums / General Questions / Text to be shown only when logged in

Text to be shown only when logged in

Views: 475

Results 1 to 2 of 2
29 Sep 2011, 2:10 AM
#1
jace avatar

jace

New Zenner

Join Date:
Nov 2010
Posts:
91
Plugin Contributions:
0

Text to be shown only when logged in

My website is set up in a way that prices can only be seen when the user is logged in. I would also like to have the red line in the following code to be shown only when the user is logged in:


<!--bof Product Price block --> <h2 id="productPrices" class="productGeneral"> <?php // base price if ($show_onetime_charges_description == 'true') { $one_time = '<span >' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span><br />'; } else { $one_time = ''; } echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']); echo ('<br /></h2><font size="1">**Prices quoted are wholesale and Ex GST (where applicable)**</font><br />'); ?></h2> <!--eof Product Price block -->

Could someone please suggest the correct code to show the red text above only when the user is logged in? Thanks :)

For reference, this text is from the tpl_product_info_display.php in the includes/templates/template_default/templates/ folder.

29 Sep 2011, 3:02 AM
#2
jace avatar

jace

New Zenner

Join Date:
Nov 2010
Posts:
91
Plugin Contributions:
0

Re: Text to be shown only when logged in

Nevermind then .. found it myself.


<?php if ($_SESSION['customer_id']) { ?>
<br /></h2><font size="1">Prices quoted are wholesale and Ex GST (where applicable)</font><br />
<?php } else { } ?>