Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2012
    Posts
    5
    Plugin Contributions
    0

    Default Show Product Description only when logged in

    I was wondering if there is any way to make the Product Description behave exactly like the Product Price. By that I mean that I currently have the price hidden unless a customer logs in, and I would like the description to also be hidden unless a customer logs in.

    I think it has something to do with the tpl_product_info_display.php file, but I'm not sure. I've messed around with it, but no luck yet.

    Thanks.

  2. #2
    Join Date
    Feb 2012
    Location
    Indonesia
    Posts
    10
    Plugin Contributions
    2

    Default Re: Show Product Description only when logged in

    Yes, It is possible. You just need to add the condition around the product description block of code on tpl_product_info_display.php

    Code:
    <?php if(isset($_SESSION['customers_id'])){ ?>
    
    <!--Product Description Block Code-->
    
    <?php } ?>

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Show Product Description only when logged in

    Note that will kill a lot of spider food ...
    Last edited by Ajeh; 30 Mar 2012 at 01:52 PM.
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #4
    Join Date
    Mar 2012
    Posts
    5
    Plugin Contributions
    0

    Default Re: Show Product Description only when logged in

    Thanks for the tip. However, that seemed to have no effect on the product description.

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Show Product Description only when logged in

    There is a typo on that ... use customer_id without the S:
    Code:
    <?php if(isset($_SESSION['customer_id'])){ ?>
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Nov 2009
    Location
    UK
    Posts
    1,090
    Plugin Contributions
    0

    Default Re: Show Product Description only when logged in

    What about a CSS trick so to display:none all of the product description divs, images etc until you're logged in. That way spiders will still read it, but humans can't.

  7. #7
    Join Date
    Mar 2012
    Posts
    5
    Plugin Contributions
    0

    Default Re: Show Product Description only when logged in

    Quote Originally Posted by Ajeh View Post
    There is a typo on that ... use customer_id without the S:
    Code:
    <?php if(isset($_SESSION['customer_id'])){ ?>
    That worked perfectly. Thank you!


    Quote Originally Posted by dgent View Post
    What about a CSS trick so to display:none all of the product description divs, images etc until you're logged in. That way spiders will still read it, but humans can't.
    I'll try this also, thanks for the tip.

  8. #8
    Join Date
    Mar 2012
    Posts
    5
    Plugin Contributions
    0

    Default Re: Show Product Description only when logged in

    Wow, ok. Looks like my customer changed their mind. Now they only want a portion of the product description hidden, which I don't think can be done. Can it?

  9. #9
    Join Date
    Mar 2012
    Posts
    5
    Plugin Contributions
    0

    Default Re: Show Product Description only when logged in

    Figured it out. Added a new property to my products, and put the information I needed hidden in there. Thanks everyone for all the help.

 

 

Similar Threads

  1. v154 Change product description when logged in
    By aestheticdesign in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 3 Sep 2015, 12:20 PM
  2. E-Z Pages To Only Show When Logged in??
    By mattk251285 in forum Templates, Stylesheets, Page Layout
    Replies: 23
    Last Post: 14 Dec 2011, 06:25 PM
  3. I want to show only certain menu items when not logged in
    By gbruner in forum General Questions
    Replies: 0
    Last Post: 27 Oct 2010, 04:20 AM
  4. Link only show when logged in
    By twdhosting in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 16 Aug 2010, 01:12 AM
  5. Product only available when logged in
    By jamesdenny in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 5 Mar 2009, 06:00 PM

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