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
  #31  
Old 05-02-2005, 09:58 PM
  MythNReality's Avatar 
MythNReality MythNReality is offline
 

X-Adept
  
Join Date: Mar 2005
Location: S. Cali
Posts: 403
 

Default Re: TINY mod to do Free Shipping for orders over $X w/real t

Quote:
Originally Posted by spingary
I also needed to do a "Free Shipping for orders over $X" while keeping the other real-time methods working, and without using flat rates. I've come up with a method that only requires adding ONE line to X_cart's php files. If anyone's seen any of my other posts, I really hate hacking at the x_cart code due to upgrade issues, so I made this as painless as possible.

The method is to add our own real-time shipping method.

First, let's add our new shipping method into the database table xcart_shipping. I call it "Free Shipping - Orders Over $200". The code I use is "FREEOVERX", subcode "201" - an arbitrary number I pick that is far enough away from the predefined X_Cart shipping methods. I don't set a weight limit, but you might want to do that just in case:

Code:
INSERT INTO xcart_shipping VALUES (103, 'Free Shipping - Orders Over $200', '', 'L', 'FREEOVERX', '201', 5, 'Y', '', '0.00', 0);


Sorry, can you please tell me "where" should I add this? the MySQL database file? Do I just add an additional column or?


Thanks
__________________
_____________
Capture Your Mini-Me Look!

- X-CART Gold (Current Version) V4.6
- Reboot
- CDSEO
Reply With Quote
  #32  
Old 05-03-2005, 12:38 PM
  MythNReality's Avatar 
MythNReality MythNReality is offline
 

X-Adept
  
Join Date: Mar 2005
Location: S. Cali
Posts: 403
 

Default

Quote:
Originally Posted by spingary
Joelrhome,

No no-- the MySQL part is not to add a field to the xcart_shipping table. All we are doing is adding a row to that table. You can go to the "Patch/Upgrade" area, under the Apply SQL Patch, type in this in the query(ies) box:

Code:
INSERT INTO xcart_shipping VALUES (103, 'Free Shipping - Orders Over $200', '', 'L', 'FREEOVERX', '201', 5, 'Y', '', '0.00', 0);

As for your question regarding real-time shipping, yes the other real-time shipping methods will continue to work fine. This method is to add another real-time shipping method to be available to your customers in their cart if their order amount is over $X.

Hope this helps,
Gary

Would you please give a step-by-step instruction? When reading your previous post, I thought I need to add that to the MySQL database, but after reading this post, I have learned it should be added to the patch file.
Now, after I added the above to the patch file, I have got:

PATCH RESULTS

SQL PATCH FAILED AT QUERY:
INSERT INTO xcart_shipping VALUES (103, 'Free Shipping - Orders Over $50', '', 'L', 'FREEOVERX', '201', 5, 'Y', '', '0.00', 0)

Please help! thanks.
__________________
_____________
Capture Your Mini-Me Look!

- X-CART Gold (Current Version) V4.6
- Reboot
- CDSEO
Reply With Quote
  #33  
Old 05-03-2005, 12:54 PM
 
balinor balinor is offline
 

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

Default

That is indeed a database entry, not a patch file. You can either enter it via PHPMyAdmin, or via the SQL query(ies) box in the Apply SQL Patch box....
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #34  
Old 05-03-2005, 01:19 PM
  MythNReality's Avatar 
MythNReality MythNReality is offline
 

X-Adept
  
Join Date: Mar 2005
Location: S. Cali
Posts: 403
 

Default

Quote:
Originally Posted by balinor
That is indeed a database entry, not a patch file. You can either enter it via PHPMyAdmin, or via the SQL query(ies) box in the Apply SQL Patch box....

Yeah, I added that at the patch/upgrade, and type that under the apply SQL patch in the box of the SQL query(ies):

Where did I do wrong?
__________________
_____________
Capture Your Mini-Me Look!

- X-CART Gold (Current Version) V4.6
- Reboot
- CDSEO
Reply With Quote
  #35  
Old 05-03-2005, 01:37 PM
 
balinor balinor is offline
 

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

Default

Try changing the 103 to 150....lots of shipping methods have been added since this mod was written
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #36  
Old 05-03-2005, 01:42 PM
  MythNReality's Avatar 
MythNReality MythNReality is offline
 

X-Adept
  
Join Date: Mar 2005
Location: S. Cali
Posts: 403
 

Default

Quote:
Originally Posted by balinor
Try changing the 103 to 150....lots of shipping methods have been added since this mod was written

That works like a magic wand! TKS!
Got that working now...am soooo happy, thanks Balinor. Kisses
__________________
_____________
Capture Your Mini-Me Look!

- X-CART Gold (Current Version) V4.6
- Reboot
- CDSEO
Reply With Quote
  #37  
Old 05-03-2005, 01:44 PM
 
balinor balinor is offline
 

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

Default

Did you follow the rest of the setup? Do you have it turned on in admin?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #38  
Old 05-03-2005, 01:50 PM
  MythNReality's Avatar 
MythNReality MythNReality is offline
 

X-Adept
  
Join Date: Mar 2005
Location: S. Cali
Posts: 403
 

Default

Quote:
Originally Posted by balinor
Did you follow the rest of the setup? Do you have it turned on in admin?

Yeap! forgot to change some variables...fot that fixed and working! THANK YOU!
__________________
_____________
Capture Your Mini-Me Look!

- X-CART Gold (Current Version) V4.6
- Reboot
- CDSEO
Reply With Quote
  #39  
Old 05-03-2005, 01:50 PM
 
balinor balinor is offline
 

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

Default

__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #40  
Old 05-08-2005, 10:34 PM
 
andyng andyng is offline
 

Senior Member
  
Join Date: Mar 2004
Posts: 151
 

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

Hi,

I would like to add the feature when check out:-

1) Free Shipping if over $X locally (exclusive oversea delivery).

2) To allow user to redeem the coupon during check out and to be considered to deduct from the total order amount.

Please show details.

Thanks and regards,

Andy Ng
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 01:55 PM.

   

 
X-Cart forums © 2001-2020