View Single Post
  #2  
Old 01-08-2016, 03:48 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Special Offers on certain pages only - how?

Surround the code in the template with an if statement. For the home page, there is a commonly used example that I don't have in front of me, but it is something like

{if $main eq 'home' and $cat eq ''}
Do this on home page
{/if}

If main = home -this checks if the variable main is equal to home, which is true on the home page and all of the category pages. That's why we need the second piece: and cat = nothing, to ensure that a category is not set. Combined these two only evaluate to true if on the home page.

To set this up for other pages, you need to do something similar, but I can't suggest anything without knowing what type of page it is. Category page, product page, static page, etc.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote