Post by HAL 9000 » Thu Sep 11, 2008 11:49 pm

Hello,

I am trying to add "login/logoff" text to the footer. I copied the following code from "header.tpl" file in "catalog/template/default/module" .

________________________________



  ">
 
  ">
 

________________________________



I am getting the following message in the footer:
________________________________

Notice: Undefined variable: text_logout in /home/handy/www/store/catalog/template/default/layout.tpl on line 90

When I deleted the "?>">"  or

        "
          ">"


nothing shows up on the footer. But when I delete

Any help is appreciated. Thank you

New member

Posts

Joined
Thu Sep 11, 2008 8:53 pm

Post by Qphoria » Fri Sep 12, 2008 12:09 am

The code is fine. But are you trying to add the code to the layout.tpl file? Why not add it to the catalog/template/default/module/footer.tpl file?

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by SiteE@se » Fri Sep 12, 2008 12:24 am

The code you have edited in a .tpl file is looking for data called by a corresponding .php file.  The relevant login/logout code is in catalog/extension/module/header.php and the results are displayed by catalog/template/default/module/header.tpl.

If you want the login/logout to display in the footer you will need to put code that corresponds to the above in both catalog/extension/module/footer.php and catalog/template/default/module/footer.tpl

Hope this makes sense!

Chris @ SiteE@se Web Design


Active Member

Posts

Joined
Mon Dec 17, 2007 7:40 am
Location - UK

Post by HAL 9000 » Fri Sep 12, 2008 12:52 am

I am not using header and footer TPL files. I put all the code in "layout. tpl" file.  Is there way to do it in "layout.tpl" file? Do I have to create a "layout.php" file for it to work?

New member

Posts

Joined
Thu Sep 11, 2008 8:53 pm

Post by SiteE@se » Fri Sep 12, 2008 1:12 am

bharat wrote: I put all the code in "layout. tpl" file.
What?  Do you mean you are not calling things like the language, search, cart, currency, information modules & tpl's from within layout.tpl?  If you aren't you must already have hacked a lot of code to get things to work.  OC's design is modular to allow add-ons to be easily done.  headers/footers are simple modular add-ons that can easily be edited and customised.  Unless you have very good reasons for doing otherwise, I'd stick to using them ... otherwise you run into problems like you've outlined.

Chris @ SiteE@se Web Design


Active Member

Posts

Joined
Mon Dec 17, 2007 7:40 am
Location - UK

Post by HAL 9000 » Fri Sep 12, 2008 1:35 am

I edited "default.css" in "catalog/template/default/css" and "layout.tpl" files only. I didn't need currency, search, language etc. So I deleted them from "layout.tpl" in "catalog/template/default". The only thing I added to the "layout.tpl" file is header and footer stuff.


As you mentioned, I added the following code to "footer.tpl" file and got the same error message.

       
        ">
       
        ">
       

New member

Posts

Joined
Thu Sep 11, 2008 8:53 pm

Post by SiteE@se » Fri Sep 12, 2008 1:45 am

Best not to delete such module code - better to turn the functionality on or off from the admin side: go to Extensions->Modules and click on the spanner next to the relevant module to bring up the enable/disable options.

You also have to add code to footer.php - lift it from header.php as I described earlier ......

Chris @ SiteE@se Web Design


Active Member

Posts

Joined
Mon Dec 17, 2007 7:40 am
Location - UK

Post by HAL 9000 » Fri Sep 12, 2008 1:47 am

Thank you. I got it working after editing the code in "footer.php" file in "catalog/extension/module"

New member

Posts

Joined
Thu Sep 11, 2008 8:53 pm
Who is online

Users browsing this forum: No registered users and 2 guests