Categories

Featured templates

Magento. How to edit order confirmation page

Alice Weasley August 24, 2015
Rating: 5.0/5. From 2 votes.
Please wait...

Magento. How to edit order confirmation page

This tutorial shows how to edit order confirmation page in Magento:

Magento_How_to_edit_Order_Confirmation_page_1

  1. Navigate to app/design/frontend/base/default/template/checkout/success.phtml inside your site directory on the server via FTP or on your hosting cPanel and copy the success.phtml file to the app/design/frontend/default/themeXXX/template/checkout folder.

  2. In order to test the changes, perform the following steps:

    1. If your payment method is not Saved CC, set it to it in System -> Configuration -> Sales -> Payment Methods in your dashboard and use a test credit card to check out and get the success page to display. The Visa test card number is 4111111111111111:

      Magento_How_to_edit_Order_Confirmation_page_2

      Magento_How_to_edit_Order_Confirmation_page_3

    2. Temporarily edit a Magento Core code file to disable clearing session by commenting out this code around Line 227 in app/code/core/Mage/Checkout/controllers/OnepageController.php:

      replace

      $session->clear();

      with:

      //$session->clear();
  3. In app/design/frontend/default/themeXXX/template/checkout/success.phtml you can edit the Order Confirmation Page code.

    We strongly recommend backing up the file before editing it:

    Magento_How_to_edit_Order_Confirmation_page_4

    1. To edit the default text, replace the text between single quotes with yours. For example:

      Replace

      __('Your order has been received.') ?>

      with

      __('Great, we got your order!!!') ?>

    2. For displaying Shipping Address add this code:

        

      Shipping Details

      getLastRealOrderId();?> loadByIncrementId($order_id);?> _data["shipping_description"];?> getShippingAddress();?> " . $shipping_address_data['firstname'];?> " . $shipping_address_data['street'];?> " . $shipping_address_data['city'];?> " . $shipping_address_data['country_id'];?>
    3. This code will display Order Summary Amounts:

        

      Order Amounts


      Subtotal:' . Mage::helper("core")->currency($order_details->subtotal) . "

      ";?> Tax:' . Mage::helper("core")->currency($order_details->tax_amount) . "

      ";?> Discount:' . Mage::helper("core")->currency($order_details->discount_amount) . "

      ";?> Amount Paid:' . Mage::helper("core")->currency($order_details->total_paid) . "

      ";?>
    4. In order to display a custom static CMS block, for example social-buttons-block, use this code:

        
        
        getLayout()->createBlock('cms/block')->setBlockId('social-buttons-block')->toHtml();?>
      

Magento_How_to_edit_Order_Confirmation_page_5

You may also need to clear the cache.

Feel free to check the detailed video tutorial below:

Magento. How to edit order confirmation page

Magento Store Templates
This entry was posted in Magento Tutorials and tagged confirmation, Magento, order, page. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket