Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As for part a) you will need to overwrite the controller <code>Mage_Checkout_OnepageController</code>. To do so create your own module (I assume you know how to do this) and in the app/code/local/YourModule/etc/config.xml you should have this part:</p> <pre><code>&lt;config&gt; ... &lt;frontend&gt; &lt;routers&gt; &lt;checkout&gt; &lt;args&gt; &lt;modules&gt; &lt;YourModule_Checkout before="Mage_Checkout"&gt;YourModule_Checkout&lt;/YourModule_Checkout&gt; &lt;/modules&gt; &lt;/args&gt; &lt;/checkout&gt; &lt;/routers&gt; &lt;/frontend&gt; &lt;/config&gt; </code></pre> <p>then in app/code/local/YourModule/controllers/OnepageController.php you want to overwrite the behavior, so when you click the save billing button, you will always land on the shipping page.</p> <pre><code>include_once("Mage/Checkout/controllers/OnepageController.php"); class YourModule_Checkout_OnepageController extends Mage_Checkout_OnepageController { public function saveBillingAction() { if ($this-&gt;_expireAjax()) { return; } if ($this-&gt;getRequest()-&gt;isPost()) { $data = $this-&gt;getRequest()-&gt;getPost('billing', array()); $customerAddressId = $this-&gt;getRequest()-&gt;getPost('billing_address_id', false); if (isset($data['email'])) { $data['email'] = trim($data['email']); } $result = $this-&gt;getOnepage()-&gt;saveBilling($data, $customerAddressId); if (!isset($result['error'])) { /* check quote for virtual */ if ($this-&gt;getOnepage()-&gt;getQuote()-&gt;isVirtual()) { $result['goto_section'] = 'payment'; $result['update_section'] = array( 'name' =&gt; 'payment-method', 'html' =&gt; $this-&gt;_getPaymentMethodsHtml() ); } else { // Removed elseif block here which usually skips over shipping if you selected to use the same address as in billing $result['goto_section'] = 'shipping'; } } $this-&gt;getResponse()-&gt;setBody(Mage::helper('core')-&gt;jsonEncode($result)); } } } </code></pre> <p>Then for part b) you have two options. Either as you pointed out you use the XML layout system to set a different template for the shipping.phtml:</p> <pre><code>&lt;checkout_onepage_index&gt; &lt;reference name="checkout.onepage.shipping"&gt; &lt;action method="setTemplate"&gt; &lt;new&gt;my_shipping.phtml&lt;/new&gt; &lt;/action&gt; &lt;/reference&gt; &lt;/checkout_onepage_index&gt; </code></pre> <p>or even easier, you overwritte the shipping.phtml template using your custom design folder. To evaluate your custom data, the model <code>Mage_Checkout_Model_Type_Onepage</code> processes the data in the <code>saveShipping()</code> method, so I guess this would be a good point to look for implementing your custom logic.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload