Miva Merchant 4 Module FAQs » Storefront Template (BROK_SFNTTEMPLATE)


{docurl}

How to Conditionally Display Based on Customer Login

Is there any way to conditionally display something depending on whether or not the customer is logged in?

If you have the latest version (you can obtain the latest version by clicking on the "check for upgrades" link in the header of the module's screen in admin) you could use this:

%begin_ifloggedin%
Welcome Back, %cust_ship_fname% %cust_ship_lname%
%end_ifloggedin%
%begin_ifnotloggedin%
You're not logged in!
%end_ifnotloggedin%

OR by accessing the variables directly:

%begin_if|BasketList.d.cust_id|%
Welcome Back, %var|Customers.d.ship_fname|% %var|Customers.d.ship_lname|%
%end_if%
%begin_notif|BasketList.d.cust_id|%
You're not logged in!
%end_notif%

I have also added additional customer tokens:

%custpassword%', Customers.d.password
%custlogin%', Customers.d.login
%custpwemail%', Customers.d.pw_email
%custid%', Customers.d.id
%cust_ship_fname%', Customers.d.ship_fname
%cust_ship_lname%', Customers.d.ship_lname
%cust_ship_email%', Customers.d.ship_email
%cust_ship_comp%', Customers.d.ship_comp
%cust_ship_phone%', Customers.d.ship_phone
%cust_ship_fax%', Customers.d.ship_fax
%cust_ship_addr%', Customers.d.ship_addr
%cust_ship_city%', Customers.d.ship_city
%cust_ship_state%', Customers.d.ship_state
%cust_ship_zip%', Customers.d.ship_zip
%cust_ship_cntry%', Customers.d.ship_cntry
%cust_bill_fname%', Customers.d.bill_fname
%cust_bill_lname%', Customers.d.bill_lname
%cust_bill_email%', Customers.d.bill_email
%cust_bill_comp%', Customers.d.bill_comp
%cust_bill_phone%', Customers.d.bill_phone
%cust_bill_fax%', Customers.d.bill_fax
%cust_bill_addr%', Customers.d.bill_addr
%cust_bill_city%', Customers.d.bill_city
%cust_bill_state%', Customers.d.bill_state
%cust_bill_zip%', Customers.d.bill_zip
%cust_bill_cntry%', Customers.d.bill_cntry

And Price Group and Availability Group conditional tokens:

%begin_pricegroup%...%end_pricegroup%
%begin_nopricegroup%...%end_nopricegroup%
%begin_availgroup%...%end_availgroup%
%begin_noavailgroup%...%end_noavailgroup%
%begin_inpricegroup|group|%...%end_inpricegroup%
%begin_notinpricegroup|group|%...%end_notinpricegroup%
%begin_inavailgroup|group|%...%end_inpricegroup%
%begin_notinavailgroup|group|%...%end_notinavailgroup%



Last update: 2003-07-30 22:16
Author: Support
Revision: 1.0

Print this record Send FAQ to a friend Show this as PDF file
Please rate this FAQ:

Average rating: 0 out of 5 (0 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry