osCommerce 4 osCommerce 4 App Shop Support Services App Shop Us
• Checkout
• Get in touch

osCommerce

The e-commerce.

# Minimum cost to ship the product

## Recommended Posts

Hi everyone,

Anyone know if there is a total order form that allows me to specify if: The total order amount does not reach a minimum and you can not do the shipping?

Eg

Sub-Total 1 + 2 + 3 = 9.8 \$

Total = 9.8 \$ (but the minimum cost = 10 \$)

Then show a Message = "Sorry, we can only do the shipping from \$ 10"

There is something similar? Or any idea how?

Appreciate any help.. Cheers...

##### Share on other sites

Mac,

You could enable The Low Order total module and set your minimum purchase amount of \$x.xx. Anything less than x.xx would be subject to the low order fee.

Chris

##### Share on other sites

Hi Chris!!...

Thanks for your answer.. The problem in the Low Order Total Module, you have to pay For Orders Under certain amount..

I dont want to charge more in the total price.

Minimum ordering for delivery = 10 \$

Less than that amount = "Error Message"

(One of the advantages I offer with home delivery service is "not delivery charge")

Appreciate any help.. Thanks

Mac,

You could enable The Low Order total module and set your minimum purchase amount of \$x.xx. Anything less than x.xx would be subject to the low order fee.

Chris

##### Share on other sites

In the Community Add-Ons is an example but is for the v2.2.

I need the same but for the 2.3.1 version :)

##### Share on other sites

Hi burt, thanks!!..

I see your recomendation but in the weight case is more easy because your have:

\$total_weight = \$cart->show_weight();

\$total_count = \$cart->count_contents();

in checkout_process.php

and you compare if (\$total_weight < SHIPPING_MIN_WEIGHT)

In my case i have to compare Eg. if (\$subtotal < MINIMUM_ORDER_SUBTOTAL) do something

but, where is the subtotal price variable to compare if greater or lesser? Mmmm... :/

Apreciate any help!!.. Thanks

http://www.clubosc.com/minimum-weight-to-checkout.html

which is WEIGHT. You can easily amend for postage price.

##### Share on other sites

Finally solved the problem!!!!

Thanks burt...

The solution:

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added)

VALUES ('Enter the Minimum Order to Ship', 'SHIPPING_MIN_ORDER', '0', 'The minimum order that you will ship. 0 = unlimited.', '7', '6', now());

In checkout_shipping.php

if ((SHIPPING_MIN_ORDER > 0) && (\$order->info['total'] < SHIPPING_MIN_ORDER)) tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, 'error_message=' . urlencode(sprintf(ERROR_MIN_ORDER_SHIPPING, SHIPPING_MIN_ORDER, SHIPPING_MIN_ORDER - \$order->info['total'])), 'NONSSL'));

And in /includes/languages/english.php

define('ERROR_MIN_ORDER_SHIPPING', ' The minimum order to shipping is %s euros. You need to add another %s euros to be able to checkout.');

Thanks to burt for the original code!!!!....

Cheers :)

##### Share on other sites

• 2 weeks later...

Hello!!....

I have a problem visualization whit Mozilla Firefox for the error solved up..

I'm not expert css and php. How I can do to make the same error is displayed in all browsers? Is there any way to put him top and fixed? (under the head and the logo).. The code is the same as above..

Apreciate any help..... :thumbsup:

Cheers

someone??

##### Share on other sites

Hello.. Let me explain..

In Chrome, IE, and others the error message is displayed well.. But in Mozilla Firefox, i dont know why the message is go up and right..

The CSS part to control the error is

```TD.headerError {
font-family: Tahoma, Verdana, Arial, sans-serif;
font-size: 12px;
background: #ff0000;
color: #ffffff;
font-weight : bold;
text-align : center;
}
```

but i'm no expert to css, I tried whit:

# position:fixed;

# right:5px;

# top:60px;

# position:absolute;

PLease, any idea to place the error in all browsers?

thanks!!..

##### Share on other sites

finally testing and testing and testing, I found the solution:

```TD.headerError {
font-family: Tahoma, Verdana, Arial, sans-serif;
font-size: 10px;
background: #ff0000;
color: #ffffff;
position:fixed;
z-index: 1;
left:0px;
right:0px;
bottom: 0%;
font-weight : bold;
text-align : center;
}
```

This causes the error display bottom, throughout extension, white text, bold, center and red background.

Well, patiently get to heaven!!..

Cheers

##### Share on other sites

• 2 years later...

In checkout_shipping.php

if ((SHIPPING_MIN_ORDER > 0) && (\$order->info['total'] < SHIPPING_MIN_ORDER)) tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, 'error_message=' . urlencode(sprintf(ERROR_MIN_ORDER_SHIPPING, SHIPPING_MIN_ORDER, SHIPPING_MIN_ORDER - \$order->info['total'])), 'NONSSL'));

any special place to insert this?

##### Share on other sites

know this is an old one.... but seems like what i need...

if i set min to 0 i can checkout...

if i set min to 50 and order for 100 i cant checkout.... i get a THIN red bar at top of page.... look at attached image

##### Share on other sites

btw.... tried a few modules.... if i get one to work i will still have one problem in that they block checkout in general...

what i want to use it for is to block shipping options except one: store pickup

the story behind is that i live in a small town where it does not make sense to be deliver if the order is not above a set minimum..... then you would say why not just mail the stuff.... well picture a family size pizza in an envelope and 2 days to get there.... :-D

##### Share on other sites

no one able to help out? is there a way to get the module to NOT block store pickup option?

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.