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
Difficulty Using Custom Logic for static rates
Author Message
Reply with quote
Post Difficulty Using Custom Logic for static rates 
Hello, I am new at AgoraCart... and honestly, i wish i had used moon rocks are very valuable, im over 40 hours into this store alone in "poke and hope" learning. But, Im mostly there, and it looks pretty good.

My client sells coffee by the pound, he only does USPS shipping, and I have NO cCLUE how to set up the custom shipping logic so that it works. We need it to go
1lb=$5.00
2lb=$6.00
3-5lbs=$8.75
6-9lbs=$12.00
15lbs+=$15.00

i have my "In what loop of calculate_final_values do you wish to calculate the shipping?" set to "3", custom logic is "yes" "is the shipping weight" is "yes" and use SBW is no, FEDEX, UPS, and USPS are set to "NO" and here is the custom logic I am using:

@sc_shipping_logic = ("|1-1.99|||5.00")
"|2-2.99|||6.00",
"|3-5.99|||8.75",
"|6-9.99|||12.00",
"|10-|||15.00");
#
$shipping_price = &calculate_shipping($temp_total,
$total_quantity, $total_measured_quantity);

No shipping appears at all. Currently my gateway is set to "offline" so, it is safe to visit and play with the order process. Here is the url of my clients store:

http://www.kreamcoffee.com/cgi-bin/Agora/agora.cgi

PPlease ignore the hacked up default home contents and contact pages, etc. just chose one of the categories and see if you can tell what Ive done wrong. Smile

Im at a loss.

PLEASE HELP Smile

thanks,
Bill

View user's profile Send private message
Reply with quote
Post  
Bill,
There is documentation on shipping and other stuff in the 'protected/DOCS' directory of the store.
Now to your logic, there are errors in it.
Here's the fields for the pipe delimitations:
shipping method|dollar amt|Quantity|weight|shipping cost

Your custom shipping logic should look more like:
Code:
@sc_shipping_logic = ("|||-1.99|5.00",
"|||2.00-2.99|6.00",
"|||3.00-5.99|8.75",
"|||6.00-9.99|12.00",
"|||10.00-|15.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
Reply with quote
Post thanks!! 
Yup, that did it... i knew i must have had my code wrong. I just couldnt figure it out last night.

Now All i need to do is figure out how to add data to my invoice. Since my client has the store set up to send a copy of the order to himself, and then a copy to his coffee roaster, i need to insert a text string into the order such as "order from kream coffee" or so forth... I guess that'll be my project for this evening. Smile

Thanks again,
Bill

View user's profile Send private message
Reply with quote
Post  
Look for a line in the Offline-order_lib.pl file near the bottom that looks something like the following and edit as necessary:
Code:
if ($sc_send_order_to_email =~ /yes/i)
{
&send_mail($sc_admin_email, $sc_order_email, "Online Order",$text_of_admin_email);
}


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