SwissUpLabs Logo

TIG_PostNL

  1. Open app/code/community/TIG/PostNL/Model/DeliveryOptions/Observer/ShippingMethodAvailable.php and find the following code:

    if (Mage::app()->getRequest()->getModuleName() == 'onestepcheckout') {
        $template = 'TIG/PostNL/delivery_options/onestepcheckout/available.phtml';
    
        if (!$block->getChild('postnl.osc.delivery.options')) {
            $block = $this->_addDeliveryOptionBlocks($block);
        }
    }
    

    replace it with:

    if (Mage::app()->getRequest()->getModuleName() == 'onestepcheckout') {
        $template = 'TIG/PostNL/delivery_options/onestepcheckout/available.phtml';
    
        if (!$block->getChild('postnl.osc.delivery.options')) {
            $block = $this->_addDeliveryOptionBlocks($block);
        }
    } else if (Mage::app()->getRequest()->getModuleName() == 'firecheckout') {
        $template = 'tm/firecheckout/checkout/shipping_method/available.phtml';
    }
    
  2. Open skin/frontend/base/default/js/TIG/PostNL/postcodecheck.js and find the following line:

    document.fire('postnl:postcodeCheckSuccess');
    

    replace it with:

    document.fire('postnl:postcodeCheckSuccess', {
        addressType: addressType
    });
    
  3. Open app/design/frontend/base/default/template/TIG/PostNL/payment/checkout/form/cod.phtml and find the following lines:

    payment.init = function () {
    ...
    }
    

    Wrap the method into if ('undefined' === typeof FireCheckout) {:

    if ('undefined' === typeof FireCheckout) {
        payment.init = function () {
        ...
        }
    }
    

    Find the following code:

    if (postnlCodPaymentMethod && typeof deliveryOptions) {
    

    Replace it with:

    if ('undefined' !== typeof postnlCodPaymentMethod && 'undefined' !== typeof deliveryOptions) {
    

    Find the following code:

    if (deliveryOptions && deliveryOptions.options.isOsc) {
    

    Replace it with:

    if ('undefined' !== typeof deliveryOptions && deliveryOptions.options.isOsc) {
    
  4. Open app/design/frontend/base/default/template/TIG/PostNL/delivery_options/addphonenumber.phtml and find the following line:

    window.deliveryOptions.saveOscOptions();
    

    Replace it with:

    window.deliveryOptions.saveSelectedOption();
    // window.deliveryOptions.saveOscOptions();
    
  5. Open app/code/community/TIG/PostNL/etc/config.xml and find the following lines:

    <controller_action_postdispatch_checkout_onepage_saveShippingMethod>
        <observers>
            <!-- Saves selected PostNL options for Onepage checkout. -->
            <checkout_shipping_method_save_options>
                <type>singleton</type>
                <class>postnl_deliveryoptions/observer_updatePostnlOrder</class>
                <method>saveOptions</method>
            </checkout_shipping_method_save_options>
        </observers>
    </controller_action_postdispatch_checkout_onepage_saveShippingMethod>
    

    Replace it with:

    <controller_action_postdispatch_checkout_onepage_saveShippingMethod>
        <observers>
            <!-- Saves selected PostNL options for Onepage checkout. -->
            <checkout_shipping_method_save_options>
                <type>singleton</type>
                <class>postnl_deliveryoptions/observer_updatePostnlOrder</class>
                <method>saveOptions</method>
            </checkout_shipping_method_save_options>
        </observers>
    </controller_action_postdispatch_checkout_onepage_saveShippingMethod>
    <controller_action_predispatch_firecheckout_index_saveOrder>
        <observers>
            <checkout_shipping_method_save_options>
                <type>singleton</type>
                <class>postnl_deliveryoptions/observer_updatePostnlOrder</class>
                <method>saveOptions</method>
            </checkout_shipping_method_save_options>
        </observers>
    </controller_action_predispatch_firecheckout_index_saveOrder>
    
  6. Save the files and clear the cache.

Edit this Page