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)
-   -   if statment to put code in head on cart page (https://forum.x-cart.com/showthread.php?t=71089)

shaz 01-29-2015 08:17 PM

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!!

pauldodman 01-30-2015 02:11 AM

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)

cflsystems 01-30-2015 06:01 AM

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

totaltec 02-01-2015 05:05 AM

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.

shaz 02-02-2015 05:13 PM

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!


All times are GMT -8. The time now is 11:44 PM.

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