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
Shipping Not Calculating Using Custom Logic
Author Message
Reply with quote
Post Shipping Not Calculating Using Custom Logic 
Oh boy, we have been on these forums for hours and have tried tons of things to try to get the shipping to calculate.

Please someone help! It is probably just a stupid thing we are forgetting.

We can see the "Shipping" field in the cart but it always says $0.00, throughout the entire process. So I guess it is safe to say that it is not calculating the shipping.

Here are our settings:
================================

In what loop of calculate_final_values do you wish to calculate the shipping? = 3

Handling Charge to be added to all orders. = 0.00

Add handling Charge if shipping total is Zero? = no

Custom Shipping Logic: = yes

LOGIC:

@sc_shipping_logic = (
"usps|1-10|||5.00",
"2DA|1-10|||15.00",
"1DA|1-10|||25.00");

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

Please enter the SBW (Ship By Weight) Shipping Module Information: = no

Allow Shipments via which services: FedEx: no yes no UPS: no yes no USPS: yes yes no

====================================

Here is what are settings are in the "Cart Display" screen:

======================================


quantity no Qty
db_user1 no Photo
name no Product
db_description no Description
shipping yes Shipping Price
price_after_options yes Price


AND

email_options no none Options
price_after_options no 2-D Price Cost (each)
price_after_options no 2-D Price Item Subtotal
shipping yes none Wt. each
shipping yes none Total Wt.
====================================

Here is the store: http://tracyhansendesigns.com/agora/agora.cgi?xm=on&product=Earrings

We are using v. 4.0. Please do not tell us to upgrade! We cannot commit to figuring this all out again. We just need this final item and this project will be done. It needs to be done asap!

Is it possible we are suppose to put something in the "Shipping Price (Std) or Shipping Wt (lbs-SBW module)" in each products edit screen? I am lost and confused by looking at this too much.

Just exhausted from this project.

View user's profile Send private message
Reply with quote
Post  
All of the following info MUST be removed from the header files:
Code:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>New Page 1</title>
<script type="text/javascript" src="http://www.tracyhansendesigns.com/dropdown.js">
</script>

<style type="text/css">
#menu_parent{
width: 119px;
background-color: #FFFFFF;
padding: 1px 2px;
font-weight: bold;
}

#menu_child{
position: absolute;
visibility: hidden;
background-color: #D1CAC5;
width: 119px;
border-bottom-width: 0;
}

#menu_child a{
display: block;
width: 98%;
padding: 2px;
text-decoration: none;
font:bold 12px Times New Roman;
color: #443D33;
}

#menu_child a:hover{
background-color: #7F924B;
}

#src_parent{
width: 120px;
padding: 1px 2px;
background-color: #EADDFF;
}

#src_child{
position: absolute;
visibility: hidden;
background-color: #EADDFF;
padding: 0px 5px 2px 5px;
}
</style>

<SCRIPT LANGUAGE="JavaScript">
<!-- PRE LOAD IMAGES -->
<!-- Begin
image100p = new Image();
image100p.src = "http://www.tracyhansendesigns.com/Lanitech_Artwork/button_home_on.jpg";
image101p = new Image();
image101p.src = "http://www.tracyhansendesigns.com/Lanitech_Artwork/button_bio_on.jpg";
image102p = new Image();
image102p.src = "http://www.tracyhansendesigns.com/Lanitech_Artwork/button_shopping_on.jpg";
image103p = new Image();
image103p.src = "http://www.tracyhansendesigns.com/Lanitech_Artwork/button_policies_on.jpg";
image104p = new Image();
image104p.src = "http://www.tracyhansendesigns.com/Lanitech_Artwork/button_contact_on.jpg";
image105p = new Image();
image105p.src = "http://www.tracyhansendesigns.com/Lanitech_Artwork/button_earrings_on.jpg";
image106p = new Image();
image106p.src = "http://www.tracyhansendesigns.com/Lanitech_Artwork/button_necklaces_on.jpg";
image107p = new Image();
image107p.src = "http://www.tracyhansendesigns.com/Lanitech_Artwork/button_bracelets_on.jpg";
image108p = new Image();
image108p.src = "http://www.tracyhansendesigns.com/Lanitech_Artwork/button_rings_on.jpg";
image109p = new Image();
image109p.src = "http://www.tracyhansendesigns.com/Lanitech_Artwork/button_one_on.jpg";
image110p = new Image();
image110p.src = "http://www.tracyhansendesigns.com/Lanitech_Artwork/button_custom_on.jpg";
// End -->
</script>
<style type="text/css">

#dropmenudiv{
position:absolute;
background-color: #D1CAC5;
border:1px #D1CAC5;
border-bottom-width: 0;
font:normal 12px Times New Roman;
line-height:16px;
z-index:100;
}

#dropmenudiv a{
width: 100%;
display: block;
text-indent: 3px;
border-bottom: 0px solid black;
padding: 1px 0;
text-decoration: none;
font-weight: bold;
color: #443D33
}

#dropmenudiv a:hover{ /*hover background color*/
background-color: #7F924B;
}

/* Sample CSS definition for the example list. Remove if desired */
.navlist li {
list-style-type: square;
width: 135px;
background-color: #FFFFB9;
}

</style>


<script type="text/javascript">

/***********************************************
* AnyLink Vertical Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="http://www.tracyhansendesigns.com/custom_work_info.htm">Info</a>'
menu1[1]='<a href="http://www.tracyhansendesigns.com/custom_work_designs.htm">Designs</a>'

var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var horizontaloffset=1 //horizontal offset of menu from default location. (0-5 is a good value)

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width: 160px" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x-obj.offsetWidth < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure+obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move menu up?
edgeoffset=dropmenuobj.contentmeasure-obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either? (position at top of viewable window then)
edgeoffset=dropmenuobj.y
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+obj.offsetWidth+horizontaloffset+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

</script>
<style type="text/css">

#dhtmltooltip{
position: absolute;
width: 300px;
border: 3px;
border-color: #7F924B;
padding: 15px;
background-color: #D1CAC5;
font-family: Arial;
font-size: 8pt;
visibility: hidden;
z-index: 100;
/*Remove below line to remove shadow. Below line should always appear last within this CSS*/
filter: progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=135);
}

</style>

</head>

<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">

For proper placement of this info please refer to the following thread:
http://www.agoraguide.com/faq/viewtopic.php?t=1156

Also, as for your shipping issue, the shipping methods on the order form MUST match the shipping methods on the order form. What I see in the order form is the following:

Code:
<OPTION VALUE="USPS Parcel Post (Parcel)">
USPS Parcel Post</OPTION>
<OPTION VALUE="USPS Priority Mail (Priority)">
USPS Priority Mail</OPTION>
<OPTION VALUE="USPS Express Mail (Express)">
USPS Express Mail</OPTION>


These do not match your custom shipping logic.
It should be more like:

Code:
<OPTION VALUE="usps">
USPS</OPTION>
<OPTION VALUE="2DA">
2 Day</OPTION>
<OPTION VALUE="1DA">
Next Day</OPTION>


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 That was it! How about . . . 
See, I knew it. We looked at it too long and it was obvious it was wrong. At one point it was excatly what you said. Man, you are a life saver!! Eyes are buring. Shocked

I think I should add the shipping vlaues beside the shipping method, such as "USPS Parcel Post - $5". Do you know which file that would be?

View user's profile Send private message
Reply with quote
Post  
vlane95678 wrote:
I think I should add the shipping values beside the shipping method, such as "USPS Parcel Post - $5".

I'm not sure what you are asking... Which values? Where? Are you talking on the order form?
If so, the file is the order form...


_________________
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 Clarification . . . 
I am referring to the table at the bottom that contains the drop down box with the words "USPS Parcel Post", "USPS Priority Mail", and the header on the table says "Please select where your order will be shipped and click 'Next'"


We ar eusing Authorize.net's credit card form not the zoffiline stuff. Very Happy

View user's profile Send private message
Reply with quote
Post  
The order form file...


_________________
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 Got it! Thanks! But . . . 
Am I not the only one who thinks the next page, which is "step 2" has a typo? You know, the statement "Please verify the above information. When you are confident that it is correct, click the 'Secure Orderform' button to enter your payment information."

Shouldn't it be 'Secure Order Form' with a space? I've looked for a post on where to change text this and nothing.

Closest thing I found was to look in the <gateway>-order-lib.pl file in the 'library' directory of the store. That text is no there.

View user's profile Send private message
Reply with quote
Post  
No, it is not necessarily a typo...... Any you are posting that question in the WRONG topic area...
Please post your questions in the appropriate forum topic and do not ask question in that forum topic that does NOT pertain to that particular topic...

Anyway, in v5, the text is edited in the Payment Gateway manager... MUCH easier to work with...

Otherwise, the text is in the Messages section of the agora.setup.db file...


_________________
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 for the help! 
Sorry for posting in the wrong area, as I did think when I replied. I have a color question that is driving me nutz so I will post it where appropriate.

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