Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Free Shipping if over $X, not with a coupon

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #71  
Old 02-16-2006, 12:08 PM
  connemara's Avatar 
connemara connemara is offline
 

Senior Member
  
Join Date: Jan 2006
Location: Vancouver Island, Canada
Posts: 167
 

Default Free shipping and live quotes - Canada Post

I have been reading through this thread in the hopes of being able to resolve our free shipping issue. We, too want to have free shipping over our 5 case total ($416 CDN). I have 2 questions:

1- Will the previous code offerings work while maintaining the Canada Post real-live quotes? I see various comments re Fedex and UPS.
2- The client is sending out, to select customers, coupons entitling them to free shipping, no matter what the cart total (obviously a minumum of 1 case). This is not a set value, so does it just "negate" the shipping amount at the end? Because it is for free shipping, I see the client set the coupons to have a value of "0".
I appreciate any help on this. . .
Connie
__________________
Versions 4.7.6
multiple mods and customizations
Reply With Quote
  #72  
Old 04-18-2006, 08:23 PM
  thundernugs's Avatar 
thundernugs thundernugs is offline
 

Senior Member
  
Join Date: May 2003
Location: Bend, OR
Posts: 117
 

Default

thanks for this mod, i've been looking for it for some time now.

using 4.0.17, the mod seems to be working, but the "free shipipng over $99 ($0.00)" drop down option shows up for all subtotals, even under $99, ao anyone (regardless of amount in the cart) can choose the free shipping option.

is this the way the mod was intended to function? it seems you would want to wait until the cart total reached $99 (or whatever) before giving the option to choose free shipping.

thanks!

i'll attach my mod_custom.php in case i fouled up somewhere.



Code:
// Edit the file shipping/myshipper.php and under this line // include $xcart_dir."/shipping/mod_ARB.php"; (NPL used myshipper.php instead) // ADD THIS LINE to include this file: // include $xcart_dir."/shipping/mod_CUSTOM.php" // // You can also include other custom shipping files here so that myshipper.php is left alone. // // Edit the amount valid for free shipping below. $freeOverAmount=99; // That's all! if ( !defined('XCART_SESSION_START') ) { header("Location: ../"); die("Access denied"); } global $products, $cart, $userinfo, $current_area, $login; // Make sure this shipping method is available foreach ($allowed_shipping_methods as $key=>$value) if ($value["code"] == "FREEOVERX") $FREEOVERX_FOUND = true; if ($FREEOVERX_FOUND) { $tempcart = func_calculate($cart, $products, $login, $current_area); if (($userinfo["s_country"] == $config["General"]["default_country"]) && (($userinfo["s_state"] <> "AK") && ($userinfo["s_state"] <> "HI"))) $dest = "L"; else $dest = "I"; $row = func_query_first("SELECT shippingid, subcode FROM $sql_tbl[shipping] WHERE code='FREEOVERX' AND active='Y' and destination = '$dest'"); if ($row && ($tempcart["subtotal"] >= $freeOverAmount)) { $rate = 0; $intershipper_rates[] = array("methodid" => $row['subcode'], "rate" => $rate); } } ?>
__________________
X-Cart Gold 4.0.17 & 4.0.18
Linux Server
Hands-On Hosting
http://www.CoreCases.com - Ipod Cases
http://www.InnovativeOutlet.com - Pet Plants and other cool stuff you need
Reply With Quote
  #73  
Old 03-05-2007, 05:57 AM
 
zenkiss zenkiss is offline
 

Advanced Member
  
Join Date: Jan 2006
Posts: 32
 

Default Re: Free Shipping if over $X, not with a coupon

I find this modification very easy to use and came in great during the holidays as I was able to lower free shipping on the fly. I do have two questions and hope someone can help (or I can pay you).

1 - I sell some items (fine prints) that I wish to have flat rate shipping $20.00 US and $35.00 International. I need these items NOT to be able to count towards free shipping as the cost of these items is expensive to ship.

If the client order items that total over $100.00 that are not the flat rate products then they can have free shipping on those as free over $100.00. but the charge of the flat rate needs to stay.

Hope that makes sense and will pay if needed.

Thanks
__________________
=^-^= 4.0.19 - 3.2 Dual Core - RHEL with 6GB's
Reply With Quote
  #74  
Old 03-14-2007, 10:52 AM
 
skeep5 skeep5 is offline
 

Advanced Member
  
Join Date: Feb 2007
Posts: 47
 

Default Re: Free Shipping if over $X, not with a coupon

has anyone done Free Shipping for Orders over $x, for version 4.1.x?

thanks
__________________
---------------
Brandon Larsen
---------------
X-Cart version 4.4.3
X-Cart version 4.1.9
X-Cart version 4.1.10
Reply With Quote
  #75  
Old 03-14-2007, 01:50 PM
 
Sisom Sisom is offline
 

eXpert
  
Join Date: Sep 2006
Posts: 310
 

Default Re: Free Shipping if over $X, not with a coupon

Have you tried the Special Offers add on from X-Cart?
I'm using that but also having custom coding done, as I have many different shipping options (next day before 10.30, next day before 9.00, Saturday delivery, etc.) which are all more expensive than normal next day shipping, and the Special Offers package (understandably) just makes all the shipping options free, so my custom code will allow me to set reduced rates for the shipping options I listed above.
I think it's only $35 of something like that for Special Offers - when I first installed it I thought - this looks rubbish! But then as I worked with it a bit more, and made some custom banners to go with it, it looks really good and I'm sure it will bring in a lot more sales. If you have a few large stocks of small, cheap items, Special Offers is ideal for bundling them with other, more expensive items. It's really a very powerful add on, I hadn't realised tihs until I spent a weekend setting it all up and experimenting with it.
__________________
X-Cart Gold Version 4.3.2
Reply With Quote
  #76  
Old 05-03-2007, 04:28 PM
 
drubarth drubarth is offline
 

Member
  
Join Date: Jul 2004
Posts: 23
 

Default Re: Free Shipping if over $X, not with a coupon

I just setup Free Shipping without any custom mod and without using the Special Offers. Here's what I did.

1) Create a new Shipping Method called Free Shipping and make it first in the list.
2) In Shipping Charges, modify the "Order subtotal range" for all your existing charges to be up to the cut-off for your free shipping (e.g. - I want to offer free shipping for totals over $100, so for my existing charges I put 0-$99.99 so that they only apply to orders less than my cut-off)
3) Add a new shipping charge and set the "Order subtotal range" to start at the subtotal where you offer free shipping (e.g. - I set mine to 100-999,999).

Now everything should work perfectly and free deliver should only display when the order is over the cut-off amount and the other charges will only show when the order is under the cut-off amount.

You can check it out at www.themodernflorist.com (X-cart version 4.1.0)
__________________
x-cart 4.1.11
x-cart 4.1.12
x-cart 4.2.3
x-cart 4.3.2
Reply With Quote
  #77  
Old 05-04-2007, 05:57 AM
 
zenkiss zenkiss is offline
 

Advanced Member
  
Join Date: Jan 2006
Posts: 32
 

Default Re: Free Shipping if over $X, not with a coupon

I love this mod and it works perfect as it was given a heads up to me from Balinor. I do have one thing that I noticed and it might be addressed in this thread if not, maybe someone has some insight. On orders over $100.00 in my case the tracking # box in orders doesn't appear. I am guessing that is from the free shipping not be attached to any shipping method. So there is no way, I can place a tracking number in these orders, does anybody else have this issue?

I have a extremely modified X-cart installation.

Thanks
__________________
=^-^= 4.0.19 - 3.2 Dual Core - RHEL with 6GB's
Reply With Quote
  #78  
Old 05-13-2007, 10:04 PM
 
polren polren is offline
 

Advanced Member
  
Join Date: May 2007
Posts: 35
 

Default Re: Free Shipping if over $X, not with a coupon

Quote:
Originally Posted by drubarth
I just setup Free Shipping without any custom mod and without using the Special Offers. Here's what I did.

1) Create a new Shipping Method called Free Shipping and make it first in the list.
2) In Shipping Charges, modify the "Order subtotal range" for all your existing charges to be up to the cut-off for your free shipping (e.g. - I want to offer free shipping for totals over $100, so for my existing charges I put 0-$99.99 so that they only apply to orders less than my cut-off)
3) Add a new shipping charge and set the "Order subtotal range" to start at the subtotal where you offer free shipping (e.g. - I set mine to 100-999,999).

Now everything should work perfectly and free deliver should only display when the order is over the cut-off amount and the other charges will only show when the order is under the cut-off amount.

You can check it out at www.themodernflorist.com (X-cart version 4.1.0)

Excellent idea, works great. Does anybody know how to modify the cart (4.1.x) to display ALL shipping options instead of UPS only as default?
__________________
Polren
x-cart 4.1.7,
On Sale from alteredcart.com
One Page Checkout from alteredcart.com
XC-SEO
Reply With Quote
  #79  
Old 05-14-2007, 09:05 AM
 
drubarth drubarth is offline
 

Member
  
Join Date: Jul 2004
Posts: 23
 

Default Re: Free Shipping if over $X, not with a coupon

Should be just a matter of activating the shipping methods you need and ordering them the way you want. Check the manual.
__________________
x-cart 4.1.11
x-cart 4.1.12
x-cart 4.2.3
x-cart 4.3.2
Reply With Quote
  #80  
Old 06-11-2007, 11:48 PM
 
dub713 dub713 is offline
 

Advanced Member
  
Join Date: May 2007
Posts: 56
 

Default Re: Free Shipping if over $X, not with a coupon

well, i've tried going through everything for use in 4.1.7, and things are different in the files from version to version, so...

i'm going to spit out some 4.1.7 info and if anyone can help with the config that would be great.


first, to create a new real time shipping item. so, currently, i do have a new real time option, Free, with Free Shipping as the method, and to verify... It is active, and this is what is in the xcart_shipping table...

150 Free Shipping 5-7 days L FREEOVERX 201 0 Y 0.00 0.00 0


in myshipper, there is no line that reads...

include $xcart_dir."/shipping/mod_ARB.php"

include_once is used twice, but no plain include statements.

here is the 4.1.7 myshipper code, with the addition of the CUSTOM. i may have missed something, but it seemed like the logical way to add that.


Code:
# # $Id: myshipper.php,v 1.38.2.6 2007/03/22 13:55:14 svowl Exp $ # if ( !defined('XCART_SESSION_START') ) { header("Location: ../"); die("Access denied"); } include_once $xcart_dir."/shipping/shipping_cache.php"; # # This function calculates shipping rates from my own shipper module # function func_shipper ($weight, $userinfo, $debug="N", $cart=false) { global $allowed_shipping_methods,$intershipper_rates; global $shipping_calc_service, $intershipper_error; global $sql_tbl; global $config; global $active_modules; global $xcart_dir; global $current_carrier; global $empty_other_carriers; $empty_other_carriers = "N"; if (empty($userinfo) && ($config["General"]["apply_default_country"]=="Y" || $debug=="Y")) { $userinfo["s_country"] = $config["General"]["default_country"]; $userinfo["s_state"] = $config["General"]["default_state"]; $userinfo["s_zipcode"] = $config["General"]["default_zipcode"]; $userinfo["s_city"] = $config["General"]["default_city"]; } elseif (empty($userinfo)) { return array(); } $allowed_shipping_methods = func_query("SELECT * FROM $sql_tbl[shipping] WHERE active = 'Y'"); $intershipper_rates = array(); $ups_rates_only = (!empty($active_modules["UPS_OnLine_Tools"]) && $current_carrier == "UPS"); $ship_mods = array(); $alt_ship_mods = array(); $fedex_mod = ($config['FEDEX_integration_type'] == 'A' ? 'FEDEX_direct' : 'FEDEX'); if (!$ups_rates_only) { $ship_mods[] = $fedex_mod; $ship_mods[] = "AP"; } else { $alt_ship_mods[] = $fedex_mod; $alt_ship_mods[] = "AP"; } x_load('tests'); # # Shipping modules depend on XML parser (EXPAT extension) # if (test_expat() != "") { if ($ups_rates_only) { $ship_mods[] = "UPS"; $alt_ship_mods[] = "USPS"; $alt_ship_mods[] = "CPC"; $alt_ship_mods[] = "ARB"; $alt_ship_mods[] = "DHL"; $alt_ship_mods[] = "CUSTOM"; } else { $ship_mods[] = "USPS"; $ship_mods[] = "CPC"; $ship_mods[] = "ARB"; $ship_mods[] = "DHL"; $ship_mods[] = "CUSTOM"; } } foreach ($ship_mods as $ship_mod) { if (file_exists($xcart_dir."/shipping/mod_".$ship_mod.".php")) include_once $xcart_dir."/shipping/mod_".$ship_mod.".php"; $func_ship = "func_shipper_".$ship_mod; if (function_exists($func_ship)) $func_ship($weight, $userinfo, $debug, $cart); } if ($ups_rates_only) { $tmp_rates = $intershipper_rates; $intershipper_rates = array(); foreach ($alt_ship_mods as $alt_ship_mod) { if (file_exists($xcart_dir."/shipping/mod_".$alt_ship_mod.".php")) include_once $xcart_dir."/shipping/mod_".$alt_ship_mod.".php"; $func_ship = "func_shipper_".$alt_ship_mod; if (function_exists($func_ship)) $func_ship($weight, $userinfo, $debug, $cart); } if (empty($intershipper_rates)) { $empty_other_carriers = "Y"; } $intershipper_rates = $tmp_rates; } if ($debug == "Y") { func_shipper_show_rates($intershipper_rates); } return $intershipper_rates; } ?>


here is mod_CUSTOM.php


Code:
# # $Id: mod_ARB.php,v 1.14.2.16 2007/03/26 11:54:36 twice Exp $ # // Custom shipping methods // // Edit the amount valid for free shipping below. $freeOverAmount=75; if ( !defined('XCART_SESSION_START') ) { header("Location: ../"); die("Access denied"); } global $products, $cart, $userinfo, $current_area, $login; // Make sure this shipping method is available foreach ($allowed_shipping_methods as $key=>$value) if ($value["code"] == "FREEOVERX") $FREEOVERX_FOUND = true; if ($FREEOVERX_FOUND) { $tempcart = func_calculate($cart, $products, $login, $current_area); if ($userinfo["s_country"] == $config["General"]["default_country"]) $dest = "L"; else $dest = "I"; $row = func_query_first("SELECT shippingid, subcode FROM $sql_tbl[shipping] WHERE code='FREEOVERX' AND active='Y' and destination = '$dest'"); if ($row && ($tempcart["subtotal"] >= $freeOverAmount)) { $rate = 0; $intershipper_rates[] = array("methodid" => $row['subcode'], "rate" => $rate); } } ?>




i understand some of this stuff, but i'm no expert, and it's obvious that something isn't working, so any help would be appreciated to get this working on 4.1.7

oh, just to add, all i want to be able to do is have free ups ground shipping for any order over $75. but need to keep realtime shipping for everyting else, and orders under $75.

also, on a side note... would a coupon for free shipping on certain products override this for anything under $75?? we also have a coupon code for one small set of products that will get free shipping no matter what.

thanks,
__________________
X-Cart version 4.1.7 - PHP 5.2. - MySQL server 5.0.41-community-nt - MySQL client 5.0.22 - Web server Apache/2.2.4 (Win32) - PHP/5.2.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:39 PM.

   

 
X-Cart forums © 2001-2020