Using amember with shopping cart that uses Smarty templates to check if member is logged in

Discussion in 'Integration' started by antn, Sep 30, 2018.

  1. antn

    antn New Member

    Aug 22, 2006

    I am trying to use amember with a shopping cart that generates all display pages with Smarty templating engine. The page display files all end in ".tpl". The problem is amember is php and Smarty has deprecated the {include_php} function (See here: )

    I need to check if a member is logged in, and has required subscription. I also need to display their user name, and their other membership info on the shopping cart's Smarty template display pages.

    As stated, Smarty no longer uses the simple {include_php} function, instead recommending that you write a plugin. Since Smarty is a popular templating engine for php I assumed the solution would be simple to find, but I have searched and can't find, and can't figure out how to do this with amember using the Lite.php library (

    Basically, I need a way to insert code at the top of each of the shopping carts .tpl pages to check if an amember member is logged in, has required subscription, and display their membership info. I am not an uber coder and need the exact code on how to do this. Please help....thank you.
  2. caesar

    caesar aMember Pro Developer Staff Member

    Oct 16, 2009

Share This Page