Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

free shipping


derekg22

Recommended Posts

Is there any way to offer free shipping for orders over a total amount, but STILL allow people to select other methods of shipping? The setting in OSCommerce under order totals simply removes all other shipping options.

 

I want to allow the user free ground shipping for orders over 100$, but still allow them to select the air and 2 day fedex options.

 

Any suggestions in terms of mods, or what files i should mess with?

 

thanks,

 

-dg

Link to comment
Share on other sites

well, i'm looking at the code right now, and it looks as if you could do something along these lines, but someone could maybe tell me if there is a better way to do this:

 

in checkout_shipping.php:

 

below

 

// get all available shipping quotes

$quotes = $shipping_modules->quote();

 

add some code like this:

 

if ($order->info['total'] > 100) //if the order total is more than 100$

{

 

add to the quotes array another option that is free shipping

 

(i have yet to figure out how the $quotes array is structured, so if anyone knows, that would be great help, if not, i'll have to sort through some more code)

 

}

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 year later...

 

Thank you for the link. I downloaded the contribution, however, I'm a bit confused where exactly to place the files in my store. Can anyone assist me with were exactly to place these new contrib. files.

 

Many thanks in advance.

Just when you knew all life's answers; Someone had to go and change all the questions!

Link to comment
Share on other sites

Thank you for the link. I downloaded the contribution, however, I'm a bit confused where exactly to place the files in my store. Can anyone assist me with were exactly to place these new contrib. files.

 

Many thanks in advance.

 

Ok... I got it to work, I guess I need to follow the directions on the contribution page first at: http://www.oscommerce.com/community/contri...y,2/search,free

 

However, I have a new problem. How can I specify that the free shipping is only for the 48 continuous states? Any answers would be much appreciated.

 

Thank you again

Just when you knew all life's answers; Someone had to go and change all the questions!

Link to comment
Share on other sites

  • 4 weeks later...
However, I have a new problem. How can I specify that the free shipping is only for the 48 continuous states? Any answers would be much appreciated.

 

Thank you again

 

Try this contribution....I'm working on the same thing...

 

http://www.oscommerce.com/community/contri...ons,3404/page,3

Edited by Brian_C

Brian Christensen

Link to comment
Share on other sites

Try this contribution....I'm working on the same thing...

 

http://www.oscommerce.com/community/contri...ons,3404/page,3

 

OK, I ran the sql from the above contrib. It still didn't work, but I figured out why.

 

After installing the above contrib, open /catalog/includes/modules/shipping/freeamount.php

 

Line 45 & 46 look like this:

 

//		  } elseif ($check['zone_id'] == $order->delivery['zone_id']) {
	  } elseif ($check['zone_country_id'] == $order->delivery['country']['id']) {

 

I changed it to this:

 

		  } elseif ($check['zone_id'] == $order->delivery['zone_id']) {
//		} elseif ($check['zone_country_id'] == $order->delivery['country']['id']) {

 

Everything seems to be working ok, but make sure you test it out first! (Edit) Also, make sure you go in to the admin tool and assign Free Amount Shipping to the zone that is created!

 

Brian Christensen

Edited by Brian_C

Brian Christensen

Link to comment
Share on other sites

  • 5 weeks later...
OK, I ran the sql from the above contrib. It still didn't work, but I figured out why.

 

After installing the above contrib, open /catalog/includes/modules/shipping/freeamount.php

 

Line 45 & 46 look like this:

 

//		  } elseif ($check['zone_id'] == $order->delivery['zone_id']) {
	  } elseif ($check['zone_country_id'] == $order->delivery['country']['id']) {

 

I changed it to this:

 

		  } elseif ($check['zone_id'] == $order->delivery['zone_id']) {
//		} elseif ($check['zone_country_id'] == $order->delivery['country']['id']) {

 

Everything seems to be working ok, but make sure you test it out first! (Edit) Also, make sure you go in to the admin tool and assign Free Amount Shipping to the zone that is created!

 

Brian Christensen

 

 

Wow, you just saved me alot of time with this! I really appreciate all the work put into the support & forums.

 

Thanks,

ladybird

Link to comment
Share on other sites

  • 1 year later...

FYI: If you are having problems where all zones in a Country are getting free shipping regardless of the zone selected in Admin make sure you do not have another zone setup for all of the country in Locations/Taxes -> Tax Zones.

Most Valuable OsCommerce Contributions:

Also Purchased (AP) Preselection (cuts this resource hogging query down to nothing) -- Contribution 3294

FedEx Automated Labels -- Contribution 2244

RMA Returns system -- Contribution 1136

Sort Products By Dropdown -- Contribution 4312

Ultimate SEO URLs -- Contribution 2823

Credit Class & Gift Voucher -- Contribution 282

Cross-Sell -- Contribution 5347

Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
Is anyone using this contribution with the order editor contribution?

I'm having the following error when using them both together:

 

http://www.oscommerce.com/forums/index.php?sho...p;#entry1142965

 

TIA for any ideas to help fixing this.

 

Would anyone know a way that you can display a message within product_info which says "this item is eligable for free delivery"?

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...
  • 2 months later...

i have a product that weighs 35 pounds and costs $239

 

my parameters are that to get free shipping is only for orders over $75 and under 5lbs.

 

however when i go to checkout...it offers free shipping. someone please help.

Link to comment
Share on other sites

  • 4 weeks later...

Hi,

Is there a way to have this module not count the value of items on specials, in the minimum amount for free shipping.

 

I use products attributes for all my items so all the items on my store have a price and special price are set to zero and all item use the products attributes value for price value.

 

the contrib works perfectly on my store as is but I can not get it to not count the prices of specials in the minimum amount required for free shipping.

 

It can probably be done by substracting item on special price from the order total price used to get the minimum for free shipping, or by not adding the value of items on special to the order total used for the minimum to able free shipping.

 

Thanks.

Link to comment
Share on other sites

in quote function there is a loop that adds the cost of products in the cart.

here in loop You need to apply code If special then continue.

 

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

in quote function there is a loop that adds the cost of products in the cart.

here in loop You need to apply code If special then continue.

Satish

 

 

Thanks for the tip but do you have an idea as to what the code should look like.

 

I can't code but I try.

Link to comment
Share on other sites

Here's what the code looks like:

 

function quote($method = '') {

global $order, $cart, $shipping_weight;

 

$dest_country = $order->delivery['country']['id'];

$currency = $order->info['currency'];

$get_total = false;

$get_weight = false;

$cart_total = $cart->show_total();

 

if (MODULE_SHIPPING_FREEAMOUNT_HIDE_SPECIALS == 'True') {

// 28-9-2005 Check for articles on special which should not get free shipment

// Adjust the cart total price for this

$total_specials = 0;

if ($cart->count_contents() > 0) {

$products = $cart->get_products();

for ($i=0, $n=sizeof($products); $i<$n; $i++) {

if ($special_price = tep_get_products_special_price($products[$i]['id'])) {

$products_price = $special_price;

$total_specials += $products_price;

}

}

}

 

$cart_total = $cart_total - $total_specials;

}

Link to comment
Share on other sites

Join the conversation

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

Guest
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.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...