Author |
Message |
staffpatrol
User - One Blade
Joined: 13 Dec 2006
Posts: 47
Location: US
|
 Flat rate extra shipping if outside the US?
I want to add an additional charge if the customer chooses any country other than the US. Is it possible to add, for example, $10 to all orders before it hits the gateway? OR - I noticed a dropdown box for shipping method. My only option currently is "Standard Shipping". Could I change that to say "Inside USA" or "Outside USA"? If so, where are the setting for this to add extra shipping?
Thanks All!
Ver 5
http://www.staffpatrol.com/store5/agora.cgi
|
Thu Jul 26, 07 2:24 pm |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
Custom Shipping logic...
What do you currently have in your Custom Shipping Logic?
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Thu Jul 26, 07 3:20 pm |
 |
 |
staffpatrol
User - One Blade
Joined: 13 Dec 2006
Posts: 47
Location: US
|
I currently have the following - just based on dollar amount. I'd love the drop down list (where you put in your address) to have "inside USA" and "outside USA". I just can't find where to put the info to add an extra $10 if they choose "outside USA".
# Custom Shipping Logic Example
# Ship based on the total order.
# $1-$29.99 is 3.95, $30-59.99 is 4.95, etc.:
@sc_shipping_logic =
("|1-14.99|||4.05",
"|15-29.99|||5.90",
"|30-49.99|||6.85",
"|50-74.99|||7.80",
"|75-99.99|||8.75",
"|100-149.99|||9.85",
"|150-199.99|||11.85",
"|200-299.99|||13.85",
"|300-|||15.85");
$shipping_price = &calculate_shipping($temp_total,
$total_quantity, $total_measured_quantity);
$shipping_logic_done = "yes"; # forces exit, no handling charge added
|
Thu Jul 26, 07 3:24 pm |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
Try this:
Code:# Custom Shipping Logic Example
# Ship based on the total order.
# $1-$29.99 is 3.95, $30-59.99 is 4.95, etc.:
@sc_shipping_logic =
("|1-14.99|||4.05",
"|15-29.99|||5.90",
"|30-49.99|||6.85",
"|50-74.99|||7.80",
"|75-99.99|||8.75",
"|100-149.99|||9.85",
"|150-199.99|||11.85",
"|200-299.99|||13.85",
"|300-|||15.85");
$shipping_price = &calculate_shipping($temp_total,
$total_quantity, $total_measured_quantity);
$country = $form_data{'Ecom_ShipTo_Postal_CountryCode'} ;
if ($country ne "United States") {
$shipping_price = $shipping_price + 10;
$shipping_logic_done = "yes"; # forces exit, no handling charge added
Let me know how it goes...
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Thu Jul 26, 07 3:38 pm |
 |
 |
staffpatrol
User - One Blade
Joined: 13 Dec 2006
Posts: 47
Location: US
|
 No luck
Doesn't seem to be working. It doesn't calculate any shipping at all. If I take out the code you put in, it works. I believe you added:
$country = $form_data{'Ecom_ShipTo_Postal_CountryCode'} ;
if ($country ne "United States") {
$shipping_price = $shipping_price + 10;
|
Thu Jul 26, 07 4:48 pm |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
Whoops!!
Try this one:
Code:# Custom Shipping Logic Example
# Ship based on the total order.
# $1-$29.99 is 3.95, $30-59.99 is 4.95, etc.:
@sc_shipping_logic =
("|1-14.99|||4.05",
"|15-29.99|||5.90",
"|30-49.99|||6.85",
"|50-74.99|||7.80",
"|75-99.99|||8.75",
"|100-149.99|||9.85",
"|150-199.99|||11.85",
"|200-299.99|||13.85",
"|300-|||15.85");
$shipping_price = &calculate_shipping($temp_total,
$total_quantity, $total_measured_quantity);
$country = $form_data{'Ecom_ShipTo_Postal_CountryCode'} ;
if ($country ne "United States") {
$shipping_price = $shipping_price + 10;
}
$shipping_logic_done = "yes"; # forces exit, no handling charge added
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Thu Jul 26, 07 4:51 pm |
 |
 |
staffpatrol
User - One Blade
Joined: 13 Dec 2006
Posts: 47
Location: US
|
 We're almost there but now it assumes overseas.
If you choose USA, it correct the shipping rate as you continue. But, it starts out showing the shipping rate with the extra $10 included. If you choose USA and follow through to the next screen, it deducts the $10. BUT, I don't think a customer will continue if they think shipping is that high in the beginning. Suggestions?
|
Thu Jul 26, 07 7:11 pm |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
Okay, was afraid of that...
Here's the fix...
Create a hidden field in the order form:
Code:<input type="hidden" name="Ecom_Ship" value="go">
Then in the Custom Shipping Logic put:
Code:$ship_go = $form_data{'Ecom_Ship'};
if ($ship_go eq "go") {
@sc_shipping_logic =
("|1-14.99|||4.05",
"|15-29.99|||5.90",
"|30-49.99|||6.85",
"|50-74.99|||7.80",
"|75-99.99|||8.75",
"|100-149.99|||9.85",
"|150-199.99|||11.85",
"|200-299.99|||13.85",
"|300-|||15.85");
$shipping_price = &calculate_shipping($temp_total,
$total_quantity, $total_measured_quantity);
$country = $form_data{'Ecom_ShipTo_Postal_CountryCode'} ;
if ($country ne "United States") {
$shipping_price = $shipping_price + 10;
}
$shipping_logic_done = "yes"; # forces exit, no handling charge added
}
Let me know... but this should do it for you.
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Fri Jul 27, 07 7:02 am |
 |
 |
staffpatrol
User - One Blade
Joined: 13 Dec 2006
Posts: 47
Location: US
|
 Shipping calculations
It doesn't show any shipping until after the address is put in and then it calculates it correctly on the next screen. I think this will work perfectly. I just need to put a note on the first screen that shipping is calculated on the following screen. You are the master of AgoraCart. Thanks a bunch!!
|
Fri Jul 27, 07 10:30 am |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
It should only show the shipping charges on the "Verification" screen becvause you can't calculate the shipping until you know where it is going to...
HTH!
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Fri Jul 27, 07 10:35 am |
 |
 |
staffpatrol
User - One Blade
Joined: 13 Dec 2006
Posts: 47
Location: US
|
 Where is the file for the note I need.
I've looked high and low...where is the file for the page right before the Verification screen. I know that LinkpointConnect-orderform.html is the page that takes the shipping info. But where is the file for the first half of that page that shows SUBTOTAL and GRAND TOTAL? I want to put a note under "GRAND TOTAL" that shipping is calculated on the following page.
|
Fri Jul 27, 07 10:43 am |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
You need to add your note in the "Top message for Order form" field of the Payment Gateway manager for LinkpointConnect.
Do not use any double quote ( " ) marks in this field or it will break the cart...
HTH!
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Fri Jul 27, 07 10:53 am |
 |
 |
staffpatrol
User - One Blade
Joined: 13 Dec 2006
Posts: 47
Location: US
|
 The one place I didn't look.
My hat's off to you again. Thanks!!! I still one outstanding post that will finish my tweaking this time around.
"How can I put news and related information below the product listing in each category. I'd like to update it regularly and hope there is an easier way than creating INC pages for all of my categories. If that is the only way, is there a INC template that will not affect formatting, but just let me add text below the products?"
|
Fri Jul 27, 07 11:15 am |
|
 |
wacp1
Newbie
Joined: 27 Dec 2007
Posts: 9
|
scottcrew wrote:Here's the fix...
Create a hidden field in the order form:
Code:<input type="hidden" name="Ecom_Ship" value="go">
If I am using the offline method version 5.2.004, where do I go to add this code? I don't know where the order form is located in the directory and also where at inside the file should it go.
|
Sun Jun 01, 08 4:52 pm |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
As I said in the post you quoted,
in the order form
That means edit the order form file...
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Sun Jun 01, 08 5:06 pm |
 |
 |
wacp1
Newbie
Joined: 27 Dec 2007
Posts: 9
|
The answer I was looking for here was something like html/forms/offline-orderform.html. But I appreciate your assistance.
|
Mon Jun 02, 08 6:10 am |
|
 |
jesadl
Newbie - Two Blades
Joined: 24 Oct 2008
Posts: 23
|
 One Question about this...
I am doing the exact same set up as this and I have everything working except that the shipping price shows up before they enter the shipping information, just like what happened here. Since I have no idea what I am doing I can't figure out where I am supposed to put the hidden field...
Here's the fix...
Create a hidden field in the order form:
Code:
<input type="hidden" name="Ecom_Ship" value="go">
Can you help me??
|
Fri Oct 24, 08 8:34 am |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
Please re-read the post above:
http://www.agoraguide.com/faq/viewtopic.php?p=24647
All order form files are located in the store's 'html/forms' directory.
The file specific to the gateway you are using is the one that needs to be edited.
HTH!
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Fri Oct 24, 08 11:15 am |
 |
 |
jesadl
Newbie - Two Blades
Joined: 24 Oct 2008
Posts: 23
|
That's where I have been putting it but it hasn't worked for me yet...it there a specific place I need to put it?
|
Fri Oct 24, 08 11:17 am |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
Can you provide a URL for your store and specifically what it is that you are trying to accomplish?
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Fri Oct 24, 08 11:28 am |
 |
 |
jesadl
Newbie - Two Blades
Joined: 24 Oct 2008
Posts: 23
|
|
Fri Oct 24, 08 11:30 am |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
I, also, need more specifics as to how you are trying to set up your shipping and what you are trying to accomplish.
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Fri Oct 24, 08 11:31 am |
 |
 |
jesadl
Newbie - Two Blades
Joined: 24 Oct 2008
Posts: 23
|
Basically, I would like to have free shipping if within the US, $10 to Canada and $15 everywhere else...
|
Fri Oct 24, 08 11:36 am |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
So, what do you have set up in your custom shipping logic???
You need to be very specific with your information.
There are lots of ways to do things and a missing punctuation mark can kill scripting.
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Fri Oct 24, 08 12:24 pm |
 |
 |
jesadl
Newbie - Two Blades
Joined: 24 Oct 2008
Posts: 23
|
Well...you're going to think I'm crazy!  I took exactly what you gave to them and just changed the pricing to $0.00 because I don't need the pricing based on total order and I didn't want to mess anything up. This is what I have...LOL I am so lost with this stuff!!
# Custom Shipping Logic Example
# Ship based on the total order.
# $1-$29.99 is 3.95, $30-59.99 is 4.95, etc.:
@sc_shipping_logic =
("|1-14.99|||0.00",
"|15-29.99|||0.00",
"|30-49.99|||0.00",
"|50-74.99|||0.00",
"|75-99.99|||0.00",
"|100-149.99|||0.00",
"|150-199.99|||0.00",
"|200-299.99|||0.00",
"|300-|||0.00");
$shipping_price = &calculate_shipping($temp_total,
$total_quantity, $total_measured_quantity);
$country = $form_data{'Ecom_ShipTo_Postal_CountryCode'} ;
if ($country ne "United States") {
$shipping_price = $shipping_price + 15;
}
$shipping_logic_done = "yes"; # forces exit, no handling charge added
|
Fri Oct 24, 08 12:36 pm |
|
 |
|