Forums / General Questions / I need to put code for a badge on only the Checkout page

I need to put code for a badge on only the Checkout page

Locked

Started by dwessell on 12 Oct 2009, 7:14 PM · Views: 703

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
12 Oct 2009, 7:14 PM
#1
dwessell avatar

dwessell

Zen Follower

Join Date:
Mar 2005
Posts:
143
Plugin Contributions:
0

I need to put code for a badge on only the Checkout page

Hi,

I need to put a little bit of code on a checkout page for a badge. I'd like to put the code in the header, but it only be called on the checkout page. Is that possible? Is there a variable that tells me I'm on the checkout page?

Thanks
David

12 Oct 2009, 8:28 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: I need to put code for a badge on only the Checkout page

I need to put a little bit of code on a checkout page for a badge.
Which page?
page=checkout_shipping
page=checkout_payment
page=checkout_confirmation
page=checkout_success

Create a custom tpl_header.php and in your template folder create a corresponding page folder
checkout_shipping
checkout_payment
checkout_confirmation
checkout_success

And place your custom file in that folder

Zen-Venom Get Bitten

12 Oct 2009, 8:30 PM
#3
dwessell avatar

dwessell

Zen Follower

Join Date:
Mar 2005
Posts:
143
Plugin Contributions:
0

Re: I need to put code for a badge on only the Checkout page

Kobra,

I was just coming back to specify :)

It's on page=checkout_success. And I''d like to put the code in the header on every page, but only have it displayed on the page=checkout_success page.

So in the header:

if(page==checkout_success){
display code;
}

Is there a variable that I can access that will tell me that I am on page=checkout_success?

Thanks
David

12 Oct 2009, 8:36 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: I need to put code for a badge on only the Checkout page

Just put the custom file in a folder named checkout_success in your template
my_template/checkout_success/tpl_header.php

Zen-Venom Get Bitten

12 Oct 2009, 8:59 PM
#5
dwessell avatar

dwessell

Zen Follower

Join Date:
Mar 2005
Posts:
143
Plugin Contributions:
0

Re: I need to put code for a badge on only the Checkout page

That's perfect. Thank you.