Zen Cart Logo

Minimum shipping fee

Views: 9,364

Results 21 to 40 of 60
29 Mar 2009, 3:31 PM
#21
windowla avatar

windowla

New Zenner

Join Date:
Mar 2009
Posts:
36
Plugin Contributions:
0

Minimum shipping fee

*** duplicate post deleted *** Please do not post in more than one thread.

5 Apr 2009, 11:09 PM
#22
mygalaxy avatar

mygalaxy

New Zenner

Join Date:
Dec 2007
Posts:
38
Plugin Contributions:
0

Re: Minimum shipping fee

Just curious... does the handling fee show a separate charge from the shipping charge during checkout so the customer can differentiate between the two?

6 Apr 2009, 2:28 AM
#23
ajeh avatar

ajeh

Oba-san

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

Re: Minimum shipping fee

No they are combined together ...

31 May 2009, 12:50 AM
#24
webskipper avatar

webskipper

Totally Zenned

Join Date:
Nov 2007
Location:
USA
Posts:
876
Plugin Contributions:
2

Re: Minimum shipping fee

Ajeh:

umm ... well ... I'd search for the word:
cost

I did as you said and broke the USPS module. The module would not appear unless I undid everything.

How should it have been written?

This breaks it::unsure:

if ($cost < 6.00) {
$methods[] = array('id' => $type,
'title' => $title,
'cost' => (6.00 + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
} else {
$methods[] = array('id' => $type,
'title' => $this->types[$type],
'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
}

31 May 2009, 5:17 AM
#25
ajeh avatar

ajeh

Oba-san

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

Re: Minimum shipping fee

Probably a misplaced bracket ...

The original code reads:

          $methods[] = array('id' => $type,
                             'title' => $title,
                             'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
        }

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

The code should read when changed:

          if ($cost < 6.00) {
          $methods[] = array('id' => $type,
                             'title' => $title,
                             'cost' => (6.00 + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
          } else {
          $methods[] = array('id' => $type,
                             'title' => $title,
                             'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
          }
        }

        $this->quotes['methods'] = $methods;
31 May 2009, 6:38 PM
#26
webskipper avatar

webskipper

Totally Zenned

Join Date:
Nov 2007
Location:
USA
Posts:
876
Plugin Contributions:
2

Re: Minimum shipping fee

It's a beautiful thing!:clap:

Perhaps you'd like to create a new contribution to include all of these minimum shipping prices?

1 Jun 2009, 6:15 AM
#27
ajeh avatar

ajeh

Oba-san

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

Re: Minimum shipping fee

Glad you have this working now ... :smile:

Get enough examples and who needs an add-on? :cool:

13 Jul 2009, 12:05 AM
#28
marleyenator avatar

marleyenator

New Zenner

Join Date:
Jul 2009
Posts:
1
Plugin Contributions:
0

Re: Minimum shipping fee

Hi, im new to all this and was wondering if I could do a per item rate with a minimum shipping fee? thanks!

13 Jul 2009, 12:28 AM
#29
ajeh avatar

ajeh

Oba-san

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

Re: Minimum shipping fee

I want a Minimum of $9.00 shipping fee ... but just $1.50 per Item after that ...

I set the Item Rate item charges as:
Handling: 7.50
Per Item: 1.50

Now I get $9.00 plus $1.50 per additional item ... :smile:

9 Jan 2010, 4:51 AM
#30
webskipper avatar

webskipper

Totally Zenned

Join Date:
Nov 2007
Location:
USA
Posts:
876
Plugin Contributions:
2

Re: Minimum shipping fee

Ajeh:

Probably a misplaced bracket ...

The original code reads:

      $methods[] = array('id' => $type,
                         'title' => $title,
                         'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
    }

    $this->quotes['methods'] = $methods;
> 
> The code should read when changed:
> ```
          if ($cost < 6.00) {
          $methods[] = array('id' => $type,
                             'title' => $title,
                             'cost' => (6.00 + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
          } else {
          $methods[] = array('id' => $type,
                             'title' => $title,
                             'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
          }
        }

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

Thanks for your new USPS update. How should this look now?:D

9 Jan 2010, 1:32 PM
#31
ajeh avatar

ajeh

Oba-san

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

Re: Minimum shipping fee

I do no t believe you'd need to make any changes to that since it is run off the $cost ...

Be sure to test it out ... :smile:

9 Jan 2010, 3:46 PM
#32
webskipper avatar

webskipper

Totally Zenned

Join Date:
Nov 2007
Location:
USA
Posts:
876
Plugin Contributions:
2

Re: Minimum shipping fee

The cost did not work. I uploaded the new USPS.php and then went in and made the change. Was there something else?

9 Jan 2010, 3:55 PM
#33
ajeh avatar

ajeh

Oba-san

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

Re: Minimum shipping fee

Could you post the code from lines 218, start of the FOR loop to the end of the FOR loop in there?

9 Jan 2010, 4:27 PM
#34
webskipper avatar

webskipper

Totally Zenned

Join Date:
Nov 2007
Location:
USA
Posts:
876
Plugin Contributions:
2

Re: Minimum shipping fee

Anything for you.:wink:

218 is a blank line, just for the record.

    $methods = array();
    $size = sizeof($uspsQuote);
    for ($i=0; $i<$size; $i++) {
      list($type, $cost) = each($uspsQuote[$i]);

      // BOF: UPS USPS
      $title = ((isset($this->types[$type])) ? $this->types[$type] : $type);
      if(in_array('Display transit time', explode(', ', MODULE_SHIPPING_USPS_OPTIONS)))    $title .= $transittime[$type];
      /*
      $methods[] = array('id' => $type,
      'title' => ((isset($this->types[$type])) ? $this->types[$type] : $type),
      'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
      */
      $cost = preg_replace('/[^0-9.]/', '',  $cost);
      $methods[] = array('id' => $type,
                         'title' => $title,
                         'cost' => ($cost * $shipping_num_boxes) + (MODULE_SHIPPING_USPS_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_USPS_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_USPS_HANDLING) );

    }

FYI- Priority Shipping went up $0.50 online. At east there is a slight discount for using Priority Flat rate envelopes.

9 Jan 2010, 5:43 PM
#35
webskipper avatar

webskipper

Totally Zenned

Join Date:
Nov 2007
Location:
USA
Posts:
876
Plugin Contributions:
2

Re: Minimum shipping fee

That was dumb.

This is everything:

    $methods = array();
    $size = sizeof($uspsQuote);
    for ($i=0; $i<$size; $i++) {
      list($type, $cost) = each($uspsQuote[$i]);

      // BOF: UPS USPS
      $title = ((isset($this->types[$type])) ? $this->types[$type] : $type);
      if(in_array('Display transit time', explode(', ', MODULE_SHIPPING_USPS_OPTIONS)))    $title .= $transittime[$type];

/*
$methods[] = array('id' => $type,
'title' => ((isset($this->types[$type])) ? $this->types[$type] : $type),
'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
/
/
$cost = preg_replace('/[^0-9.]/', '', $cost);
$methods[] = array('id' => $type,
'title' => $title,
'cost' => ($cost * $shipping_num_boxes) + (MODULE_SHIPPING_USPS_HANDLING_METHOD == 'Box' ? MODULE_SHIPPING_USPS_HANDLING * $shipping_num_boxes : MODULE_SHIPPING_USPS_HANDLING) );

    }

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

*/
// BOF: USPS Minimum Shipping

           if ($cost < 6.00) {
      $methods[] = array('id' => $type,
                         'title' => $title,
                         'cost' => (6.00 + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
      } else {
      $methods[] = array('id' => $type,
                         'title' => $title,
                         'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes);
      }
    }

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

// EOF: USPS Minimum Shipping

Works Today!

9 Jan 2010, 8:44 PM
#36
ajeh avatar

ajeh

Oba-san

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

Re: Minimum shipping fee

You code works great but you appear to have commented out this line:

$cost = preg_replace('/[^0-9.]/', '', $cost);
9 Jan 2010, 10:31 PM
#37
webskipper avatar

webskipper

Totally Zenned

Join Date:
Nov 2007
Location:
USA
Posts:
876
Plugin Contributions:
2

Re: Minimum shipping fee

Yeah that line of code could be useful :blush:

I inserted it right below where I added the tag BOF Minimum Shipping

9 Jan 2010, 11:19 PM
#38
ajeh avatar

ajeh

Oba-san

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

Re: Minimum shipping fee

Glad to hear that this still works for you ... :smile:

Good place to put the code so you don't exclude it in the future ... :cool:

17 Feb 2010, 3:10 PM
#39
jdw1979 avatar

jdw1979

Zen Follower

Join Date:
Jun 2009
Location:
NC
Posts:
174
Plugin Contributions:
0

Re: Minimum shipping fee

How can I make a minimum shipping fee of 9.50 across the board? We're using the UPS shipping module.

17 Feb 2010, 4:43 PM
#40
ajeh avatar

ajeh

Oba-san

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

Re: Minimum shipping fee

Adapt the USPS code above for UPS and use 9.50 instead of 6.00 ...

The UPS shipping module is at:
/includes/modules/shipping/ups.php