The checkout process in Magento 1.9 is complicated, yet essential part of any ecommerce website. The One-page Checkout optimizes the checkout process for your Magento store making it simple and understandable for users. This article will help you learn how to add supplementary information on One-page Checkout and on pages of Multi-address Checkout.
Use container blocks provided in the native Magento checkout to display additional information
There are a few ways to add supplementary information on One-page Checkout. One of them is to add information through layout:
In order to display information for the particular block in the file checkout.xml you need to use the following handle:
- checkout_onepage_index — basic handle of one-page checkout;
- checkout_onepage_progress — progress bar block;
- checkout_onepage_paymentmethod — payment method selection block;
- checkout_onepage_shippingmethod — delivery method selection block;
- checkout_onepage_additional — supplementary information block.
Let’s take a closer look at adding custom html block into additional information. Move on to:
and add the following:
<block type="core/template" name="additional_info" as="my_child_alias" template="my/custom/template.phtml" />
After that add to the file
the following code in order to display our block:
<?php echo $this->getChildHtml('my_child_alias'); ?>
There are a few ways to add supplementary information on pages of Multi-address Checkout.
- Adding information through layout:
To display information for a certain step in the file checkout.xml you need to use the appropriate handle:
- checkout_multishipping — basic layout, which will be displayed on each page of Multi-address checkout;
- checkout_multishipping_addresses — a step for choosing delivery address for each item;
- checkout_multishipping_shipping — a step for choosing delivery method for each item;
- checkout_multishipping_billing — a step for choosing payment method;
- checkout_multishipping_overview — a step for order information overview;
- checkout_multishipping_success — last step where successful order processing information is displayed (Order № and explanatory message).
- Adding information directly in template folder:
where each checkout step corresponds to a certain template file:
- Select Addresses — addresses.php;
- Shipping Information — shipping.php;
- Billing Information — billing.php;
- Place Order — overview.php;
- Order Success — success.php.
One-page checkout is one of the topics at Magento Front End Developer Certification. We hope this article helped you to get its better understanding.
You are welcome to check out other Front End Development articles in the corresponding section on our website. If you have any questions, please write them in the comment section.