| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Free Shipping if over $X, not with a coupon | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#41
|
|||||||
|
|||||||
![]() Quote:
So make a coupon for end user to submit at checkout for free shipping and be done with it. All you need to do is add text good for oversea shipments only!
__________________
vs 4.1.12 |
|||||||
#42
|
|||||||
|
|||||||
![]() Hi markwhoo,
How to write the code to check if the buyer is local and if the amount over $X, then no shipping charge include in the check out. If the buyer to redeem the coupon during the check out, then the total amount will also deduct the coupon amount as well. e.g. Case user=local and total_amt>=$100 total_amt=total_amt if coupon="Y" net_amt=(total_amt) - (coupon_amt) else net_amt=total_amt Case user not=local or (user=local and total_amt <$100) total_amt=total_amt+shipping charge if coupon="Y" net_amt=(total_amt) - (coupon_amt) else net_amt=total_amt Above only my logic and I don't know whether the logic is OK or not. Besides, I don't know how to programming and intergrated with the checkout module to make it working. Please give advise. Thanks and regards, Andy X-cart 4.0.13 |
|||||||
#43
|
|||||||
|
|||||||
![]() Quote:
MANY THANKS to all of you's for contributing such as great mod. One last step would make this mod prefect if someone can add couple lines of codes to make the $X amount changeable in admin area for convenience instead of going into SQL database to modify the $X. -- e.g. If I want to change the $X from $200 to $500 or whatever...Just enter the difference amount like entering the Period or Weight Limit. Thanks in advance for all your helps! Regards, Andy www.soundtekmusic.com/ |
|||||||
#44
|
|||||||
|
|||||||
![]() Sorry but I must be missing something here.
How do you turn this on in the admin section? Allan
__________________
How loud do you want it? X-Cart Gold 4.0.12 & 17 |
|||||||
#45
|
|||||||
|
|||||||
![]() You don't...that is what the last poster was asking for.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#46
|
|||||||
|
|||||||
![]() All sorted and working nicely
![]()
__________________
How loud do you want it? X-Cart Gold 4.0.12 & 17 |
|||||||
#47
|
|||||||
|
|||||||
![]() This is a great mod and I've been using it for sometime now without problem, but I just got nailed by a customer who used a %off coupon and got the free shipping based on the subtotal before the discount.
I'd like to set it up so that the free shipping applies to the discounted subtotal. However, if a customer does not use a coupon it should apply to the undiscounted subtotal. Below is a snippet of the code where it bases whether or not free shipping applies on the "subtotal" Code:
Does anyone know what I would add so the conditions above are met? Thanks! Curtis |
|||||||
#48
|
|||||||||
|
|||||||||
![]() We would like to offer free USPS shipping over $100us. I added the above patch and it updated successfully, and created the .php file and added the lines to the myshipper.php.
INSERT INTO xcart_shipping VALUES (150, 'Free Shipping - Orders Over $100', '', 'L', 'FREEOVERX', '201', 5, 'Y', '', '0.00', 0) When I add products above $100, all calculates properly, but the pull down window reads " free shipping on order over $200" I would like to change it to state free shipping over $100. Here is a snippet of myshipper.php file: # Shipping modules depend on XML parser (EXPAT extension) # if( test_expat() != "" ) { if ($ups_rates_only) include $xcart_dir."/shipping/mod_UPS.php"; else { include $xcart_dir."/shipping/mod_USPS.php"; include $xcart_dir."/shipping/mod_CPC.php"; include $xcart_dir."/shipping/mod_ARB.php"; #Added this line below for free shipping over $ 100 include $xcart_dir."/shipping/mod_CUSTOM.php"; } Here is my mod_CUSTOM.php: <? // 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=100; // 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); } } ?> Can someone please tell me how to nake the change, to read for Order over $200, to for order over $100? We only use USPS realtime shipper. Thanks in advance. ![]()
__________________
Mil Mascaras Live Xcart Site #1-V- 4.1.8 Live Xcart site # 2-V 4.4.3 CDSEO Mod - Firetank MM30 - 7DANA- The bestTemplates! Linux - EWD Host Servers awesome service! AlteredCart One Page Checkout |
|||||||||
#49
|
|||||||
|
|||||||
![]() You need to change the entry in the database.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#50
|
|||||||
|
|||||||
![]() I am using phpmyadmin
does anyone know the steps or where i should enter this code INSERT INTO xcart_shipping VALUES (103, 'Free Shipping - Orders Over $200', '', 'L', 'FREEOVERX', '201', 5, 'Y', '', '0.00', 0); I tried to create a field but that does not work becasue i do not konw wha to enter into the value. Please help Using v4.0 xcart
__________________
learnxcart 4.1.6 |
|||||||
|
|||
X-Cart forums © 2001-2020
|