|

Only Guests
Posted 25 January 2015 - 12:39 PM #1
for the ones that login as member i found the code below
{if $auth.user_id}
http://forum.cs-cart...user-logged-in/
but i couldn't find a code for guests only.
however i can do like this
<div id="guest">test</div>
{if $auth.user_id} <style type="text/css">.guest {display:none;} </style></if>
but a code like this would take less place {if $auth.guest}
Posted 25 January 2015 - 05:34 PM #2
Put a check mark in front of "Guest" and uncheck "All".
CS-Cart Ultimate ver 4.11.3
Posted 25 January 2015 - 06:45 PM #3
Can't you just use the Availability options at the bottom of the Website > Content > Edit page?
Put a check mark in front of "Guest" and uncheck "All".
thank you for answer. but code required for tpl file. this isn't a block or page problem.
Posted 25 January 2015 - 07:09 PM #4
Sorry, when you said "contents" I thought you were referring to the actual Website > Contents (where you create Pages & Forms) that is included with CS-Cart.There re some contents that i want only guests to see.
CS-Cart Ultimate ver 4.11.3
Posted 26 January 2015 - 05:19 AM #5
EZ Merchant Solutions: Custom (USA based) B2B Development, Consulting, Development and Special Projects (get a quote here).
Commercial addons, payment methods and modifications to meet your business and operations needs.
Posted 28 January 2015 - 10:13 AM #7
The full and more correct line will be
<div class="{if empty($auth.user_id)} hidden {/if}">test</div>
Sincerely yours,
CS-Market.
GET A FREE QUOTE │ CS-Cart add-ons │ CS-Cart custom development │ CS-Cart design integration │ CS-Cart license
Сертифицированный разработчик на CS-Cart Русская Версия. More than 8 years experience in CS-Cart development.