 |
Page 1 of 1
|
Author |
Message |
pkflash
Newbie - One Blade
Joined: 14 Mar 2005
Posts: 18
|
 Shipping logic, Overnight charges won't calculate
I have some logic in the Shipping Settings that calculate according to the order amount ( I will paste it below) The problem is, that now the orders don't calculate any additional charge for overnight shipping. Any help would be apreciated. I should also say that I'm not a programmer by any stretch of the imagination, so dummy help would be appreciated
This is the logic that I am using for the shipping.
@sc_shipping_logic = ( "|1-25.99|||5.95",
"|26.00-50.99|||6.95",
"|51.00-75.99|||7.95",
"|76.00-100.99|||9.95",
"|101.00-150.99|||11.95",
"|151.00-|||13.95");
$shipping_price = &calculate_shipping($temp_total,
$total_quantity, $total_measured_quantity);
|
Mon Mar 14, 05 9:13 am |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
Well, you don't have anything set up to do an overnight charge....
How are you shipping your products? Why not use the real time UPS or USPS SBW module?
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Mon Mar 14, 05 10:02 am |
 |
 |
pkflash
Newbie - One Blade
Joined: 14 Mar 2005
Posts: 18
|
 Good question
i guess I didn't know how. The client had originally asked us to do custom shipping calculations, whereas anything between 26.00-50.99 would be $6.95 for shipping and so on. Also, he wanted to do free ground shipping on orders more than $50.00.
Is any/all of this possible with the realtime UPS? If not, how should I calculate the different amount for overnight? I assume it would be similar logic to that pasted above, but how do I specify that overnight should calculate the new (hypothetical) code?
BTW- Thanks for your help!
The site we're talking about here is www.diggidydogcarmel.com
|
Mon Mar 14, 05 10:09 am |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
Well, the way to do this would be to set up 2 shipping options in your order form:
Ground & Overnight
Now, in your shipping logic would be something like this:
Code:@sc_shipping_logic = ( "Ground|1-25.99|||5.95",
"Ground|26.00-50.99|||6.95",
"Ground|51.00-|||0.00",
"Overnight|1-25.99|||19.95",
"Overnight|26.00-50.99|||26.95",
"Overnight|51.00-75.99|||27.95",
"Overnight|76.00-100.99|||29.95",
"Overnight|101.00-150.99|||31.95",
"Overnight|151.00-|||33.95");
$shipping_price = &calculate_shipping($temp_total,
$total_quantity, $total_measured_quantity);
HTH!
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Mon Mar 14, 05 10:33 am |
 |
 |
pkflash
Newbie - One Blade
Joined: 14 Mar 2005
Posts: 18
|
 Thanks!
You rock! This helps a lot.
|
Mon Mar 14, 05 10:44 am |
|
 |
pkflash
Newbie - One Blade
Joined: 14 Mar 2005
Posts: 18
|
 How to set up shipping options in the order form?
I have the logic put in and changed it to fit the shipping the way the lcient wants it currently. But the logic doesn't calculate at all now. I assume I have to change the form as you instructed, but I am unsure how to do that.
This is the code in my form:
<TD COLSPAN=2><FONT SIZE="+1" COLOR=BLACK>
Shipping Information: (if different from above)</FONT></TD>
</TR><TR><TD COLSPAN="2"><FONT SIZE="-1"><hr></FONT></TD>
</TR><tr>
<td WIDTH="100">Method:</td>
<td width="450"><SELECT NAME="Ecom_ShipTo_Method">
<OPTION VALUE="UPS Ground Residential(GNDRES)">UPS Ground Residential</OPTION>
<OPTION VALUE="UPS Ground Commercial (GNDCOM)">
UPS Ground Commercial</OPTION>
<OPTION VALUE="UPS Next Day (1DA)">
UPS Next Day</OPTION>
</SELECT>
This is the new logic the way I set it up:
@sc_shipping_logic = ( "GNDRES|1-25.99|||5.95",
"GNDRES|26.00-50.99|||6.95",
"GNDRES|51.00-75.99|||7.95",
"GNDRES|76.00-100.99|||9.95",
"GNDRES|101.00-150.99|||11.95",
"GNDRES|151.00-|||13.95");
"GNDCOM|1-25.99|||5.95",
"GNDCOM|26.00-50.99|||6.95",
"GNDCOM|51.00-75.99|||7.95",
"GNDCOM|76.00-100.99|||9.95",
"GNDCOM|101.00-150.99|||11.95",
"GNDCOM|151.00-|||13.95");
"1DA|1-25.99|||19.95",
"1DA|26.00-50.99|||26.95",
"1DA|51.00-75.99|||27.95",
"1DA|76.00-100.99|||29.95",
"1DA|101.00-150.99|||31.95",
"1DA|151.00-|||33.95");
$shipping_price = &calculate_shipping($temp_total,
$total_quantity, $total_measured_quantity);
What's wrong with thsi picture?
|
Mon Mar 14, 05 10:59 am |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
You have some syntax errors in the logic
Here's the right way to do this:
Code:This is the new logic the way I set it up:
@sc_shipping_logic = ( "GNDRES|1-25.99|||5.95",
"GNDRES|26.00-50.99|||6.95",
"GNDRES|51.00-75.99|||7.95",
"GNDRES|76.00-100.99|||9.95",
"GNDRES|101.00-150.99|||11.95",
"GNDRES|151.00-|||13.95",
"GNDCOM|1-25.99|||5.95",
"GNDCOM|26.00-50.99|||6.95",
"GNDCOM|51.00-75.99|||7.95",
"GNDCOM|76.00-100.99|||9.95",
"GNDCOM|101.00-150.99|||11.95",
"GNDCOM|151.00-|||13.95",
"1DA|1-25.99|||19.95",
"1DA|26.00-50.99|||26.95",
"1DA|51.00-75.99|||27.95",
"1DA|76.00-100.99|||29.95",
"1DA|101.00-150.99|||31.95",
"1DA|151.00-|||33.95");
$shipping_price = &calculate_shipping($temp_total,
$total_quantity, $total_measured_quantity);
HTH!
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Mon Mar 14, 05 11:16 am |
 |
 |
pkflash
Newbie - One Blade
Joined: 14 Mar 2005
Posts: 18
|
 2 quick questions
1. I didn't see any difference in the code that you posted an dthe code that I posted. Can you showme the syntax error(s) so I can avoid them in teh future.
2. With this logic, do I need to change the form at all, or should it just work at this point?
|
Mon Mar 14, 05 11:39 am |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
 Re: 2 quick questions
pkflash wrote:1. I didn't see any difference in the code that you posted an dthe code that I posted. Can you showme the syntax error(s) so I can avoid them in teh future.
Here's the fiest line that had incorrect coding:
"GNDRES|151.00-|||13.95");
It needed to be:
"GNDRES|151.00-|||13.95",
Only the last line of the logic array has the right parenthesis and semicolon.
You had made this same syntax error at the end of the list of GNDCOM definitions.
pkflash wrote:
2. With this logic, do I need to change the form at all, or should it just work at this point?
No, the form should not need to be changed.
HTH!
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Mon Mar 14, 05 12:11 pm |
 |
 |
pkflash
Newbie - One Blade
Joined: 14 Mar 2005
Posts: 18
|
 Thanks!
All seems to work right! Let me know if I can return the favor in any way, really I'm a great designer. I just suck at scripting or programming!
pkflash@gmail.com
|
Mon Mar 14, 05 12:19 pm |
|
 |
kismet
Newbie - Two Blades
Joined: 21 Mar 2005
Posts: 33
Location: atlanta
|
 Shipping Charges
My Calculations are not working
Where should this code go and in what form?
<TD COLSPAN=2><FONT SIZE="+1" COLOR=BLACK>
Shipping Information: (if different from above)</FONT></TD>
</TR><TR><TD COLSPAN="2"><FONT SIZE="-1"><hr></FONT></TD>
</TR><tr>
<td WIDTH="100">Method:</td>
<td width="450"><SELECT NAME="Ecom_ShipTo_Method">
<OPTION VALUE="UPS Ground Residential(GNDRES)">UPS Ground Residential</OPTION>
<OPTION VALUE="UPS Ground Commercial (GNDCOM)">
UPS Ground Commercial</OPTION>
<OPTION VALUE="UPS Next Day (1DA)">
UPS Next Day</OPTION>
</SELECT>
Also can you take a look at my shipping code and let me know if it set up right:
@sc_shipping_logic = ( "GRNDRES|1-20.00|||22.5%",
"GRNDRES|20-50.99|||16.0%",
"GRNDRES|50-|||20.0%"
"1DA|1-|||20.00");
#
$shipping_price = &calculate_shipping($temp_total,
$total_quantity, $total_measured_quantity);
|
Thu Apr 14, 05 6:35 am |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
Are you using UPS? If so, then just use the real time shipping module that is already set up. You just need to turn it on and set the weights of your products in the database.
What payment gateway are you using?
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Thu Apr 14, 05 7:34 am |
 |
 |
kismet
Newbie - Two Blades
Joined: 21 Mar 2005
Posts: 33
Location: atlanta
|
 Shipping Charges
I have UPS and FEDEX selected.
|
Thu Apr 21, 05 2:17 pm |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
FedEx does not work, it cannot be used.
FedEx changed their API and the new FedEx module will not be available until v5.0 is released. Even then, it will only be a Premier Member Booster Pack file only.
The UPS module will work, but you have to have everything set up in the shipping settings of the manager, lower half of page. Turn off the custom shipping logic to use the SBW UPS module.
HTH!
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Thu Apr 21, 05 3:08 pm |
 |
 |
kismet
Newbie - Two Blades
Joined: 21 Mar 2005
Posts: 33
Location: atlanta
|
 Shipping Charges
I turned off the following:
Custom Shipping Logic: & SBW (Ship By Weight) Shipping Module Information:
Also, can you tell me if this is correct?
@sc_shipping_logic = ( "GRNDRES|1-20.00|||22.5%",
"GRNDRES|20-50.99|||16.0%",
"GRNDRES|50-|||20.0%"
"1DA|1-|||20.00");
$shipping_price = &calculate_shipping($temp_total,
$total_quantity, $total_measured_quantity);
|
Thu Apr 21, 05 9:09 pm |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
Didn't you want to use the UPS module??
If so, you need to turn the SBW on and have a weight specified for each product.
If not, then you have to have custom shipping logic turned on (answer, "yes")
and the question about shipping by weight with the answer of "no".
With the logic you have, you are missing a comma on the end of the "GRNDRES|50-|||20.0%"
Your shipping logic should be like this:
Code:
@sc_shipping_logic = ( "GRNDRES|1-20.00|||22.5%",
"GRNDRES|20-50.99|||16.0%",
"GRNDRES|50-|||20.0%",
"1DA|1-|||20.00");
$shipping_price = &calculate_shipping($temp_total,
$total_quantity, $total_measured_quantity);
HTH!
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Fri Apr 22, 05 3:48 am |
 |
 |
|
The time now is Wed Apr 30, 25 8:20 am | All times are GMT - 7 Hours
|
Page 1 of 1
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|