Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Where are body tags on pages

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 05-28-2013, 08:03 AM
 
Niro Niro is offline
 

Newbie
  
Join Date: Feb 2012
Posts: 8
 

Default 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.
__________________
Niro
X-Cart Gold Version 4.4.5
Reply With Quote
  #2  
Old 05-29-2013, 03:43 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,060
 

Default 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.
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote
  #3  
Old 05-29-2013, 12:36 PM
 
Niro Niro is offline
 

Newbie
  
Join Date: Feb 2012
Posts: 8
 

Default 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?
__________________
Niro
X-Cart Gold Version 4.4.5
Reply With Quote
  #4  
Old 05-29-2013, 04:50 PM
  gb2world's Avatar 
gb2world gb2world is offline
 

X-Wizard
  
Join Date: May 2006
Location: Austin, TX
Posts: 1,970
 

Default 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

--
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold
(CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module)
Reply With Quote
  #5  
Old 05-31-2013, 12:09 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,060
 

Default 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.
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote
  #6  
Old 06-13-2013, 10:12 AM
 
Niro Niro is offline
 

Newbie
  
Join Date: Feb 2012
Posts: 8
 

Default Re: Where are body tags on pages

Thanks guys for all your help! I think I can figure it out now.
__________________
Niro
X-Cart Gold Version 4.4.5
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:53 PM.

   

 
X-Cart forums © 2001-2020