Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Setting Maximum UPS Shipping Cost

Setting Maximum UPS Shipping Cost

Locked

Views: 892

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
2 Mar 2009, 5:12 PM
#1
tim_m avatar

tim_m

New Zenner

Join Date:
Jan 2009
Posts:
22
Plugin Contributions:
0

Setting Maximum UPS Shipping Cost

Is it possible to set a maximum cost for UPS Ground shipping? I would want the actual costs to be used in the shipping estimate until the maximum charge is reached.

For example, if our maximum shipping cost was $19.99, I would like to see UPS Ground show $12.50 if that was the cost, but no more than $19.99 if the actual cost were higher.

4 Mar 2009, 8:47 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Setting Maximum UPS Shipping Cost

You could customize the code based on the type in this section of code for the ups.php shipping module:

      for ($i=0; $i<$qsize; $i++) {
        list($type, $cost) = each($upsQuote[$i]);
        // BOF: UPS USPS
        if ($type=='STD') {
          if ($std_rcd) continue;
          else $std_rcd = true;
        }
        if (!in_array($type, $allowed_methods)) continue;
        // EOF: UPS USPS
        $methods[] = array('id' => $type,
                           'title' => $this->types[$type],
                           'cost' => ($cost + MODULE_SHIPPING_UPS_HANDLING) * $shipping_num_boxes);
      }