The Official Website of AgoraCart and Agora.cgi
AgoraCart.com Demos Download AgoraCart User Manuals & Wiki Gold Members Forum Go Gold Now! Gold Version Memberships

AgoraCart.com

About
Features
Download
Payment Gateways
Send a Donation
Founders Club
BLOG: News & Updates

Showcases & Demos

AgoraCart Demos
Shop Live Stores

Downloads & Add-ons

Gold Version Downloads
DBwizz Database Mgr.
AgoraCart.com Store

Help & Support

User Manuals
Gold Version Users Forum
Gold Version Chat
Tech Support
Certified Agora Pros
Certified Designers
Hire a Freelancer

Gold Version Members

Member Benefits
Join Today!
Gold Members Home
Gold Version Users Forum
Gold Version Chat Rooms
Gold Version Downloads

For Store Owners

Merchant Accounts
Cool Resources
Advertise Here
"Powered by" Logos
Web Hosting Search

Misc.

Contact Us
MEET's Talking Guide
The Ancient Greek Agora






AgoraCart Free User Forums

This is the official FAQ and Cool Tips guide For the AgoraCart shopping Cart software


Official Sponsors of the AgoraCart Project:

       


RegisterSearchFAQLog in
Reply to topic Page 1 of 1
Shipping logic, Overnight charges won't calculate
Author Message
Reply with quote
Post 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 Wink

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);

View user's profile Send private message
Reply with quote
Post  
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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
Reply with quote
Post 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

View user's profile Send private message
Reply with quote
Post  
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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
Reply with quote
Post Thanks! 
You rock! This helps a lot.

View user's profile Send private message
Reply with quote
Post 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>
&nbsp;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?

View user's profile Send private message
Reply with quote
Post  
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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
Reply with quote
Post 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?

View user's profile Send private message
Reply with quote
Post 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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
Reply with quote
Post 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! Wink

pkflash@gmail.com

View user's profile Send private message
Reply with quote
Post Shipping Charges 
My Calculations are not working

Where should this code go and in what form?

<TD COLSPAN=2><FONT SIZE="+1" COLOR=BLACK>
&nbsp;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);

View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Reply with quote
Post  
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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
Reply with quote
Post Shipping Charges 
I have UPS and FEDEX selected.

View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Reply with quote
Post  
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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
Reply with quote
Post 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);

View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Reply with quote
Post  
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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger ICQ Number
Display posts from previous:
Reply to topic 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