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
Custom Shipping Logic some items need additional charges
Author Message
Reply with quote
Post Custom Shipping Logic some items need additional charges 
My simple shipping logic works well for most items. A few hundred items are either too heavy or too large and, by themselves, require additional shipping to be added. I know which items need the additional shipping added. Naturally most of them require different amounts to be added. What I don’t know is how to set up the custom shipping logic to ‘add’ the additional shipping amounts after it has done the basic calculations. The basic calculation often results in ‘free shipping’ and that’s what I want it to do unless the item or items are particularly heavy. At that point I want I want additional shipping added to cover costs. Then there is the additional problem of several of the same item being ordered, which increases the weight and thus the cost of shipping.

My initial thought was to use SBW but that foray ended badly. With SBW no longer an option, I’ve returned to custom shipping logic. My understanding is Column G may contain either actual weights or a shipping cost. I have been able to get the contents of that column to show up on the Cart Display and I can have it multiplied by quantity. I haven’t been able to figure out (or find where someone else has figured out) how to add that value to the shipping calculation. I think I can deal with cumulative charges or cumulative weights.

If this is an inappropriate use of Column G I could store the weight or charge info in an open user column, but I would still need to access it for the final calculations. As a matter of fairness to the customer I want the additional charge to be categorized in the Cart Display.

I know about adding percentages and flat rates. This is mostly an item by item determination. There are multiple references to http://www.agoracart.com/addon_shiplogic.htm but the link is broken.

View user's profile Send private message
Reply with quote
Post  
Samples of custom shipping logic can be found at:
http://www.agoraguide.com/faq/viewtopic.php?t=5221

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  
Why don't you try posting what you do have for your logic and what EXACTLY, with an example, what you want to do... We can then help a little better. But, you got nothin' but generalities at the moment.
There is probably not an easy answer for you.. and you are asking for some custom coding...


_________________
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. I hope this is a better way of explaining what I'm looking for. Below is the basis of my current shipping logic.

@sc_shipping_logic = (
"FedEx Ground|1-44.99|||4.95",
"FedEx Ground|45-|||0.00",

"FedEx ES 3rd Day|1-44.99|||15.95",
"FedEx ES 3rd Day|45-|||11.00",

"FedEx 2nd Day Air|1-44.99|||19.95",
"FedEx 2nd Day Air|45-|||15.00",

"FedEx Standard Overnight|1-44.99|||39.95",
"FedEx Standard Overnight|45-|||35.00");

There are some state and international considerations that add additional shipping like what follows.

if ($ship_st eq "AK") {
$shipping_price = $shipping_price + 30.00;
}

Once the logic has calculated the shipping (which will frequently be ‘$0’) I want it to add additional shipping (based on total weight of the order) just like it does in the case of something going to Alaska (although that is just a flat rate addition). I have the individual weights of the items or I could assign a dollar value for those weights. The individual weights (in column G) are referenced as ‘db_shipping’ for the cart display.

I think maybe all I need is the variable name for the cumulative weights or cumulative additional shipping costs. I’m using ‘$weight’ (as that variable name) because I don’t know the correct name. If I knew the variable name I think the logic I’m looking for might look something like what follows to add another flat rate charge. I’m using ‘$weight’ because I don’t know the correct name.

if ($weight > 10.00) { $shipping_price = &calculate_shipping($temp_total,
$total_quantity, $total_measured_quantity);
$shipping_price = $shipping_price + 15.00;
}

What I really want is an exact charge that would look more like this.

if ($weight > 10.00) { $shipping_price = &calculate_shipping($temp_total,
$total_quantity, $total_measured_quantity);
$shipping_price = $shipping_price + $weight;

I tried ‘db_shipping’ as the variable name and that didn’t work. It wouldn’t have been a cumulative total weight anyway, but I was just trying to get into the ballpark.

Am I on the right track? There must be a cumulative weight variable or SBW wouldn’t work.

View user's profile Send private message
Reply with quote
Post Additional shipping added - solution 
The variable name ‘$sc_shipping_thing’ does work in the dozens of test I have run. I don’t have any idea what it was intended for. The actual shipping logic addition looks like this:

if ($sc_shipping_thing > 10.00)
{ $shipping_price = &calculate_shipping($temp_total,
$total_quantity, $total_measured_quantity);
$shipping_price = $shipping_price + $sc_shipping_thing - 10.00;
}

I’m allowing up to $10.00 “cumulative shipping charges” before I tack on additional shipping cost for the customer. I subtract out the $10.00 since the formula adds the cumulative total. Column G must contain charges not actual weights. Place the code after the initial calculations but before State or International considerations.

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