Your shopping cart is empty. Browse our Store

Magento

Open Source eCommerce Evolved

How to? Customize frontend template (F.e. review.phtml of onepage checkout)

Last modified by [m] zentrale on Fri, April 4, 2008 10:22
Source|Old Revisions  

We want to overwrite review.phtml of onepage checkout to provide f.e. terms and conditions download.

We created our own module called Mymodule. At first we have to create new layout xml for this module. we copy checkout.xml layout from design/frontend/default/default/layout/checkout.xml to design/frontend/default/default/layout/mymodule.xml and overwrite layout of checkout in our config.xml

  1.         <layout>
  2.              <updates>
  3.                   <checkout>
  4.                         <file>mymodule.xml</file>
  5.                   </checkout>                 
  6.              </updates>
  7.         </layout>

Then we change code of our layout to load our own template. Our customized template is located in /design/frontend/default/default/template/mymodule/onepage/review.phtml

Change in mymodule.xml

  1. <block type="checkout/onepage_review" name="checkout.onepage.review" as="review" template="checkout/onepage/review.phtml">
  2.                     <block type="checkout/onepage_review_info" name="checkout.onepage.review.info" as="info" template="checkout/onepage/review/info.phtml"/>
  3.                 </block>
  4. <code>
  5.  
  6. to
  7.  
  8. <code xml>
  9. <block type="mymodule/onepage_review" name="termsandconditions.onepage.review" as="review" template="mymodule/onepage/review.phtml">
  10.                     <block type="checkout/onepage_review_info" name="checkout.onepage.review.info" as="info" template="checkout/onepage/review/info.phtml"/>
  11.                 </block>



 

Popular Wiki Tags  |  View all

Professional Services from the Magento Team

Professional Installation from the Magento Team

Magento Job Board - Some sort of tag line goes here

Latest Posts| View all Jobs
Sales: Call 877.832.5289 (North America) 310.295.4144 (International) to request a call-back.
© Copyright 2008 Varien. Magento is a trademark of Irubin Consulting Inc. DBA Varien    Privacy Policy|Terms of Service