2014-03-04 69 views
-1

在magento中,我想從右向左移動結帳進度塊。我的意思是我想把結賬頁面顯示爲2列 - 右側style.I在左側列有一個擴展,我不需要在結帳頁面。 那麼,我該如何管理它? 我已經在checkout.xml中通過將引用名稱更改爲正確來嘗試,但它不起作用。 這裏是我的XML代碼如何將結帳進度塊移至右側?

<!-- 
One page checkout main layout 
--> 

    <checkout_onepage_index translate="label"> 
     <label>One Page Checkout</label> 
     <!-- Mage_Checkout --> 
     <remove name="right"/> 

     <reference name="root"> 
      <action method="setTemplate"><template>page/2columns-left.phtml</template></action> 
     </reference> 
     <reference name="left"> 

      <block type="page/html_wrapper" name="checkout.progress.wrapper" translate="label"> 
<label>Checkout Progress Wrapper</label> 
<action method="setElementId"><value>checkout-progress-wrapper</value></action> 
<block type="checkout/onepage_progress" name="checkout.progress" before="-" template="checkout/onepage/progress.phtml"> 
<block type="checkout/onepage_progress" name="billing.progress" template="checkout/onepage/progress/billing.phtml"></block> 
<block type="checkout/onepage_progress" name="shipping.progress" template="checkout/onepage/progress/shipping.phtml"></block> 
<block type="checkout/onepage_progress" name="shippingmethod.progress" template="checkout/onepage/progress/shipping_method.phtml"></block> 
<block type="checkout/onepage_progress" name="payment.progress" template="checkout/onepage/progress/payment.phtml"></block> 
</block> 
</block> 


     </reference> 
     <reference name="content"> 
      <block type="checkout/onepage" name="checkout.onepage" template="checkout/onepage.phtml"> 
       <block type="checkout/onepage_login" name="checkout.onepage.login" as="login" template="checkout/onepage/login.phtml"> 
        <block type="page/html_wrapper" name="checkout.onepage.login.before" as="login_before"> 
         <action method="setMayBeInvisible"><value>1</value></action> 
        </block> 
       </block> 
       <block type="checkout/onepage_billing" name="checkout.onepage.billing" as="billing" template="checkout/onepage/billing.phtml"/> 
       <block type="checkout/onepage_shipping" name="checkout.onepage.shipping" as="shipping" template="checkout/onepage/shipping.phtml"/> 
       <block type="checkout/onepage_shipping_method" name="checkout.onepage.shipping_method" as="shipping_method" template="checkout/onepage/shipping_method.phtml"> 
        <block type="checkout/onepage_shipping_method_available" name="checkout.onepage.shipping_method.available" as="available" template="checkout/onepage/shipping_method/available.phtml"/> 
        <block type="checkout/onepage_shipping_method_additional" name="checkout.onepage.shipping_method.additional" as="additional" template="checkout/onepage/shipping_method/additional.phtml"/> 
       </block> 
       <block type="checkout/onepage_payment" name="checkout.onepage.payment" as="payment" template="checkout/onepage/payment.phtml"> 
        <block type="checkout/onepage_payment_methods" name="checkout.payment.methods" as="methods" template="checkout/onepage/payment/methods.phtml"> 
         <action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action> 
        </block> 
       </block> 
       <block type="checkout/onepage_review" name="checkout.onepage.review" as="review" template="checkout/onepage/review.phtml"> 
        <block type="checkout/agreements" name="checkout.onepage.agreements" as="agreements" template="checkout/onepage/agreements.phtml"/> 
       </block> 
      </block> 
     </reference> 
    </checkout_onepage_index> 

<!-- 
One page checkout progress block 
--> 

    <checkout_onepage_progress> 
     <!-- Mage_Checkout --> 
     <remove name="right"/> 
     <remove name="left"/> 

     <block type="checkout/onepage_progress" name="root" output="toHtml" template="checkout/onepage/progress.phtml"> 
      <block type="checkout/onepage_payment_info" name="payment_info"> 
       <action method="setInfoTemplate"><method></method><template></template></action> 
      </block> 
     </block> 
    </checkout_onepage_progress> 

<!-- 
One page checkout payment methods block 
--> 
    <checkout_onepage_paymentmethod> 
     <remove name="right"/> 
     <remove name="left"/> 

     <block type="checkout/onepage_payment_methods" name="root" output="toHtml" template="checkout/onepage/payment/methods.phtml"> 
      <action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action> 
     </block> 
    </checkout_onepage_paymentmethod> 


<!-- 
One page checkout shipping methods block 
--> 

    <checkout_onepage_shippingmethod> 
     <!-- Mage_Checkout --> 
     <remove name="right"/> 
     <remove name="left"/> 

     <block type="checkout/onepage_shipping_method_available" name="root" output="toHtml" template="checkout/onepage/shipping_method/available.phtml"/> 
    </checkout_onepage_shippingmethod> 

    <checkout_onepage_additional> 
     <!-- Mage_Checkout --> 
     <remove name="right"/> 
     <remove name="left"/> 

     <block type="checkout/onepage_shipping_method_additional" name="root" output="toHtml" template="checkout/onepage/shipping_method/additional.phtml"> 
      <action method="setDontDisplayContainer"><param>1</param></action> 
     </block> 
    </checkout_onepage_additional> 

<!-- 
One page checkout order review block 
--> 

    <checkout_onepage_review> 
     <!-- Mage_Checkout --> 
     <remove name="right"/> 
     <remove name="left"/> 

     <block type="checkout/onepage_review_info" name="root" output="toHtml" template="checkout/onepage/review/info.phtml"> 
     <block type="core/template" name="checkout.onepage.review.button" as="button" template="checkout/onepage/review/button.phtml"/> 
      <action method="addItemRender"><type>default</type><block>checkout/cart_item_renderer</block><template>checkout/onepage/review/item.phtml</template></action> 
      <action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/onepage/review/item.phtml</template></action> 
      <action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/onepage/review/item.phtml</template></action> 
      <block type="checkout/cart_totals" name="checkout.onepage.review.info.totals" as="totals" template="checkout/onepage/review/totals.phtml"/> 
      <block type="core/text_list" name="checkout.onepage.review.info.items.before" as="items_before"/> 
      <block type="checkout/agreements" name="checkout.onepage.agreements" as="agreements" template="checkout/onepage/agreements.phtml"/> 
     </block> 
    </checkout_onepage_review> 

請幫

+0

爲什麼不顯示一些你的代碼,因爲它的字面上不可能幫助你沒有看到你在用什麼 –

+1

好..我共享.... tnx @ AndyHolmes –

+0

你是否刷新緩存? –

回答

2
<!--Remove everything from left--> 
<remove name="left"/> 
<!--Change root template to 2columns-right.phtml--> 
<reference name="root"> 
    <action method="setTemplate"><template>page/2columns-right.phtml</template></action> 
</reference> 
<!--use the right block--> 
<reference name="right"> 

    <block type="page/html_wrapper" name="checkout.progress.wrapper" translate="label"> 
     <label>Checkout Progress Wrapper</label> 
     <action method="setElementId"><value>checkout-progress-wrapper</value></action> 
     <block type="checkout/onepage_progress" name="checkout.progress" before="-" template="checkout/onepage/progress.phtml"> 
      <block type="checkout/onepage_progress" name="billing.progress" template="checkout/onepage/progress/billing.phtml"></block> 
      <block type="checkout/onepage_progress" name="shipping.progress" template="checkout/onepage/progress/shipping.phtml"></block> 
      <block type="checkout/onepage_progress" name="shippingmethod.progress" template="checkout/onepage/progress/shipping_method.phtml"></block> 
      <block type="checkout/onepage_progress" name="payment.progress" template="checkout/onepage/progress/payment.phtml"></block> 
     </block> 
    </block> 
</reference> 
<reference name="content".... 

希望它會幫助你的!

+0

Dima,僅針對主佈局進行更改嗎? –

+0

@Diam,好吧......它的工作原理.... tnx –

相關問題