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
  #21  
Old 01-28-2004, 03:56 PM
 
jordan0 jordan0 is offline
 

Advanced Member
  
Join Date: Oct 2003
Location: San Francisco, CA
Posts: 77
 

Default

Quote:
Originally Posted by spingary
Code:
$intershipper_rates[] = array("methodid" => 201, "rate" => 10);

Replace "201" with whatever subcode you used.

This should give you a shipping option while in your cart for the shipping method you added at $10. Let me know what happens.

Some other quick notes:
Make sure that your insert SQL statement went into the table correctly.
Make sure your products have weights (just in case).
Make sure you are shipping domestically, since the SQL set the method for national only - if not, change it.

Gary

Thanks for the help. I have replaced my mod_CUSTOM.php with your code above and it works as you said it would Б─⌠ the "Free shipping Б─⌠ orders over $99" option does a $10 shipping charge when selected.
I have also verified the following:
Б─╒ The SQL insert statement was successful Б─⌠ I used a mySQL database editor / viewer program to look into my database and make sure.
Б─╒ I have tried this method on products with and without weights
Б─╒ I only ship domestically, and have xcart set up accordingly

Any ideas?
__________________
Jordan Sitkin
http://www.kitkraft.biz
X-Cart 4.0.18 [unix]
Reply With Quote
  #22  
Old 03-10-2004, 11:44 PM
 
rackit rackit is offline
 

Advanced Member
  
Join Date: Jan 2004
Posts: 31
 

Default

While shipping rate files are being discussed here, I'll ask this question. Does anyone know of a way for me to use a different field (say param03) instead of weight to calculate UPS ground real time rates. I would still need to use the original weight field for all other UPS calculations, such as 2nd day air or next day air. Any help at all would be greatly appreciated.

edit: Nevermind. I figured it out.
Reply With Quote
  #23  
Old 09-01-2004, 05:44 AM
 
inksticks inksticks is offline
 

Advanced Member
  
Join Date: Aug 2004
Posts: 34
 

Default no free shipping to international customers

I really appreciate this free shipping mod but I would like it it be unavailable when a customer enters a country other than the US. Thanks for the help.
__________________
X-Cart 4.0.5
http://www.inksticks.com/
Reply With Quote
  #24  
Old 09-01-2004, 06:01 AM
 
spingary spingary is offline
 

Advanced Member
  
Join Date: Apr 2003
Posts: 51
 

Default

Inksticks,

In my database table xcart_shipping, the shipping method is added as a "National" shipper, so it should not be available to other countries. When you bring up shipping methods in the admin, and see that big list of real-time shipping methods, you should see yours and it should say "National". If it says "International", then you should change the "destination" value of your shipping method in the xcart_shipping table to "L" instead of "I".

Hope this helps, sorry I missed the private message.
Reply With Quote
  #25  
Old 09-01-2004, 06:24 AM
 
inksticks inksticks is offline
 

Advanced Member
  
Join Date: Aug 2004
Posts: 34
 

Default set to national

Thanks for the fast reply. I do have it set to national. I noticed that when setting up the mod and I have just verified it in my admin. But for some reason the free shipping is still available when I enter an international address. What could be wrong?
__________________
X-Cart 4.0.5
http://www.inksticks.com/
Reply With Quote
  #26  
Old 09-01-2004, 06:40 AM
 
spingary spingary is offline
 

Advanced Member
  
Join Date: Apr 2003
Posts: 51
 

Default

Looks like XCart leaves it up to the mod to determine whether it should or should not return a rate based on customer location. Here's a quick update for the mod to do that:

Thanks for catching it!

Code:
<? // Custom shipping methods // // Free shipping over $X mod // Add an entry to table xcart_shipping like this: // INSERT INTO xcart_shipping VALUES (103, 'Free Shipping - Orders Over $200', '', 'L', 'FREEOVERX', '201', 5, 'Y', '', '0.00', 0); // I picked "201" subcode arbitrarily, but it seems like a good number to start as to not conflict with predefined shipping methods // The "5" is the orderby. "Y" is active or not. Replace "0.00" with a weight limit if you don't want this available for heavy orders. // This will show up as a Real-Time shipping method in "Shipping Options" // // Edit the file shipping/myshipper.php and under this line // include "../shipping/mod_DHL.php"; // ADD THIS LINE to include this file: // include "../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=200; // 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"]) $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); } } ?>
Reply With Quote
  #27  
Old 09-01-2004, 07:05 AM
 
inksticks inksticks is offline
 

Advanced Member
  
Join Date: Aug 2004
Posts: 34
 

Default same mod for 4.0.4

Thanks so much for the mod. It works great! I just wanted to make a small change for those of you using version 4.0.3. myshipper.php is set up a little differently so the 4.0.3 mod would be as follows:

Code:
<? // Custom shipping methods // // Free shipping over $X mod // Add an entry to table xcart_shipping like this: // INSERT INTO xcart_shipping VALUES (103, 'Free Shipping - Orders Over $200', '', 'L', 'FREEOVERX', '201', 5, 'Y', '', '0.00', 0); // I picked "201" subcode arbitrarily, but it seems like a good number to start as to not conflict with predefined shipping methods // The "5" is the orderby. "Y" is active or not. Replace "0.00" with a weight limit if you don't want this available for heavy orders. // This will show up as a Real-Time shipping method in "Shipping Options" // // Edit the file shipping/myshipper.php and under this line // include $xcart_dir."/shipping/mod_ARB.php"; // 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=201; // 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"]) $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); } } ?>

Thanks again for the great mod!
__________________
X-Cart 4.0.5
http://www.inksticks.com/
Reply With Quote
  #28  
Old 09-22-2004, 11:55 AM
 
kheflin kheflin is offline
 

Member
  
Join Date: Jun 2003
Posts: 14
 

Default Re: same mod for 4.0.4

Quote:
Originally Posted by inksticks
Thanks so much for the mod. It works great! I just wanted to make a small change for those of you using version 4.0.3. myshipper.php is set up a little differently so the 4.0.3 mod would be as follows:

Code:
<? // Custom shipping methods // // Free shipping over $X mod // Add an entry to table xcart_shipping like this: // INSERT INTO xcart_shipping VALUES (103, 'Free Shipping - Orders Over $200', '', 'L', 'FREEOVERX', '201', 5, 'Y', '', '0.00', 0); // I picked "201" subcode arbitrarily, but it seems like a good number to start as to not conflict with predefined shipping methods // The "5" is the orderby. "Y" is active or not. Replace "0.00" with a weight limit if you don't want this available for heavy orders. // This will show up as a Real-Time shipping method in "Shipping Options" // // Edit the file shipping/myshipper.php and under this line // include $xcart_dir."/shipping/mod_ARB.php"; // 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=201; // 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"]) $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); } } ?>

Thanks again for the great mod!


I've followed these directions very carefully. Made the insert in the database successfully. Added the include line in myshipper.php and created the mod_CUSTOM.php as suggested for 4.0.3 users.. but when I'm checking out, orders over the designated amount. .. never show the free shipping option.

I would appreciate any suggestions or any other ideas of how to get this working in 4.0.3

Kevin
__________________
ShreveNet Inc.
www.shreve.net

Version 4.1.9
Reply With Quote
  #29  
Old 12-13-2004, 03:47 PM
 
herbertjoei herbertjoei is offline
 

Newbie
  
Join Date: Sep 2004
Posts: 6
 

Default

Great Mod!

One question though, how do i exclude hawaii and alaska from the free shipping if i'm using realtime calculation from UPS and USPS?

Thanks!

<==
v3.5.8
__________________
-=-
Reply With Quote
  #30  
Old 02-08-2005, 05:46 PM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

FYI, this WILL work with the new UPS module configuration, it just takes a little tweaking.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 06:24 PM.

   

 
X-Cart forums © 2001-2020