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 Question
Author Message
Reply with quote
Post Custom Shipping Question 
Man, I've done something like this before but forget how I did it. I want to offer 2 shipping options - Standard and Priority. Standard would be $0.79 per item ordered. Priority would be $0.99 per item ordered. I'd also be OK with simply adding a set premium for Priority of say $5 per order in addition to the normal $0.79 per item.

Is this doable with custom shipping logic? I seem to recall doing something similar in the past but can't recall (too much experimenting!).

Thanks,

Tom

View user's profile Send private message
Reply with quote
Post  
You can do something like this:
Code:

$ship_method = $form_data{'Ecom_ShipTo_Method'};
if ($ship_method eq "Standard") {
     $shipping_price = $total_quantity * .79);
}

if ($ship_method eq "Priority") {
     $shipping_price = $total_quantity * .99 ;

     $ship_logic_done = 'yes';
}


If you want $5.00 added to both methods, use the handling charge area in the Shipping Settings of the manager.

If you only want the $5 added to the Priority method change the above 'Priority' part of the logic above to:
Code:

if ($ship_method eq "Priority") {
     $shipping_price = 5.00 + ($total_quantity * .99);


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  
Bonnie, You are on the ball!

One other question - can the shipping amounts configured in the database be incorporated into the custom logic you showed me? Right now, I'm selling just single items; hence, the low $0.79 per item. If I decide to sell 100-packs (DVDs), $0.79 shipping won't work so I was hoping to configure a shipping amount in the database ($15 for standard & $25 for Priority???) and use that in the custom logic.

Thanks again.

View user's profile Send private message
Reply with quote
Post  
For the bigger packs it can be set up a hidden option.
IE:
Code:

<input NAME ="option|001|%%PRODUCT_ID%%" type="hidden" value="100-pack||15.00">


Then in the database, put 10.00 in the shipping field of the 100-packs, "0" for the singles.

Shipping logic:
Code:

$ship_method = $form_data{'Ecom_ShipTo_Method'};
if ($ship_method eq "Standard") {
     $shipping_price = ($total_quantity * .79);
}

if ($ship_method eq "Priority") {
     $shipping_price = ($total_quantity * .99) + $total_measured_quantity ;

     $ship_logic_done = 'yes';
}


What this will do, is:
First, the shipping amount in the hidden option will bee applied. If the singles do not have this option, nothing will be added, but the ones that do have the option will add the $15.00
Then, the standard fee of the .79 or .99 per item will still be applied.
Finally, the value in the shipping field of the database is added.
So for 1 100-pack the shipping charges should turn out to be:
Standard: $15.79
Priority: $25.99

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  
OK, I know this is gonna be a "doh!" question. Where does that hidden option code go?

View user's profile Send private message
Reply with quote
Post  
Nevermind - brain fart - got it!

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