Minimum shipping amount
14 posts
• Page 1 of 1
Minimum shipping amount
Was wondering if there is a way to set a minimum shipping amount. Say if shipping is calculated at $2.50, but minimum is set to $5.00, it will change the shipping to $5.00 on the checkout. Is there a place to set this in OC, or is there an extension that will do this.
Thanks!
Thanks!
- cirrussky
- Posts: 21
- Joined: Tue Feb 28, 2012 7:30 am
Re: Minimum shipping amount
All of my shipping extensions (http://www.getclearthinking.com/shipping-methods) include a "Final Cost Min" field, which works as you describe. What type of shipping setup do you have? How do you calculate your rates?
-

Johnathan - Global Moderator
- Posts: 2879
- Joined: Thu Dec 17, 2009 7:08 pm
Re: Minimum shipping amount
I only use USPS and UPS and the shipping is calculated from them.
- cirrussky
- Posts: 21
- Joined: Tue Feb 28, 2012 7:30 am
Re: Minimum shipping amount
In that case, you'll have to modify the actual USPS and UPS files. You can try making this code change, although I haven't tested it and can't guarantee it will work:
Replace 5.50 with your minimum shipping amount.
- Code: Select all
IN:
/catalog/model/shipping/usps.php
/catalog/model/shipping/ups.php
BEFORE ALL INSTANCES OF:
$quote_data[
ADD:
if ($cost < 5.50) $cost = 5.50;
Replace 5.50 with your minimum shipping amount.
-

Johnathan - Global Moderator
- Posts: 2879
- Joined: Thu Dec 17, 2009 7:08 pm
Re: Minimum shipping amount
Thanks, will give that a try and see if it works.
- cirrussky
- Posts: 21
- Joined: Tue Feb 28, 2012 7:30 am
Re: Minimum shipping amount
I tried what you said and got this error on both of the files.
Parse error: syntax error, unexpected T_STRING in /home/pagancre/public_html/catalog/model/shipping/usps.php on line 1
any idea why it is doing that?
Thanks!
Parse error: syntax error, unexpected T_STRING in /home/pagancre/public_html/catalog/model/shipping/usps.php on line 1
any idea why it is doing that?
Thanks!
- cirrussky
- Posts: 21
- Joined: Tue Feb 28, 2012 7:30 am
Re: Minimum shipping amount
Did you place the code on its own line? It should be on its own line.
Other than that, I can only say make sure you copied and pasted it right. I haven't tested it, but it should work if placed correctly.
Other than that, I can only say make sure you copied and pasted it right. I haven't tested it, but it should work if placed correctly.
-

Johnathan - Global Moderator
- Posts: 2879
- Joined: Thu Dec 17, 2009 7:08 pm
Re: Minimum shipping amount
yes, i put it on it's own seperate line. above the code you showed.
Was there suppose to only the code that you were showing, because there were other code behind the [ in the file. will give it another try, or can i send you the files and get you to put the code in. I am kinda new to this, so i may be doing something wrong.
thanks!!!
Was there suppose to only the code that you were showing, because there were other code behind the [ in the file. will give it another try, or can i send you the files and get you to put the code in. I am kinda new to this, so i may be doing something wrong.
thanks!!!
- cirrussky
- Posts: 21
- Joined: Tue Feb 28, 2012 7:30 am
Re: Minimum shipping amount
this is an one of the spots i entered it into.
is this how it should be?
thanks!!!!
- Code: Select all
if ($this->config->get('ups_' . strtolower($this->config->get('ups_origin')) . '_' . $code)) {
if ($cost < 5.50) $cost = 5.50;
$quote_data[$code] = array(
is this how it should be?
thanks!!!!
Last edited by Johnathan on Sun Jun 03, 2012 1:13 pm, edited 1 time in total.
Reason: Added [code] tags for readability
Reason: Added [code] tags for readability
- cirrussky
- Posts: 21
- Joined: Tue Feb 28, 2012 7:30 am
Re: Minimum shipping amount
hmmm, don't know what is going on.. tried it again and still getting the same errors. any ideas?? can you send me a copy of yours and let me try them?
- cirrussky
- Posts: 21
- Joined: Tue Feb 28, 2012 7:30 am
Re: Minimum shipping amount
Here's the 1.5.3 version of /catalog/model/shipping/ups.php. It literally only has the change I mentioned, so I'm not sure why it would work for me but not you. You should make sure you're not getting any other errors without the mod. Other than that I'm not sure what to tell you.
- Attachments
-
ups.php- (12.42 KiB) Downloaded 24 times
-

Johnathan - Global Moderator
- Posts: 2879
- Joined: Thu Dec 17, 2009 7:08 pm
Re: Minimum shipping amount
will this work with 1.5.2.1, i will give it a try and see.
thanks!!
thanks!!
- cirrussky
- Posts: 21
- Joined: Tue Feb 28, 2012 7:30 am
Re: Minimum shipping amount
Hi,
tried the PHP file you posted on my site which i run 1.5.2.1. still didn't work was getting a different error in line 49 of the file. will keep playing with it and maybe i can eventually get it to work.
tried the PHP file you posted on my site which i run 1.5.2.1. still didn't work was getting a different error in line 49 of the file. will keep playing with it and maybe i can eventually get it to work.
- cirrussky
- Posts: 21
- Joined: Tue Feb 28, 2012 7:30 am
14 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 10 guests























