1

我在 1 年内一直在使用 magento 1.9,但仍然对尝试修改布局感到恼火。

我正在尝试将一些内容添加到 IWD OPC(单页结帐)帐单地址表单。

添加<?php echo $this->getChildHtml('autozipcode_index'); ?>opc\onepage\billing.php不起作用。

两天后我很绝望

任何帮助将不胜感激

这是我的布局文件

<?xml version="1.0"?>   
<layout version="0.1.0">   
  <opc_index_index translate="label">
        <reference name="checkout.onepage.billing">
             <block type="core/template" name="autozipcode_index" template="autozipcode/index.phtml"></block>
        </reference>
  </opc_index_index>
</layout>   

这是我要参考的布局

[...]
        <reference name="content">          
            <block type="opc/wrapper" name="es.checkout.container" template="opc/wrapper.phtml">
            
                     <block type="page/html_wrapper" name="paypal.button" translate="label">
                        <label>PayPal Express Checkout Shortcut Wrapper</label>
                        <block type="paypal/express_shortcut" name="product.info.addtocart.paypal" template="opc/paypal/express/shortcut.phtml">
                            <!-- action method="setIsInCatalogProduct"><value>1</value></action -->
                        </block>
                    </block>
            
            
                    <!--  LOGIN FORM  -->
                    <block type="opc/onepage_login" name="checkout.onepage.login" as="login" template="opc/onepage/login.phtml">
                        <block type="customer/account_forgotpassword" name="forgotPassword" template="opc/customer/form/forgotpassword.phtml"/> 
                    </block>
                    <!-- BILLING FORM -->
                    <block type="opc/onepage_billing" name="checkout.onepage.billing" as="billing" template="opc/onepage/billing.phtml"/>

                    <!-- SHIPPING FORM -->
                    <block type="opc/onepage_shipping" name="checkout.onepage.shipping" as="shipping" template="opc/onepage/shipping.phtml"/>
                    
                    <!-- COUPON FORM -->
                    <block type="checkout/cart_coupon" name="checkout.cart.coupon" as="coupon" template="opc/onepage/coupon.phtml"/>
                    
                    <!-- COMMENT FORM -->
                    <block type="opc/onepage_comment" name="checkout.order.comment" as="customer.comment"/>
                    
                    <!-- SHIPPING METHODS FORM -->
                    <block type="checkout/onepage_shipping_method" name="checkout.onepage.shipping_method" as="shipping_method" template="opc/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>
                    
                    <!-- PAYMENTS METHOD FORM -->
                    <block type="checkout/onepage_payment" name="checkout.onepage.payment" as="payment" template="opc/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/agreements" name="checkout.onepage.agreements" as="agreements" template="opc/onepage/agreements.phtml"/>
                    <block type="opc/onepage_subscribed" template="opc/onepage/review/subscribed.phtml" name="opc.newsletters" /> 
                    
            </block>
        </reference>
[...]
4

0 回答 0