Forums / Built-in Shipping and Payment Modules / Use UPS XML and Table Rates

Use UPS XML and Table Rates

Results 1 to 11 of 11
19 Dec 2012, 23:51
#1
timhersh avatar

timhersh

Zen Follower

Join Date:
Aug 2008
Posts:
274
Plugin Contributions:
0

Use UPS XML and Table Rates

Hello,

I am using zen cart 1.5. Have an unusual request.

I have a client who has this site http://www.domo-online.com/Outboard-Motor-Oil/discount-outboard-motor-oil-ezp-1.html

They sell oil. In drums and gallons.

Currently they are setup with the UPS XML module. It works great. BUT if the customer orders a Drum they want the website to use the table rates (which I can setup) so that it will charge them freight based on the state and product they ordered. Each drum has a different rate to ship to states.

The challenge is that I need to account for people ordering drums and gallons--so combine the two totals. I know I can check to see if they ordered an item from the "drum" category but they also have the 'drums' listed under other categories--linked.

I think I would need to check if they ordered a certain "product number" and if so then get the table rate (based on which product they ordered) then add it to the UPS total

any help would be great, not really sure how to do this. I understand the logic.
20 Dec 2012, 07:23
#2
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Posts:
1,818
Plugin Contributions:
2

Re: Use UPS XML and Table Rates

Not quite as unusual as one might think. I've thought a little too much about this exact same scenario.

If a customer orders a product requiring freight and a product which can ship via parcel... could the store just send both products together via freight? Not ideal as it would be a little higher in cost... but at least the website would provide a shipping estimate without too much additional work. If the store wanted they could also add a statement to the checkout letting people know the actual shipping cost may be less (and they can call / email / contact for a final shipping quote). And if the store is doing payment authorization - you can typically request a lower capture amount than the authorization amount - so in the end the customer can be charged just for the real shipping cost. Again not ideal, but an easy change.

I suspect to tackle this the way the store wants, one would have to build a custom shipping module which understands different shipping carriers (table and UPS), which products can be shipped by which carrier, builds individual quotes for each carrier, adds the individual quotes together, and would probably not be a bad idea for the module to somehow save the shipping method + cost for each quote (and contained products) so it can later be pulled up from the admin (for shipping / invoicing purposes). Quite a bit of work, but fits the needs.

Maybe someone else has some alternative ideas...
20 Dec 2012, 16:39
#3
timhersh avatar

timhersh

Zen Follower

Join Date:
Aug 2008
Posts:
274
Plugin Contributions:
0

Re: Use UPS XML and Table Rates

Thank you, I thought there would be a way to just edit the ups module to check the flat rate table option and add them together
21 Dec 2012, 14:54
#4
timhersh avatar

timhersh

Zen Follower

Join Date:
Aug 2008
Posts:
274
Plugin Contributions:
0

Re: Use UPS XML and Table Rates

any other ideas out there on how to edit the existing modules to achieve this?
23 Dec 2012, 17:41
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: Use UPS XML and Table Rates

This is actually not as hard as you think ... :smile:

If you could provide a few more details ... I can tell you how to do this ...

When an Order is made, what specifically can be used as an indicator of Products that can ONLY use Table Rates ...

Example, would the master_categories_id of a Product indicate if the Product can go via UPS or Table Rate?
27 Dec 2012, 21:44
#6
timhersh avatar

timhersh

Zen Follower

Join Date:
Aug 2008
Posts:
274
Plugin Contributions:
0

Re: Use UPS XML and Table Rates

Ajeh:

This is actually not as hard as you think ... :smile:

If you could provide a few more details ... I can tell you how to do this ...

When an Order is made, what specifically can be used as an indicator of Products that can ONLY use Table Rates ...

Example, would the master_categories_id of a Product indicate if the Product can go via UPS or Table Rate?


Thank you that would be great. I could use a master category but that would cause a problem since the "drums" are in more than one category. Would it be possible to use product id#'s? That would be best since there isnt' really a specific category that would ALL go the table rate

thank you
27 Dec 2012, 22:17
#7
timhersh avatar

timhersh

Zen Follower

Join Date:
Aug 2008
Posts:
274
Plugin Contributions:
0

Re: Use UPS XML and Table Rates

Actually it looks like I will need to use the "zone rates" module since it will charge a different rate depending on the state they are in

thanks
27 Dec 2012, 23:43
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Posts:
62,757
Plugin Contributions:
1

Re: Use UPS XML and Table Rates

Let's say you have 3 master_category_id values for the specific Categories that are no suppose to use UPS ...

You can test for these Products by using in the file:
/includes/modules/shipping/upsxml.php

Add the code in RED and set the master_categories_id to the Categories that you do not want to use the UPS shipping for ... if you need more Categories, just add additional lines for them ...

// bof: test for not allowed categories 10, 12 and 15
      if (!IS_ADMIN_FLAG) {
        $chk_cat = 0;
        // check how many Products are in the cart for master_categories_id 10 and 12
        $chk_cat += $_SESSION['cart']->in_cart_check('master_categories_id','10');
        $chk_cat += $_SESSION['cart']->in_cart_check('master_categories_id','12');
        $chk_cat += $_SESSION['cart']->in_cart_check('master_categories_id','15');
        // if any are found turn off the shipping module
        if ($chk_cat > 0) {
          $this->enabled = false;
        }
      }
// eof: test for not allowed categories 10, 12 and 15
      if (($this->enabled == true) && ((int)MODULE_SHIPPING_UPSXML_RATES_ZONE > 0)) {


then, whether you use the Table Rate table or another shipping module, you can use similar code and just change the test ...
01 Jan 2013, 20:57
#10
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Posts:
1,818
Plugin Contributions:
2

Re: Use UPS XML and Table Rates

That will effectively disable a shipping method for the order if it is not applicable based upon master category id... I think part of the OPs request was to have one order with products requiring different shipping methods (UPS / table / etc) and have a shipping quote returned for all items in the order (add together quotes from all necessary methods)... but maybe I was wrong?
03 Jan 2013, 15:56
#11
timhersh avatar

timhersh

Zen Follower

Join Date:
Aug 2008
Posts:
274
Plugin Contributions:
0

Re: Use UPS XML and Table Rates

Thank you. This seems to work. Only one challenge now.

When I do this it eliminates the UPS module all together if they pick any drum, that is ok. BUT I had it initially setup to count the items to get the total ($120 per item to ship it) but that won't work because if they add a NON-DRUM item it is counting that also. So then I tried by price but that won't work also because the cheapest drum is 860 and the most expensive drum is 2000.

how can I make it so that the module I'm using (zone tables) will ONLY count the items from the master categories (drum) to create the rate.

What I mean is if a customer picks at least 1 drum then the ups module will not come up, but I would like to make it so that the "zone table" module is done by quanity in the cart but only cart the quanity of drums that are in the cart to get the rate

thanks