Try the Demo

Magento

eCommerce Software for Online Growth

Magento Forum

Our new hosted solution for small & emerging businesses
   
Adding Javascript to the success page
 
justdom
Jr. Member
 
Total Posts:  14
Joined:  2009-04-29
 

Hi everyone,
I’m trying to get some order information to set some javascript values on the checkout confirmation page. I’ve tried both inserting the javascript directly, and putting it in a separate page and creating a block in the checkout.xml. What I’m noticing is that the javascript seems to be stripped out of that page. Has anyone else experienced a similar issue? I’m able to set the variables in the other pages, so I’m not sure what would be different about this step.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jakub@WebCatch
Sr. Member
 
Avatar
Total Posts:  215
Joined:  2009-11-06
Nottingham, UK
 

I assume that you cleared the cache. Check if you are able to add some static text to the success page, or is it immune to any changes?

 Signature 

Jakub @ WebCatch Digital - eCommerce Solutions

Magento web design, Magento support.

We know Magento inside and out! We offer competitively priced support contracts!

Visit our magento blog.

 
Magento Community Magento Community
Magento Community
Magento Community
 
justdom
Jr. Member
 
Total Posts:  14
Joined:  2009-04-29
 

Hi-I’m sorry about the delay, as I needed to rebuild my local installation.

I’ve cleared the cache with no effect. What seems to be happening if that the javascript is being stripped from the page when it’s returned. I tried putting it in the surrounding container(page 1-column) and it seems to stick, but I don’t get access to the success page variables. What else should I be looking at?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jakub@WebCatch
Sr. Member
 
Avatar
Total Posts:  215
Joined:  2009-11-06
Nottingham, UK
 

You might try this: http://inchoo.net/ecommerce/magento/add-adwords-tracking-code-to-order-confirmation-page-in-magento/

 Signature 

Jakub @ WebCatch Digital - eCommerce Solutions

Magento web design, Magento support.

We know Magento inside and out! We offer competitively priced support contracts!

Visit our magento blog.

 
Magento Community Magento Community
Magento Community
Magento Community
 
justdom
Jr. Member
 
Total Posts:  14
Joined:  2009-04-29
 

Ok-this is what I’ve done:

checkout.xml

<checkout_multishipping_success>
<update handle="checkout_multishipping"/>
<!-- Mage_Checkout -->
<reference name="content">
<block type="checkout/multishipping_success" name="checkout_success" template="checkout/multishipping/success.phtml"/>
</reference>
<reference name="before_body_end">
<block name="omniture_values" template="checkout/omniture_values.phtml" type="core/template" />
</reference>
</checkout_multishipping_success>

1column.phtml

.
.
.
<!-- start footer -->
<div class="footer-container">
<div class="footer">
<?php echo $this->getChildHtml('footer') ?>
</div>
</div>
<!-- end footer -->
<?php echo $this->getChildHtml('before_body_end') ?>

...and omniture_values.phtml does exist

I’ve refreshed the cache, but still to no effect. Is there something I’m missing?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
© Copyright 2012 Magento Inc.
Privacy Policy|Terms of Service
Magento Community Count
701238 users|744 users currently online|497071 forum posts