Skip to content

Instantly share code, notes, and snippets.

@daniloab
Last active June 24, 2021 16:46
Show Gist options
  • Select an option

  • Save daniloab/3ad2274d225d71b75c0b61c9bf798979 to your computer and use it in GitHub Desktop.

Select an option

Save daniloab/3ad2274d225d71b75c0b61c9bf798979 to your computer and use it in GitHub Desktop.

Hi, there. Can anyone help me to understand why my checkout success page it is not showing on my magento1 store?

my module is OpenCart_Cart

my cart.xml inside of /app/design/frontend/base/default/layout/opencart/cart/cart.xml is:

<?xml version="1.0"?>
<layout version="0.1.0">
    <checkout_onepage_index translate="label">
        <reference name="head">
            <action method="addJs">
                <script>opencart/main.js</script>
            </action>
        </reference>
    </checkout_onepage_index>
    <checkout_onepage_success translate="label">
        <reference name="content">
            <reference name="checkout.success">
                <block type="core/template" name="cart.info" template="opencart/cart/checkout/success.phtml" />
            </reference>
        </reference>
    </checkout_onepage_success>
</layout>

and my success.phtml inside of app/design/frontend/base/default/template/opencart/cart/checkout/success.phtml is:

<?php
$orderId = Mage::getSingleton('checkout/session')->getLastOrderId();
if($orderId){
    ?>
    <div class="buttons-set">
        <?php
        $order = Mage::getModel('sales/order')->load($orderId);
        $payment = $order->getPayment();
        echo '<p>'. $payment->getMethodInstance()->getTitle() .'</p>';
        ?>
        <div>
            <span>opencart test checkout success</span>
        </div>
    </div>
    <?php
}
?>

but only shows the payment title:

https://imgur.com/a/EaVO13i

how can I fix this to show the whole page on checkout success?

@daniloab
Copy link
Author

FIXED

It was missing on config.xml the <layout> tag:

<frontend>
        <layout>
            <updates>
                <opencart_cart>
                    <file>opencart/cart/cart.xml</file>
                </opencart_cart>
            </updates>
        </layout>
</frontend>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment