Magento – Change success page

checkoutPHP

everybody!

I need to add this

<img src="//cdsusa.veinteractive.com/DataReceiverService.asmx/Pixel?journeycode=22DB0E55-C091-431A-BA44-C1928F926B50" width="1" height="1"/>

To my success page

I googled it and found that the change has to go on success.phtml in
/app/design/frontend/MYTEMPLATE/default/template/checkout/

But I simply cant get it to work!! Can anybody help me, please?

My file is like this:

<?php
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magentocommerce.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magentocommerce.com for more information.
 *
 * @category    design
 * @package     base_default
 * @copyright   Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>

<?php
 session_start();
if(isset($_SESSION['sessiongiftwrapper']))
{
$order=$this->getOrderId();
$getvalue=$_SESSION['sessiongiftwrapper'];
$resource = Mage::getSingleton ( 'core/resource' );
$read = $resource->getConnection ( 'core_read' );


$table=$resource->getTableName('sales_order_giftwrap_message');

$write = Mage::getSingleton('core/resource')->getConnection('core_write');


$write->query("insert into ".$table ." values(".$order.",'".$getvalue."')");
$_SESSION['sessiongiftwrapper']='';
}
?>
<div class="page-title">
    <h1><?php echo $this->__('Your order has been received.') ?></h1>
</div>
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
<h2 class="sub-title"><?php echo $this->__('Thank you for your purchase!') ?></h2>

<?php if ($this->getOrderId()):?>
<?php if ($this->getCanViewOrder()) :?>
    <p><?php echo $this->__('Your order # is: %s.', sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getViewOrderUrl()), $this->escapeHtml($this->getOrderId()))) ?></p>
<?php  else :?>
    <p><?php echo $this->__('Your order # is: %s.', $this->escapeHtml($this->getOrderId())) ?></p>
<?php endif;?>
    <p><?php echo $this->__('You will receive an order confirmation email with details of your order and a link to track its progress.') ?></p>
<?php if ($this->getCanViewOrder() && $this->getCanPrintOrder()) :?>
    <p>
        <?php echo $this->__('Clique <a href="%s" onclick="this.target=\'_blank\'">aqui para imprimir</a> uma cópia de sua compra.', $this->getPrintUrl()) ?>
        <?php echo $this->getChildHtml() ?>
    </p>
<?php endif;?>
<?php endif;?>

<?php if ($this->getAgreementRefId()): ?>
    <p><?php echo $this->__('Your billing agreement # is: %s.', sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getAgreementUrl()), $this->escapeHtml($this->getAgreementRefId())))?></p>
<?php endif;?>

<?php if ($profiles = $this->getRecurringProfiles()):?>
<p><?php echo $this->__('Your recurring payment profiles:'); ?></p>
<ul class="disc">
<?php foreach($profiles as $profile):?>
<?php $profileIdHtml = ($this->getCanViewProfiles() ? sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getProfileUrl($profile)), $this->escapeHtml($this->getObjectData($profile, 'reference_id'))) : $this->escapeHtml($this->getObjectData($profile, 'reference_id')));?>
    <li><?php echo $this->__('Payment profile # %s: "%s".', $profileIdHtml, $this->escapeHtml($this->getObjectData($profile, 'schedule_description')))?></li>
<?php endforeach;?>
</ul>
<?php endif;?>

<div class="buttons-set">
    <button type="button" class="button" title="<?php echo $this->__('Continue Shopping') ?>" onclick="window.location='<?php echo $this->getUrl() ?>'"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
</div>

<?php
echo '
<img src="//cdsusa.veinteractive.com/DataReceiverService.asmx/Pixel?journeycode=22DB0E55-C091-431A-BA44-C1928F926B50" width="1" height="1"/>
';
?>

Best Answer

You don't have to edit a phtml necessarily. If you are not really familiar with Magento (coding side) you could use a widget to add html to that page.

Just create a widget and link it to a CMS block, add a layout update with option specified page.

If you insist on doing it in the phtml I advise you to check the package and the theme set in system configuration in the design section, this might be different from the place where you adjusted your phtml.

Related Topic