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
additional freight charge only on certain items
Author Message
Reply with quote
Post additional freight charge only on certain items 
I have a little twist on the shipping by quantity issue. First off, I do not calculate shipping by weight because ALL products in my cart get a 10% S&H charge added, so I simply used the custom shipping logic to do this:

$shipping_price = int($subtotal*10 + 0.5) / 100;

Now, the twist is that a certain few products, because of size, require a $6.00 "additional freight fee" for every quantity 5 ordered (i.e., 5 of these items fit in a specially sized box and it costs $6.00 extra for each box).

The big problem is how to do the shipping calculation for each individual product instead of the entire order subtotal.... then sum up the individual products' shipping charges to get the entire order's total shipping charge. Conceptually, it would be something like this:

additional freight fee = round((quantity/5)+0.5)*6

But I'm getting stuck on how to write the conditional statement to have this additional freight fee apply to only certain products.

Please help.

View user's profile Send private message
Reply with quote
Post  
Why not just add the additional shipping charge to the price of the item with a note in the description that says that the price includes the $6.00 surcharge?
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  
Because it depends on the quantity, also ($6 per every 5 or portion of 5 ordered--it's for larger items that require a special box, see...)--as well as all shipping charges have to be set to zero, including the $6/qyantuty 5 or portion of quantity 5, depending on whether the customer chooses to pick up the order. But most orders are shipped UPS (but NOT by weight!!! ...a flat 10% shipping and handling charge is applied to all shipped orders) so this option still has to be available too. Kind of complicated, I know, but hey this is real life! haha.

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