Announcement

Collapse
No announcement yet.

Login Conditional

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Login Conditional

    I want to display "Welcome (customer name" throughout site if customer has an account and is logged in. It is kind of working...it of course works on the account pages and displays Welcome and name, but on categories,products, pages etc... it is just displaying "Welcome". Below is what I have tried conditionals

    <mvt:if expr="basket:cust_id">Welcome &mvte:addressbook:address_ship:fname;!<mvt:else ></mvt:if>
    <mvt:if expr="g.basket:cust_id GT 0">Welcome &mvte:addressbook:address_ship:fname;!<mvt:else ></mvt:if>

    Any help is greatly appreciated.

    #2
    Just use:

    <mvt:if expr="g.basket:cust_id">Welcome &mvt:global:basket:bill_fname; &mvt:global:basket:bill_lname;</mvt:if>

    1) the address variable may or may not be available in all places
    2) basket:cust_id is 'un-scoped'. Meaning, typically (not positive about SMT coding) the application has to work harder as it has to check for s.basket:cust_id, g.basket:cust_id and l.settings:basket:cust_id.
    3) If you are simply looking for a match no need to use <mvt:else></mvt:if>, just use </mvt:if to close.
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment


      #3
      Hi Bruce thank you for the response!

      <mvt:if expr="g.basket:cust_id"> & &mvte:global:basket:bill_fname; work but only on account pages and the &mvt:global:basket:bill_fname; does not work at all for me.

      Comment


        #4
        try &mvt:global:customer:bill_fname; &mvt:global:customer:bill_lname;
        Bruce Golub
        Phosphor Media - "Your Success is our Business"

        Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
        phosphormedia.com

        Comment


          #5
          Bruce, Thank you! &mvt:global:customer:bill_fname; works!!!

          Comment

          Working...
          X