7

I have developed a custom plugin that used to add a custom made shipping method. For that custom made shipping method I had override the existing templates. It was working fine but changing the server has caused some problems and now my layout files are not getting called(i.e my html is not getting loaded.). However, I have deployed the same code on localhost and everything is working as it should be.

I have enabled the template hints and there I can see that on localhost my files are getting called but on live the default templates is getting called. I have compared the files for any changes but everything is the same except the behavior. I am attaching the respective xmls here along with this code.

app\code\local\Excellence\Pickup\etc\config.xml

<?xml version="1.0"?>
<config>
<modules>
    <Excellence_Pickup>
        <version>0.1.0</version>
    </Excellence_Pickup>
</modules>
<frontend>
    <routers>
        <pickup>
            <use>standard</use>
            <args>
                <module>Excellence_Pickup</module>
                <frontName>pickup</frontName>
            </args>
        </pickup>
    </routers>
    <layout>
        <updates>
            <pickup>
                <file>pickup.xml</file>
            </pickup>
        </updates>
    </layout>
</frontend>
<global>
    <events>
        <checkout_controller_onepage_save_shipping_method>
            <observers>
                <checkout_controller_onepage_save_shipping_method>
                    <type>model</type>
                    <class>pickup/observer</class>
                    <method>saveShippingMethod</method>
                </checkout_controller_onepage_save_shipping_method>
            </observers>
        </checkout_controller_onepage_save_shipping_method>
        <sales_model_service_quote_submit_after>
            <observers>
                <checkout_controller_onepage_save_shipping_method>
                    <type>model</type>
                    <class>pickup/observer</class>
                    <method>saveOrderAfter</method>
                </checkout_controller_onepage_save_shipping_method>
            </observers>
        </sales_model_service_quote_submit_after>
        <sales_order_load_after>
            <observers>
                <sales_order_load_after>
                    <type>model</type>
                    <class>pickup/observer</class>
                    <method>loadOrderAfter</method>
                </sales_order_load_after>
            </observers>
        </sales_order_load_after>
        <sales_quote_load_after>
            <observers>
                <sales_quote_load_after>
                    <type>model</type>
                    <class>pickup/observer</class>
                    <method>loadQuoteAfter</method>
                </sales_quote_load_after>
            </observers>
        </sales_quote_load_after>
    </events>
    <models>
        <sales>
            <rewrite>
                <order>Excellence_Pickup_Model_Sales_Order</order>
            </rewrite>
        </sales>
        <pickup>
            <class>Excellence_Pickup_Model</class>
            <resourceModel>pickup_mysql4</resourceModel>
        </pickup>
        <pickup_mysql4>
            <class>Excellence_Pickup_Model_Mysql4</class>
            <entities>
                <pickup>
                    <table>order_shipping_pickup</table>
                </pickup>
            </entities>
        </pickup_mysql4>
    </models>
    <resources>
        <pickup_setup>
            <setup>
                <module>Excellence_Pickup</module>
            </setup>
            <connection>
                <use>core_setup</use>
            </connection>
        </pickup_setup>
        <pickup_write>
            <connection>
                <use>core_write</use>
            </connection>
        </pickup_write>
        <pickup_read>
            <connection>
                <use>core_read</use>
            </connection>
        </pickup_read>
    </resources>
    <blocks>
        <pickup>
            <class>Excellence_Pickup_Block</class>
        </pickup>
    </blocks>
    <helpers>
        <pickup>
            <class>Excellence_Pickup_Helper</class>
        </pickup>
    </helpers>
</global>
<default>
    <carriers>
        <pickup>
           <active>1</active>
           <model>pickup/carrier_pickup</model>
           <title>Self Pickup</title>
           <name>Store Pickup</name>
           <price>0</price>
           <specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg>
        </pickup>
     </carriers>
   </default>

app\design\frontend\base\default\layout\pickup.xml

<?xml version="1.0"?>
<layout version="0.1.0">
<checkout_onepage_index>
    <reference name='head'>
        <reference name="head">
            <action method="addItem"><type>js</type><name>pickup/noconflict.js</name></action>
        </reference>
    </reference>
    <reference name='checkout.onepage.shipping_method.available'>
        <action method='setTemplate'><template>pickup/checkout/onepage/shipping_method/available.phtml</template></action>
    </reference>
</checkout_onepage_index>
<checkout_onepage_shippingmethod>
    <reference name='root'>
        <action method='setTemplate'><template>pickup/checkout/onepage/shipping_method/available.phtml</template></action>
    </reference>
</checkout_onepage_shippingmethod>
</layout>
  • 1
    Have you tried clearing the configuration cache from the admin panel? – Jafer.balti Feb 26 at 9:57
  • Yes I have cleared the cache from admin panel, also all the caches are disabled by me – umair.ashfr Feb 26 at 9:59
  • 1
    have you checked that all the .htaccess files are in places? – Andrea D'Urso Feb 26 at 11:49
  • no I haven't, but what are you suggesting here? – umair.ashfr Feb 26 at 11:54
  • If the code is exactly the same and it's working on local and the issue happened after moving server maybe your files are being not served/blocked because of a misconfigured or missing .htaccess file; are you getting error in your console? Also have you checked that you assigned the right theme from the admin configuration? The files are the same but maybe the DB data are different – Andrea D'Urso Feb 26 at 12:25
0

The Issue was that another third party plugin was overriding my template file. When I disabled that plugin, everything started working fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.