Forums / General Questions / Special container shipping question

Special container shipping question

Views: 609

Results 1 to 4 of 4
27 Aug 2014, 4:10 AM
#1
mikecass avatar

mikecass

New Zenner

Join Date:
Sep 2004
Posts:
27
Plugin Contributions:
0

Special container shipping question

Hello,

I'm using the latest version of zen cart and I have a question or two.

I ship in special containers (boxes) that hold up to 2 products per container. The products being put in the containers may have different weights. ( the products are uniform in dimensions so I can guarantee that 2 will fit in 1 container.

So my shipping calculation must be the number of containers used and the weight of the products in the containers, plus the cost of each container. I can not calculate the number of boxes by weight alone.

Please, how can I do this with Zen Cart.

Thanks

27 Aug 2014, 1:20 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Special container shipping question

What shipping module are you using? USPS? UPS? or what?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

27 Aug 2014, 3:31 PM
#3
mikecass avatar

mikecass

New Zenner

Join Date:
Sep 2004
Posts:
27
Plugin Contributions:
0

Re: Special container shipping question

I am creating a new shipping module for Unishippers.
It is based on the UPS shipping module.

Thank you for your help!
Mike Cassidy

27 Aug 2014, 3:46 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Special container shipping question

You could customize the UPS module:
/includes/shipping/ups.php

with the code in RED:

        if (!in_array($type, $allowed_methods)) continue;
        // EOF: UPS USPS
        $cost = preg_replace('/[^0-9.]/', '',  $cost);
[B]// bof: add extra container charge
global $total_count;
$extra_charge = 5.00;
$extra_container_charge = (ceil(($total_count/2)) * $extra_charge);
[/B]        $methods[] = array('id' => $type,
                           'title' => $this->types[$type],
                           'cost' => ($cost * $shipping_num_boxes)[B] + $extra_container_charge[/B] + (MODULE_SHIPPING_UPS_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_UPS_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_UPS_HANDLING) );
[B]// eof: add extra container charge
[/B]      }

      $this->quotes['methods'] = $methods;

Just set your extra charge per container from 5.00 to whatever you want to charge per container ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!