X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Where are body tags on pages (https://forum.x-cart.com/showthread.php?t=66962)

Niro 05-28-2013 08:03 AM

Where are body tags on pages
 
Hello,
I'm hoping someone can provide some insight for me. I'm using x-cart 4.4.5 and want to include code for a popover to capture names. The service I use for email provides javascript for the popover with directions to include the code between the body tags of any given page I want to have the popover on.

Does anyone know where I would put this if I want to have a popover on:
1. Home page (I use x-cart as my home page directory)
2. Any of the category pages
3. Any of the static pages.

Many thanks.

pauldodman 05-29-2013 03:43 AM

Re: Where are body tags on pages
 
The body tags only occur in the home.tpl template, in your custom skin, or in common_files/customer, if you don't have one in your custom/chosen skin folder.

So you would put them in there for all instances.

What you would then have to do, is use if statements around the code depending on where, or where not you do or don't want the code to be used.

Niro 05-29-2013 12:36 PM

Re: Where are body tags on pages
 
Quote:

Originally Posted by pauldodman
The body tags only occur in the home.tpl template, in your custom skin, or in common_files/customer, if you don't have one in your custom/chosen skin folder.

So you would put them in there for all instances.

What you would then have to do, is use if statements around the code depending on where, or where not you do or don't want the code to be used.


Thanks Paul. I'm not a programmer, but know my way around a bit. Are the if statements difficult? Do you have something you could share as an example - perhaps Google about?

gb2world 05-29-2013 04:50 PM

Re: Where are body tags on pages
 
It may help to look at the documentation for Webmaster mode - which is the tool x-cart provides to help you make changes: http://help.x-cart.com/index.php?title=X-Cart:Using_Webmaster_mode

You also may find the tutorials by Totaltec to be helpful: http://forum.x-cart.com/showthread.php?t=62810

--

pauldodman 05-31-2013 12:09 AM

Re: Where are body tags on pages
 
Most of the if statements already exist somewhere in X-Cart.

the customer/home_main.tpl template is a good place to look as it has statements for all kinds of scenarios.

e.g. what appears on the home page only - the welcome.tpl template.
Which following gbworld's good advice to use webmaster mode, you'd have discovered.

So you can see there is:

{elseif $main eq "catalog" and $current_category.category eq ""}
{include file="customer/main/welcome.tpl"}

From that you can then take the if statement.

So if you want something to show/be used on the home page only, you'd do:

{if $main eq "catalog" and $current_category.category eq ""}
HOME PAGE ONLY
{/if}

Hope that helps.

Niro 06-13-2013 10:12 AM

Re: Where are body tags on pages
 
Thanks guys for all your help! I think I can figure it out now.


All times are GMT -8. The time now is 10:46 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.