2

I am using this shipping "Table rates" and "webshopapp matrix rates" shipping methods.

what i need is that , if we use table rates shipping method, i want to hide "cash on delivery" payment method.

i am following this link : https://stackoverflow.com/questions/26604267/magento-onepage-checkout-hide-payment-method-depending-on-shipping-method

please help me to find what is the code for

1)table rates shipping method

2)cash on delivery" payment method....

1 Answer 1

3

AS i have seen in your reference link you can also see

code for

1) table rates shipping method == flatrate_flatrate

2) cash on delivery" payment method. == cashondelivery

EDIT

class Mage_Shipping_Model_Carrier_Tablerate
    extends Mage_Shipping_Model_Carrier_Abstract
    implements Mage_Shipping_Model_Carrier_Interface
{

    /**
     * code name
     *
     * @var string
     */
    protected $_code = 'tablerate';
}

Simple Magento shipping method code

<pre>Array
(
    [0] => Array
        (
            [value] => Array
                (
                    [0] => Array
                        (
                            [value] => flatrate_flatrate
                            [label] => Fixed
                        )

                )

            [label] => Flat Rate
        )

    [1] => Array
        (
            [value] => Array
                (
                    [0] => Array
                        (
                            [value] => freeshipping_freeshipping
                            [label] => Free
                        )

                )

            [label] => Free Shipping
        )

    [2] => Array
        (
            [value] => Array
                (
                    [0] => Array
                        (
                            [value] => tablerate_bestway
                            [label] => Table Rate
                        )

                )

            [label] => Best Way
        )

    [3] => Array
        (
            [value] => Array
                (
                )

            [label] => Best Way
        )

)

i am sure it will help you.

12
  • i will check and tell you soon.... Commented Mar 27, 2015 at 7:16
  • cod is worked fine..... but flatrate_flatrate code is "Flat rate", I want code for "Table rates" Commented Mar 27, 2015 at 7:29
  • 1
    @BabyinMagento2, you can see class for tablerate in my edited answer
    – liyakat
    Commented Mar 27, 2015 at 9:27
  • 1
    try tablerate_tablerate may be work as per other class of shipment.
    – liyakat
    Commented Mar 27, 2015 at 9:41
  • 1
    See my updated answer, as i have enable 3 method from default magento source
    – liyakat
    Commented Mar 27, 2015 at 9:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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