I want to change a checkout/onepage
layout based on a condition.
Example:
<?php
$coupon = Mage::getSingleton('checkout/session')->getQuote()->getCouponCode();
if(($coupon == "SE50") || ($coupon == "SE00")){
}
?>
To showcheckout.xml
<action method="setTemplate"><template>page/2columns-right.phtml</template></action>
I mean this page:
if(empty($coupon))
<action method="setTemplate"><template>page/checkout-onepage.phtml</template></action>
A page like:
Note: checkout-onepage.phtml
is a custom page.