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

if statment to put code in head on cart page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-29-2015, 08:17 PM
 
shaz shaz is offline
 

Senior Member
  
Join Date: Jul 2008
Location: Sydney, Australia
Posts: 174
 

Default if statment to put code in head on cart page

Hi All,

Bit stuck... I bet it's bleedingly obvious tho!!

What is the correct context to use to add code to the header of the cart.php page ONLY.

Something like below... I have had a few guesses but no luck so far!

Code:
{if $main eq "order_message"} {literal} {/literal} {/if}


But I can't use 'checkout' mode to single the page out... can anyone answer or point me to some documentation? Thanks!!
__________________
Shaz
X-Cart Developer
Sydney - Australia
Reply With Quote
  #2  
Old 01-30-2015, 02:11 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

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

Default Re: if statment to put code in head on cart page

What version of X-Cart are you using?
(best if you add it to your signature so people can help you better)
__________________
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 01-30-2015, 06:01 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,078
 

Default Re: if statment to put code in head on cart page

{if $main eq "cart"} - cart page
{if $main eq "checkout'} - checkout pages - but depending on the checkout used this may be different - FLC, OPC, AC OPC...

'order_message' is the mode for order confirmation page

You can also use

{if $smarty.get.mode eq 'order_message'} which will be the order confirmation page
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following 2 users thank cflsystems for this useful post:
shaz (02-02-2015), totaltec (02-01-2015)
  #4  
Old 02-01-2015, 05:05 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

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

Default Re: if statment to put code in head on cart page

Slightly off topic, I've started assigning $main to a css class on the container. Helps a lot when you want specific CSS styles on certain page types.
__________________
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
  #5  
Old 02-02-2015, 05:13 PM
 
shaz shaz is offline
 

Senior Member
  
Join Date: Jul 2008
Location: Sydney, Australia
Posts: 174
 

Default Re: if statment to put code in head on cart page

Sorry my bad! This particular site is 4.6.5.

Quote:
Originally Posted by cflsystems
{if $main eq "cart"} - cart page

Thanks cflsystems. It worked this time!! Not sure why it didn't work last time... all good

Quote:
Originally Posted by totaltec
Slightly off topic, I've started assigning $main to a css class on the container. Helps a lot when you want specific CSS styles on certain page types.

Nice one totaltec, will keep that in mind for future mods!
__________________
Shaz
X-Cart Developer
Sydney - Australia
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 03:31 PM.

   

 
X-Cart forums © 2001-2020