 |
Page 1 of 1
|
Author |
Message |
vinsbour
User - Two Blades
Joined: 23 Jan 2007
Posts: 151
|
 Shipping Quantities
Hi,
I have looked at the DOCS and have looked through many of the Q/A's here, but have not found anything that fits.
The company that I am setting this up for is shipping wine. So I will be using Custom Shipping. There is a price for 1 bottle, for 2 bottles and 3 bottles. Then if 4 are ordered, it is 3 bottle price plus 1 bottle price and so on....
So I have something like this for the 1,2, and 3 bottles.
@sc_shipping_logic = (
"Pickup||1-||0",
"France||1||3",
"France||2||6",
"France||3-||9",
"Angleterre||1-||4",
Now how do I proceed for bottle 4, 5, 6 .... and so on. Or is this really asking too much.
Thank you
Sue
|
Sat Feb 03, 07 3:11 am |
|
 |
vinsbour
User - Two Blades
Joined: 23 Jan 2007
Posts: 151
|
Hi,
A note to add to my question. I just notice the numbers I put in for the charges are perfect multiples... this is not the real price and it is not that easy. I do not have the actual costs yet, (hope to get them soon), but had placed numbers in the slot .
Thanks and sorry if it was confusing..
Sue
|
Sat Feb 03, 07 3:15 am |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
Sue,
You're in the right direction.
You really shouldn't worry about it too much until the customer gives you real numbers so that you can see if there is a pattern and if so, there may be a better approach in the logic.
HTH!
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Sat Feb 03, 07 9:05 am |
 |
 |
vinsbour
User - Two Blades
Joined: 23 Jan 2007
Posts: 151
|
Hi,
OK I really need help with shipping!! and coding!!
I am using Custom coding for shipping. Settings; 3; no handling charge; no alternate origins; Custom shipping YES; Run Before; By weight No;USPS & UPS NO
Requirements [shipping wine bottles]:
Ship by Quantity
France shipping is one set of prices
Rest of EU (list of countries is only EU) a separate price
Cut off at higher level (60+ bottles in France -and 24 bottles in the rest of EU)
Allow Pickup free
So I have made a "ROUGH" attempt at coding, but I am really lost. And I have no idea how to stop at 60 bottles and state "contact us"
So here is my first attempt (I have not loaded it because I know there are errors). Any help?
<SELECT NAME=Ecom_ShipTo_Method>
<OPTION value="$vform_Ecom_ShipTo_Method"><!--agorascript-pre
if ("$vform_Ecom_ShipTo_Method" eq "") {
return " Select Shipping Method ";
} else {
return "$vform_Ecom_ShipTo_Method";
}
--></OPTION>
<OPTION VALUE="Standard Delivery">
Livrason</option>
<OPTION VALUE="Pickup">
Collecte </option>
</SELECT>if ($ship_method eq "Pickup") { # set a default value
$temp_total="0" }
else
if ($eform_Ecom_ShipTo_Postal_CountryCode eq 'France')
@sc_shipping_logic =
( "France||1|9",
"France||2|10",
"France||3|12",
"France||4|20",
"France||5|22",
"France||6|27",
"France||7-12|27",
"France||13-24|27",
"France||25-|?", ? how to "CONTACTER NOUS",
else
"||1|24",
"||2|26",
"||3|28",
"||4|30",
"||5|32",
"||6|34",
"||7-12|45",
"||13-|?", ? how to "CONTACTER NOUS",))
#
$shipping_price = &calculate_shipping($temp_total,
$total_quantity, $total_measured_quantity);
Sue ( http://www.vinsbourgogne.com/agora/agora.cgi)
|
Wed Feb 07, 07 4:39 am |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
Sue,
This part, belongs in the order form:
Code:<SELECT NAME=Ecom_ShipTo_Method>
<OPTION value="$vform_Ecom_ShipTo_Method"><!--agorascript-pre
if ("$vform_Ecom_ShipTo_Method" eq "") {
return " Select Shipping Method ";
} else {
return "$vform_Ecom_ShipTo_Method";
}
--></OPTION>
<OPTION VALUE="Standard Delivery">
Livrason</option>
<OPTION VALUE="Pickup">
Collecte </option>
</SELECT>
Where did you place the following:
Code:if ($ship_method eq "Pickup") { # set a default value
$temp_total="0" }
else
if ($eform_Ecom_ShipTo_Postal_CountryCode eq 'France')
@sc_shipping_logic =
( "France||1|9",
"France||2|10",
"France||3|12",
"France||4|20",
"France||5|22",
"France||6|27",
"France||7-12|27",
"France||13-24|27",
"France||25-|?", ? how to "CONTACTER NOUS",
else
"||1|24",
"||2|26",
"||3|28",
"||4|30",
"||5|32",
"||6|34",
"||7-12|45",
"||13-|?", ? how to "CONTACTER NOUS",))
#
$shipping_price = &calculate_shipping($temp_total,
$total_quantity, $total_measured_quantity);
The custom shipping logic ONLY needs to go in the shipping manager's custom shipping logic box.
It is a bit confusing as to what you have done, but, try this in the custom shipping logic box:
Code:if ($ship_method eq "Pickup")
{ # set a default value
$shipping_price = 0;
}
if ($eform_Ecom_ShipTo_Postal_CountryCode eq 'France') {
@sc_shipping_logic = ( "|1|||9.00",
"|2|||10.00",
"|3|||12.00",
"|4|||20.00",
"|5|||22.00",
"|6-24|||27.00",
"|25-|||");
} else {
@sc_shipping_logic = ( "|1|||24.00",
"|2|||26",
"|3|||28",
"|4|||30",
"|5|||32",
"|6|||34",
"|7-12|||45",
"|13-|||");
}
#
$shipping_price = &calculate_shipping($temp_total,
$total_quantity, $total_measured_quantity);
You had the quantites specified in the wronmg field of the logic and you had a field missing.
The shipping logic is very specific about its fields, and are as follows:
ShippingMethod|quantity|monetaryAmount|Weight|shippingCost
HTH!
|
Wed Feb 07, 07 5:40 am |
 |
 |
vinsbour
User - Two Blades
Joined: 23 Jan 2007
Posts: 151
|
Hi,
Thanks again for the quick reply.
I had not put in any logic, was trying it all on paper before I put anything into the system.
OK, this may seem like a dumb question, but where is the shipping managers logic box? I have gone to the manager section and clicked on Shipping Settings and Logic. I put the code into the box under shipping logic, but nothing seems to have worked.
Thanks
Sue
|
Wed Feb 07, 07 7:12 am |
|
 |
vinsbour
User - Two Blades
Joined: 23 Jan 2007
Posts: 151
|
Hi again,
It sort of worked, so never mind. It is in the logic box, but one bottle from France is 27 euro not 9..??
Not sure where it got 27 from?
And then, for the question on 60 plus bottles. Should that just be noted on the form and have the pricing stop at 60?
Thanks
Sue
|
Wed Feb 07, 07 7:21 am |
|
 |
vinsbour
User - Two Blades
Joined: 23 Jan 2007
Posts: 151
|
Hi
HELP again please. Logic from above is in, HOWEVER;
The shipping cost is coming out on STEP TWO, before any info is entered type of shipping or country).
And for one bottle is now has 45 Euros!! So it is not right.
Question: I now have loop 3 set(Shipping Manager). For France, there are no taxes (it is always in the price), so should I be using 1 or 2?
Also, under cart options, I set shipping Multiplied by quantity to NO, since I thought it is listed in the Custom Logic. IS this correct?
Thanks
Sue
|
Thu Feb 08, 07 12:50 am |
|
 |
|
The time now is Sun Apr 27, 25 4:02 pm | All times are GMT - 7 Hours
|
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
|
|
|