Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2010
    Posts
    87
    Plugin Contributions
    0

    help question 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.

  2. #2
    Join Date
    Nov 2010
    Posts
    87
    Plugin Contributions
    0

    Default 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 {
    }
    ?>

 

 

Similar Threads

  1. Taxes not shown when logged in
    By HenKad in forum Basic Configuration
    Replies: 0
    Last Post: 2 Nov 2009, 06:53 AM
  2. Replies: 2
    Last Post: 23 Oct 2008, 06:33 AM
  3. Showcase only when not logged in.
    By arpeggio in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 7 Feb 2007, 07:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg