View Single Post
  #4  
Old 03-28-2005, 01:06 AM
 
Alphatim Alphatim is offline
 

Newbie
  
Join Date: Mar 2005
Location: Portugal, Lisboa
Posts: 4
 

Default

Hello Myth,

Maybe is better if you start to understand the template engine that x-cart uses: Smarty

You have to know a bit of html, if so, keep reading.

As you can see, inside your "customer/home.tpl" you have:
Code:
{include file="customer/menu_cart.tpl"}
You see a smarty function (include) that tells to smarty include the template file named "menu_cart.tpl". Ok, let's open this tpl that is located at "customer/".

Once is open you can see at the top:
Code:
{include file="customer/main/minicart.tpl"}
Oh! Another include! Once again, let's follow the path and open the "minicart.tpl". Voilц║, you are inside your "minicart.tpl", now you only have to insert the welcome msg:
Code:
{if ($active_modules.Greet_Visitor ne "") and ($smarty.cookies.GreetingCookie ne "")} {$lng.lbl_welcome_back}, {$smarty.cookies.GreetingCookie|replace:"\'":"'"} {/if}
I didn't invent this peace of code, I just copy from customer/main/welcome.tpl. How did I found this tpl? Like Bella Forma said:
Quote:
To find out what templates are being called from a particular page your viewing you can use webmaster mode, if you haven't discovered it yet have a look in the manual it is described in there.
Everything you need is inside the template files; you only have to search and copy/past/add/modify a bit. It is easier to achieve your needs if you start to understand how smarty works and how x-cart works with smarty. Hope this helps you a bit.

Best regards.
__________________
X-Cart: Gold 4.0.13
OS: Linux (Fedora)
PHP: 4.3.10
MySQL: 4.0.22
Reply With Quote