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
Understanding Shipping Logic
Author Message
Reply with quote
Post Understanding Shipping Logic 
I am trying to grasp how to use the shipping logic available in AgoraCart, but I need help. I am very confused, and do no send me to the shipping.txt file in the 'protected/DOCS' directory as that is why I am confused. First, there is mentioned "the old way" but it is unclear just what is "the new way". Second, an example is given, like:
@sc_shipping_logic = (
"usps||1-|5%",
"ups||1-||10%",
"fedex||1-||20%);

implying that this is complete. Then later it is stated, "To implement it, you will need to define the logic array and call the subroutine in the custom shipping logic." This is followed by an example that includes a logic array (@sc_shipping_logic=) followed by $shipping_price = &calculate_shipping(....

So: Do both parts need to be coded? Will the first one without the &calculate_shipping call work? Is this the "old" and the "new" method? I need help, please.
Tom

View user's profile Send private message
Reply with quote
Post  
Tom,
How, exactly, do you want your shipping calculated?
Knowing this, we can better direct you in what you may need.
BTW, there are other shipping logic examples that are complete at:
http://www.agoraguide.com/faq/viewtopic.php?t=5221

This should help clear up the confusion a little.


_________________
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  
Bonnie, Thank you for responding as I know you always give good guidance. I have looked at the examples you pointed me to but I still have questions. As for my specific need, that is not the most important issue to me at this time. I have had help in this area before, gotten an answer, implemented it and moved on. But I really want to understand this thing so that I can do it on my own. The examples you point me to have both a @sc_shipping_logic and a &calculate_shipping section. But I do not see how they relate to each other or even if they do.

Does this:
@sc_shipping_logic = (
"usps||1-10||5.00",
"||1-10||10.00",
"||1-10||20%");

actually return something? or does it merely setup the parameters by which the
$shipping_price = &calculate_shipping($temp_total,
$total_quantity, $total_measured_quantity);
will perform its calculation? I really do not see a connection between the two. Will one function without the other?

I most commonly use a very simple calculation to perform my shipping calc:
$shipping_price = 3.91 + (($total_quantity - 1)* .70);

But from time to time I need to consider other things like free shipping under certain conditions and the @sc_shipping_logic method looks like it would do what I want.

In the forums I have seen many questions involving this subject. I believe that a good explanation of how it works would negate many questions.

Thanks again for your help. Tom

View user's profile Send private message
Reply with quote
Post  
Tom,
The following code:
Code:
@sc_shipping_logic = (
"usps||1-10||5.00",
"||1-10||10.00",
"||1-10||20%");

$shipping_price = &calculate_shipping($temp_total, $total_quantity, $total_measured_quantity);


Both the logic and the shipping price calculation are connected... One WILL NOT work without the other... What you aren't seeing is the subroutine that takes this info and uses it to do the actual calculation. That is in one of the core files.


_________________
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  
Thank you Bonnie! This clears the air greatly for me and surely for others reading this post. I can do some testing now and see how it works out.
You are greatly appreciated, Tom

View user's profile Send private message
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