Created
September 5, 2012 12:44
-
-
Save srivats/3636029 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form id="billing-form"> | |
<fieldset> | |
<ul> | |
<li class="fields"> | |
<div class="field"> | |
<label for="billing:company">Company</label> | |
<div class="inout-box"> | |
<input type="text" id="billing:company" class="input-text"> | |
</div> | |
</div> | |
</li> | |
</ul> | |
</fieldset> | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<config> | |
<modules> | |
<Namespace_Onepagecheckout> | |
<version>1.0.0</version> | |
</Namespace_Onepagecheckout> | |
</modules> | |
<frontend> | |
<routers> | |
<onepagecheckout> | |
<use>standard</use> | |
<args> | |
<module>Namespace_Onepagecheckout</module> | |
<frontName>onepagecheckout</frontName> | |
</args> | |
</onepagecheckout> | |
</routers> | |
<layout> | |
<updates> | |
<onepagecheckout> | |
<file>custom/onepagecheckout/onepagecheckout.xml</file> | |
</onepagecheckout> | |
</updates> | |
</layout> | |
</frontend> | |
<global> | |
<blocks> | |
<onepagecheckout> | |
<class>Namespace_Onepagecheckout_Block</class> | |
</onepagecheckout> | |
</blocks> | |
<helpers> | |
<onepagecheckout> | |
<class>Namespace_Onepagecheckout_Helper</class> | |
</onepagecheckout> | |
</helpers> | |
<rewrite> | |
<onepagecheckout> | |
<from><![CDATA[#^/checkout/onepage/#]]></from> | |
<to>/onepagecheckout/onepage</to> | |
</onepagecheckout> | |
</rewrite> | |
</global> | |
</config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div clas="container"> | |
<div id="billing"> | |
<?php echo $this->getChildHtml('onepagecheckoutbilling') ?> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- app/design/frontend/default/mytheme/layout/custom/onepagecheckout/onepagecheckout.xml | |
--> | |
<?xml version="1.0"?> | |
<layout version="0.1.0"> | |
<checkout_onepage_index> | |
<reference name="root"> | |
<action method="setTemplate"><template>page/1column.phtml</template></action> | |
</reference> | |
<reference name="content"> | |
<block type="onepagecheckout/onepagecheckout" name="onepagecheckoutcontainer" template="custom/onepagecheckout/container.phtml"> | |
<block type="core/template" name="onepagecheckoutbilling" template="custom/onepagecheckout/billing.phtml"></block> | |
</block> | |
</reference> | |
</checkout_onepage_index> | |
</layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_once Mage::getModuleDir('controllers','Mage_Checkout').DS.'OnepageController.php'; | |
class Namespace_Onepagecheckout_OnepageController extends Mage_Checkout_OnepageController | |
{ | |
public function indexAction() | |
{ | |
$this->loadLayout(); | |
if(!Mage::Helper('onepagecheckout')->isOnepageCheckoutEnabled()) | |
{ | |
Mage::getSingleton('checkout/session')->addError('Onepage checkout disabled'); | |
$this->_redirect('checkout/cart'); | |
return; | |
} | |
if(Mage::helper('onepagecheckout')->isOnepageCheckoutEnabled()) | |
{ | |
$this->getLayout()->getBlock('head')->setTitle('Checkout'); | |
$this->getLayout()->getBlock('content')->unsetChildren('checkout.onepage'); | |
} | |
$this->renderLayout(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment