Announcement

Collapse
No announcement yet.

Shipping method exclusions or enabled

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Shipping method exclusions or enabled

    I am needing to do this during checkout. (MM9.14)

    Is there a higher-level API function (I've looked in the Features of the LSK) that will load these lists: excluded shipping options (bonus: including limited options at the product level) and/or all valid shipping options for the current shopping session?

    Scanning the LSK and docs, it appears the functions I'm after require the shipping module codes to get a list for that specific shipping module. I was hoping for an API function that just grabs the whole list of exclusions and/or enabled.

    Thanks,

    Scott
    Need to offer Shipping Insurance?
    Interactive Design Solutions https://www.myids.net
    MivaMerchant Business Partner | Certified MivaMerchant Web Developer
    Competitive Rates, Custom Modules and Integrations, Store Integration
    AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
    My T-shirt Collection is mostly MivaCon T-shirts!!

    #2
    I don't know either how you would get what is hidden/excluded from showing up in the shipping methods. But you could deduce that from what the "all" would be. So to get that you should be able to get all valid shipping options by seeing what JSON API function the Admin section is loading to load that page in the Admin. Maybe? Network tab > Response and Request parts. Maybe?
    Colin Puttick
    Miva Web Developer @ Glendale Designs

    Comment


      #3
      Was finally able to spend some time testing out some code. I found an answer that may be suitable, but not sure If it is what I need. This is the API call.

      Code:
      <mvt:do file="g.module_feature_shp_ut" name="l.success" value="ShippingMethodList_Load_Basket(g.ship_methods)" />
      Scott

      Need to offer Shipping Insurance?
      Interactive Design Solutions https://www.myids.net
      MivaMerchant Business Partner | Certified MivaMerchant Web Developer
      Competitive Rates, Custom Modules and Integrations, Store Integration
      AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
      My T-shirt Collection is mostly MivaCon T-shirts!!

      Comment


        #4
        Does that get you the available shipping methods for that person/customer/order?

        I think this would get you ALL the shipping methods. It's the JSON api call to search for ' ' on the shipping method rules.

        {
        "Filter": [
        {
        "name": "search",
        "value": [
        {
        "field": "method_name",
        "operator": "CO",
        "value": " "
        },
        {
        "field": "priority",
        "operator": "EQ",
        "value": " "
        },
        {
        "field": "descrip",
        "operator": "CO",
        "value": " "
        }
        ]
        }
        ]
        }

        ShippingMethodRulesList_Load_Query

        =


        {
        "success": 1,
        "data":
        {
        "data":
        [
        {
        "module":
        {
        "id": 152,
        "code": "upsxml",
        "name": "UPS Developer Kit",
        "provider": "Miva Merchant",
        "api_ver": "5.72",
        "version": "10.0000",
        "module": "modules\/shipping\/upsxml.mvc",
        "refcount": 1,
        "active": true
        },
        "mod_code": "upsxml",
        "meth_code": "01",
        "method_name": "UPS Next Day Air\u0026reg\u003B",
        "agrpcount": 0,
        "priority": 0,
        "descrip": "",
        "adjusttype": "",
        "adjustamnt": 0.00,
        "min_subtot": 0.00,
        "max_subtot": 0.00,
        "min_quan": 0,
        "max_quan": 0,
        "min_weight": 0.00,
        "max_weight": 0.00,
        "states":
        [
        ],
        "zips": "",
        "countries":
        [
        ],
        "exclude_po": true,
        "exclude_df": false
        }
        ,{
        "module":
        {
        "id": 152,
        "code": "upsxml",
        "name": "UPS Developer Kit",
        "provider": "Miva Merchant",
        "api_ver": "5.72",
        "version": "10.0000",
        "module": "modules\/shipping\/upsxml.mvc",
        "refcount": 1,
        "active": true
        },
        "mod_code": "upsxml",
        "meth_code": "02",
        "method_name": "UPS 2nd Day Air\u0026reg\u003B",
        "agrpcount": 0,
        "priority": 0,
        "descrip": "",
        "adjusttype": "",
        "adjustamnt": 0.00,
        "min_subtot": 0.00,
        "max_subtot": 0.00,
        "min_quan": 0,
        "max_quan": 0,
        "min_weight": 0.00,
        "max_weight": 0.00,
        "states":
        [
        ],
        "zips": "",
        "countries":
        [
        ],
        "exclude_po": true,
        "exclude_df": false
        }
        ,{
        "module":
        {
        "id": 152,
        "code": "upsxml",
        "name": "UPS Developer Kit",
        "provider": "Miva Merchant",
        "api_ver": "5.72",
        "version": "10.0000",
        "module": "modules\/shipping\/upsxml.mvc",
        "refcount": 1,
        "active": true
        },
        "mod_code": "upsxml",
        "meth_code": "03",
        "method_name": "UPS\u0026reg\u003B Ground",
        "agrpcount": 0,
        "priority": 0,
        "descrip": "",
        "adjusttype": "",
        "adjustamnt": 0.00,
        "min_subtot": 0.00,
        "max_subtot": 0.00,
        "min_quan": 0,
        "max_quan": 0,
        "min_weight": 0.00,
        "max_weight": 0.00,
        "states":
        [
        ],
        "zips": "",
        "countries":
        [
        ],
        "exclude_po": true,
        "exclude_df": false
        }
        ,{
        "module":
        {
        "id": 152,
        "code": "upsxml",
        "name": "UPS Developer Kit",
        "provider": "Miva Merchant",
        "api_ver": "5.72",
        "version": "10.0000",
        "module": "modules\/shipping\/upsxml.mvc",
        "refcount": 1,
        "active": true
        },
        "mod_code": "upsxml",
        "meth_code": "07",
        "method_name": "UPS Worldwide Express\u0026reg\u003B",
        "agrpcount": 0,
        "priority": 0,
        "descrip": "",
        "adjusttype": "",
        "adjustamnt": 0.00,
        "min_subtot": 0.00,
        "max_subtot": 0.00,
        "min_quan": 0,
        "max_quan": 0,
        "min_weight": 0.00,
        "max_weight": 0.00,
        "states":
        [
        ],
        "zips": "",
        "countries":
        [
        ],
        "exclude_po": true,
        "exclude_df": false
        }
        ,{
        "module":
        {
        "id": 152,
        "code": "upsxml",
        "name": "UPS Developer Kit",
        "provider": "Miva Merchant",
        "api_ver": "5.72",
        "version": "10.0000",
        "module": "modules\/shipping\/upsxml.mvc",
        "refcount": 1,
        "active": true
        },
        "mod_code": "upsxml",
        "meth_code": "08",
        "method_name": "UPS Worldwide Expedited\u0026reg\u003B",
        "agrpcount": 0,
        "priority": 0,
        "descrip": "",
        "adjusttype": "",
        "adjustamnt": 0.00,
        "min_subtot": 0.00,
        "max_subtot": 0.00,
        "min_quan": 0,
        "max_quan": 0,
        "min_weight": 0.00,
        "max_weight": 0.00,
        "states":
        [
        ],
        "zips": "",
        "countries":
        [
        ],
        "exclude_po": true,
        "exclude_df": false
        }
        ,{
        "module":
        {
        "id": 152,
        "code": "upsxml",
        "name": "UPS Developer Kit",
        "provider": "Miva Merchant",
        "api_ver": "5.72",
        "version": "10.0000",
        "module": "modules\/shipping\/upsxml.mvc",
        "refcount": 1,
        "active": true
        },
        "mod_code": "upsxml",
        "meth_code": "11",
        "method_name": "UPS\u0026reg\u003B Standard",
        "agrpcount": 0,
        "priority": 0,
        "descrip": "",
        "adjusttype": "",
        "adjustamnt": 0.00,
        "min_subtot": 0.00,
        "max_subtot": 0.00,
        "min_quan": 0,
        "max_quan": 0,
        "min_weight": 0.00,
        "max_weight": 0.00,
        "states":
        [
        ],
        "zips": "",
        "countries":
        [
        ],
        "exclude_po": true,
        "exclude_df": false
        }
        ,{
        "module":
        {
        "id": 152,
        "code": "upsxml",
        "name": "UPS Developer Kit",
        "provider": "Miva Merchant",
        "api_ver": "5.72",
        "version": "10.0000",
        "module": "modules\/shipping\/upsxml.mvc",
        "refcount": 1,
        "active": true
        },
        "mod_code": "upsxml",
        "meth_code": "12",
        "method_name": "UPS 3 Day Select\u0026reg\u003B",
        "agrpcount": 0,
        "priority": 0,
        "descrip": "",
        "adjusttype": "",
        "adjustamnt": 0.00,
        "min_subtot": 0.00,
        "max_subtot": 0.00,
        "min_quan": 0,
        "max_quan": 0,
        "min_weight": 0.00,
        "max_weight": 0.00,
        "states":
        [
        ],
        "zips": "",
        "countries":
        [
        ],
        "exclude_po": true,
        "exclude_df": false
        }
        ,{
        "module":
        {
        "id": 152,
        "code": "upsxml",
        "name": "UPS Developer Kit",
        "provider": "Miva Merchant",
        "api_ver": "5.72",
        "version": "10.0000",
        "module": "modules\/shipping\/upsxml.mvc",
        "refcount": 1,
        "active": true
        },
        "mod_code": "upsxml",
        "meth_code": "13",
        "method_name": "UPS Next Day Air Saver\u0026reg\u003B",
        "agrpcount": 0,
        "priority": 0,
        "descrip": "",
        "adjusttype": "",
        "adjustamnt": 0.00,
        "min_subtot": 0.00,
        "max_subtot": 0.00,
        "min_quan": 0,
        "max_quan": 0,
        "min_weight": 0.00,
        "max_weight": 0.00,
        "states":
        [
        ],
        "zips": "",
        "countries":
        [
        ],
        "exclude_po": true,
        "exclude_df": false
        }
        ,{
        "module":
        {
        "id": 152,
        "code": "upsxml",
        "name": "UPS Developer Kit",
        "provider": "Miva Merchant",
        "api_ver": "5.72",
        "version": "10.0000",
        "module": "modules\/shipping\/upsxml.mvc",
        "refcount": 1,
        "active": true
        },
        "mod_code": "upsxml",
        "meth_code": "14",
        "method_name": "UPS Next Day Air\u0026reg\u003B Early A.M.\u0026reg\u003B",
        "agrpcount": 0,
        "priority": 0,
        "descrip": "",
        "adjusttype": "",
        "adjustamnt": 0.00,
        "min_subtot": 0.00,
        "max_subtot": 0.00,
        "min_quan": 0,
        "max_quan": 0,
        "min_weight": 0.00,
        "max_weight": 0.00,
        "states":
        [
        ],
        "zips": "",
        "countries":
        [
        ],
        "exclude_po": true,
        "exclude_df": false
        }
        ,{
        "module":
        {
        "id": 152,
        "code": "upsxml",
        "name": "UPS Developer Kit",
        "provider": "Miva Merchant",
        "api_ver": "5.72",
        "version": "10.0000",
        "module": "modules\/shipping\/upsxml.mvc",
        "refcount": 1,
        "active": true
        },
        "mod_code": "upsxml",
        "meth_code": "308",
        "method_name": "UPS Freight\u0026reg\u003B LTL",
        "agrpcount": 0,
        "priority": 0,
        "descrip": "",
        "adjusttype": "",
        "adjustamnt": 0.00,
        "min_subtot": 0.00,
        "max_subtot": 0.00,
        "min_quan": 0,
        "max_quan": 0,
        "min_weight": 0.00,
        "max_weight": 0.00,
        "states":
        [
        ],
        "zips": "",
        "countries":
        [
        ],
        "exclude_po": true,
        "exclude_df": false
        }
        ,{
        "module":
        {
        "id": 152,
        "code": "upsxml",
        "name": "UPS Developer Kit",
        "provider": "Miva Merchant",
        "api_ver": "5.72",
        "version": "10.0000",
        "module": "modules\/shipping\/upsxml.mvc",
        "refcount": 1,
        "active": true
        },
        "mod_code": "upsxml",
        "meth_code": "309",
        "method_name": "UPS Freight\u0026reg\u003B LTL - Guaranteed",
        "agrpcount": 0,
        "priority": 0,
        "descrip": "",
        "adjusttype": "",
        "adjustamnt": 0.00,
        "min_subtot": 0.00,
        "max_subtot": 0.00,
        "min_quan": 0,
        "max_quan": 0,
        "min_weight": 0.00,
        "max_weight": 0.00,
        "states":
        [
        ],
        "zips": "",
        "countries":
        [
        ],
        "exclude_po": true,
        "exclude_df": false
        }
        ,{
        "module":
        {
        "id": 152,
        "code": "upsxml",
        "name": "UPS Developer Kit",
        "provider": "Miva Merchant",
        "api_ver": "5.72",
        "version": "10.0000",
        "module": "modules\/shipping\/upsxml.mvc",
        "refcount": 1,
        "active": true
        },
        "mod_code": "upsxml",
        "meth_code": "334",
        "method_name": "UPS Freight\u0026reg\u003B LTL - Guaranteed A.M.",
        "agrpcount": 0,
        "priority": 0,
        "descrip": "",
        "adjusttype": "",
        "adjustamnt": 0.00,
        "min_subtot": 0.00,
        "max_subtot": 0.00,
        "min_quan": 0,
        "max_quan": 0,
        "min_weight": 0.00,
        "max_weight": 0.00,
        "states":
        [
        ],
        "zips": "",
        "countries":
        [
        ],
        "exclude_po": true,
        "exclude_df": false
        }
        ,{
        "module":
        {
        "id": 152,
        "code": "upsxml",
        "name": "UPS Developer Kit",
        "provider": "Miva Merchant",
        "api_ver": "5.72",
        "version": "10.0000",
        "module": "modules\/shipping\/upsxml.mvc",
        "refcount": 1,
        "active": true
        },
        "mod_code": "upsxml",
        "meth_code": "54",
        "method_name": "UPS Worldwide Express Plus\u0026reg\u003B",
        "agrpcount": 0,
        "priority": 0,
        "descrip": "",
        "adjusttype": "",
        "adjustamnt": 0.00,
        "min_subtot": 0.00,
        "max_subtot": 0.00,
        "min_quan": 0,
        "max_quan": 0,
        "min_weight": 0.00,
        "max_weight": 0.00,
        "states":
        [
        ],
        "zips": "",
        "countries":
        [
        ],
        "exclude_po": true,
        "exclude_df": false
        }
        ,{
        "module":
        {
        "id": 152,
        "code": "upsxml",
        "name": "UPS Developer Kit",
        "provider": "Miva Merchant",
        "api_ver": "5.72",
        "version": "10.0000",
        "module": "modules\/shipping\/upsxml.mvc",
        "refcount": 1,
        "active": true
        },
        "mod_code": "upsxml",
        "meth_code": "59",
        "method_name": "UPS 2nd Day Air A.M.\u0026reg\u003B",
        "agrpcount": 0,
        "priority": 0,
        "descrip": "",
        "adjusttype": "",
        "adjustamnt": 0.00,
        "min_subtot": 0.00,
        "max_subtot": 0.00,
        "min_quan": 0,
        "max_quan": 0,
        "min_weight": 0.00,
        "max_weight": 0.00,
        "states":
        [
        ],
        "zips": "",
        "countries":
        [
        ],
        "exclude_po": true,
        "exclude_df": false
        }
        ,{
        "module":
        {
        "id": 152,
        "code": "upsxml",
        "name": "UPS Developer Kit",
        "provider": "Miva Merchant",
        "api_ver": "5.72",
        "version": "10.0000",
        "module": "modules\/shipping\/upsxml.mvc",
        "refcount": 1,
        "active": true
        },
        "mod_code": "upsxml",
        "meth_code": "65",
        "method_name": "UPS Worldwide Saver\u0026reg\u003B",
        "agrpcount": 0,
        "priority": 0,
        "descrip": "",
        "adjusttype": "",
        "adjustamnt": 0.00,
        "min_subtot": 0.00,
        "max_subtot": 0.00,
        "min_quan": 0,
        "max_quan": 0,
        "min_weight": 0.00,
        "max_weight": 0.00,
        "states":
        [
        ],
        "zips": "",
        "countries":
        [
        ],
        "exclude_po": true,
        "exclude_df": false
        }
        ,{
        "module":
        {
        "id": 152,
        "code": "upsxml",
        "name": "UPS Developer Kit",
        "provider": "Miva Merchant",
        "api_ver": "5.72",
        "version": "10.0000",
        "module": "modules\/shipping\/upsxml.mvc",
        "refcount": 1,
        "active": true
        },
        "mod_code": "upsxml",
        "meth_code": "92",
        "method_name": "UPS SurePost\u0026reg\u003B Less Than 1 Lb",
        "agrpcount": 0,
        "priority": 0,
        "descrip": "",
        "adjusttype": "",
        "adjustamnt": 0.00,
        "min_subtot": 0.00,
        "max_subtot": 0.00,
        "min_quan": 0,
        "max_quan": 0,
        "min_weight": 0.00,
        "max_weight": 0.00,
        "states":
        [
        ],
        "zips": "",
        "countries":
        [
        ],
        "exclude_po": false,
        "exclude_df": false
        }
        ,{
        "module":
        {
        "id": 152,
        "code": "upsxml",
        "name": "UPS Developer Kit",
        "provider": "Miva Merchant",
        "api_ver": "5.72",
        "version": "10.0000",
        "module": "modules\/shipping\/upsxml.mvc",
        "refcount": 1,
        "active": true
        },
        "mod_code": "upsxml",
        "meth_code": "93",
        "method_name": "UPS SurePost\u0026reg\u003B 1 Lb Or Greater",
        "agrpcount": 0,
        "priority": 0,
        "descrip": "",
        "adjusttype": "",
        "adjustamnt": 0.00,
        "min_subtot": 0.00,
        "max_subtot": 0.00,
        "min_quan": 0,
        "max_quan": 0,
        "min_weight": 0.00,
        "max_weight": 0.00,
        "states":
        [
        ],
        "zips": "",
        "countries":
        [
        ],
        "exclude_po": false,
        "exclude_df": false
        }
        ,{
        "module":
        {
        "id": 152,
        "code": "upsxml",
        "name": "UPS Developer Kit",
        "provider": "Miva Merchant",
        "api_ver": "5.72",
        "version": "10.0000",
        "module": "modules\/shipping\/upsxml.mvc",
        "refcount": 1,
        "active": true
        },
        "mod_code": "upsxml",
        "meth_code": "94",
        "method_name": "UPS SurePost\u0026reg\u003B Bound Printed Material",
        "agrpcount": 0,
        "priority": 0,
        "descrip": "",
        "adjusttype": "",
        "adjustamnt": 0.00,
        "min_subtot": 0.00,
        "max_subtot": 0.00,
        "min_quan": 0,
        "max_quan": 0,
        "min_weight": 0.00,
        "max_weight": 0.00,
        "states":
        [
        ],
        "zips": "",
        "countries":
        [
        ],
        "exclude_po": false,
        "exclude_df": false
        }
        ,{
        "module":
        {
        "id": 152,
        "code": "upsxml",
        "name": "UPS Developer Kit",
        "provider": "Miva Merchant",
        "api_ver": "5.72",
        "version": "10.0000",
        "module": "modules\/shipping\/upsxml.mvc",
        "refcount": 1,
        "active": true
        },
        "mod_code": "upsxml",
        "meth_code": "95",
        "method_name": "UPS SurePost\u0026reg\u003B Media",
        "agrpcount": 0,
        "priority": 0,
        "descrip": "",
        "adjusttype": "",
        "adjustamnt": 0.00,
        "min_subtot": 0.00,
        "max_subtot": 0.00,
        "min_quan": 0,
        "max_quan": 0,
        "min_weight": 0.00,
        "max_weight": 0.00,
        "states":
        [
        ],
        "zips": "",
        "countries":
        [
        ],
        "exclude_po": false,
        "exclude_df": false
        }
        ],
        "total_count": 19,
        "start_offset": 0
        }
        }
        Colin Puttick
        Miva Web Developer @ Glendale Designs

        Comment


          #5
          I'm interested. What's the script to run your version?

          The line of code I posted retrieves all of the available shipping options available during checkout for the products in the basket. I've found that the product level shipping options (when you check the "limited" checkbox and click on specific options in the Shipping Rules, they will override the others. The last part is why this might be the best option for what I need to accomplish.

          Summary, if you have an option excluded in the Shipping Tab Method rules, that line of code won't have that option in the array the function returns. But, Product level shipping rules appear to take priority.

          Scott
          Need to offer Shipping Insurance?
          Interactive Design Solutions https://www.myids.net
          MivaMerchant Business Partner | Certified MivaMerchant Web Developer
          Competitive Rates, Custom Modules and Integrations, Store Integration
          AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
          My T-shirt Collection is mostly MivaCon T-shirts!!

          Comment

          Working...
          X