 |
Page 1 of 1
|
Author |
Message |
J_Man
Newbie - Two Blades
Joined: 10 Jan 2008
Posts: 27
|
 Setting Shipping Logic
I've got everything I think working the way I want it. I set up some basic charges that applies to the items as they are put in the cart. Over certain dollar amounts, the shipping goes up. I based that on past knowledge of shipping like items.
Something I'd like to do however is apply certain shipping to certain items. Like I will be selling t-shirts and $1.95 shipping would work. Is there an added script I can put in my code I already have so that if I input a shipping charge with the listed item, it'll over ride the logic setting and only see that listed shipping as the charge?
|
Tue Jan 29, 08 11:00 pm |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
If you have the shipping charge set in product database, then the shipping logic would not override it...
You may need to re-think how you want your shipping calculated.
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Wed Jan 30, 08 5:52 am |
 |
 |
J_Man
Newbie - Two Blades
Joined: 10 Jan 2008
Posts: 27
|
That's about right, get it the way I want it but decide to make a change and end up needing to redo all of it, hehe. Ok, I'll just have to figure it out or put up a disclaimer for people to contact me on t-shirt shipping options.
|
Wed Jan 30, 08 10:27 am |
|
 |
J_Man
Newbie - Two Blades
Joined: 10 Jan 2008
Posts: 27
|
Ok, is there a way to set the shipping logic so that when you select the method of shipping, you'll automatically see the shipping adjust in the total? I was playing with this code:
Code:# Custom Shipping Logic
# Ship based on the total order.
@sc_shipping_logic =
("|Email|||0.00",
"USPS_Parcel_Post|1-9.99|||3.95",
"USPS_Parcel_Post|10-19.99|||4.95",
"USPS_Parcel_Post|20-29.99|||5.95",
"USPS_Parcel_Post|30-39.99|||7.95",
"USPS_Parcel_Post|40-49.99|||9.95",
"USPS_Parcel_Post|50-59.99|||12.95",
"USPS_Parcel_Post|60-69.99|||14.95",
"USPS_Parcel_Post|70-79.99|||16.95",
"USPS_Parcel_Post|80-89.99|||18.95",
"USPS_Parcel_Post|90-119.99|||20.95",
"USPS_Parcel_Post|120-|||25.00",
"USPS_Priority_Mail|1-9.99|||8.95",
"USPS_Priority_Mail|10-19.99|||9.95",
"USPS_Priority_Mail|20-29.99|||12.95",
"USPS_Priority_Mail|30-39.99|||14.95",
"USPS_Priority_Mail|40-49.99|||16.95",
"USPS_Priority_Mail|50-59.99|||18.95",
"USPS_Priority_Mail|60-69.99|||20.95",
"USPS_Priority_Mail|70-79.99|||24.95",
"USPS_Priority_Mail|80-89.99|||28.95",
"USPS_Priority_Mail|90-119.99|||30.95",
"USPS_Priority_Mail|120-|||35.00",
"USPS_Express_Mail|1-9.99|||12.95",
"USPS_Express_Mail|10-19.99|||16.95",
"USPS_Express_Mail|20-29.99|||20.95",
"USPS_Express_Mail|30-39.99|||25.95",
"USPS_Express_Mail|40-49.99|||28.95",
"USPS_Express_Mail|50-59.99|||34.95",
"USPS_Express_Mail|60-69.99|||38.95",
"USPS_Express_Mail|70-79.99|||42.95",
"USPS_Express_Mail|80-89.99|||45.95",
"USPS_Express_Mail|90-119.99|||48.95",
"USPS_Express_Mail|120-|||50.00",
"USPS_Priority_International|1-9.99|||14.95",
"USPS_Priority_International|10-19.99|||18.95",
"USPS_Priority_International|20-29.99|||22.95",
"USPS_Priority_International|30-39.99|||26.95",
"USPS_Priority_International|40-49.99|||30.95",
"USPS_Priority_International|50-59.99|||35.95",
"USPS_Priority_International|60-69.99|||38.95",
"USPS_Priority_International|70-79.99|||42.95",
"USPS_Priority_International|80-89.99|||46.95",
"USPS_Priority_International|90-119.99|||50.95",
"USPS_Priority_International|120-|||55.00",
"USPS_Express_International|1-9.99|||20.95",
"USPS_Express_International|10-19.99|||25.95",
"USPS_Express_International|20-29.99|||30.95",
"USPS_Express_International|30-39.99|||35.95",
"USPS_Express_International|40-49.99|||40.95",
"USPS_Express_International|50-59.99|||45.95",
"USPS_Express_International|60-69.99|||50.95",
"USPS_Express_International|70-79.99|||55.95",
"USPS_Express_International|80-89.99|||60.95",
"USPS_Express_International|90-119.99|||70.95",
"USPS_Express_International|120-|||80.00",
"UPS_Ground|1-9.99|||3.95",
"UPS_Ground|10-19.99|||4.95",
"UPS_Ground|20-29.99|||5.95",
"UPS_Ground|30-39.99|||7.95",
"UPS_Ground|40-49.99|||9.95",
"UPS_Ground|50-59.99|||12.95",
"UPS_Ground|60-69.99|||14.95",
"UPS_Ground|70-79.99|||16.95",
"UPS_Ground|80-89.99|||18.95",
"UPS_Ground|90-119.99|||20.95",
"UPS_Ground|120-|||25.00",
"UPS_2nd_Day_Air|1-9.99|||8.95",
"UPS_2nd_Day_Air|10-19.99|||9.95",
"UPS_2nd_Day_Air|20-29.99|||12.95",
"UPS_2nd_Day_Air|30-39.99|||14.95",
"UPS_2nd_Day_Air|40-49.99|||16.95",
"UPS_2nd_Day_Air|50-59.99|||18.95",
"UPS_2nd_Day_Air|60-69.99|||20.95",
"UPS_2nd_Day_Air|70-79.99|||24.95",
"UPS_2nd_Day_Air|80-89.99|||28.95",
"UPS_2nd_Day_Air|90-119.99|||30.95",
"UPS_2nd_Day_Air|120-|||35.00",
"UPS_Standard|1-9.99|||8.95",
"UPS_Standard|10-19.99|||9.95",
"UPS_Standard|20-29.99|||12.95",
"UPS_Standard|30-39.99|||14.95",
"UPS_Standard|40-49.99|||16.95",
"UPS_Standard|50-59.99|||18.95",
"UPS_Standard|60-69.99|||20.95",
"UPS_Standard|70-79.99|||24.95",
"UPS_Standard|80-89.99|||28.95",
"UPS_Standard|90-119.99|||30.95",
"UPS_Standard|120-|||35.00",
"UPS_Worldwide_Express|1-9.99|||14.95",
"UPS_Worldwide_Express|10-19.99|||18.95",
"UPS_Worldwide_Express|20-29.99|||22.95",
"UPS_Worldwide_Express|30-39.99|||26.95",
"UPS_Worldwide_Express|40-49.99|||32.95",
"UPS_Worldwide_Express|50-59.99|||35.95",
"UPS_Worldwide_Express|60-69.99|||38.95",
"UPS_Worldwide_Express|70-79.99|||42.95",
"UPS_Worldwide_Express|80-89.99|||45.95",
"UPS_Worldwide_Express|90-119.99|||48.95",
"UPS_Worldwide_Express|120-|||50.00");
$shipping_price = &calculate_shipping($temp_total,
$total_quantity, $total_measured_quantity);
$shipping_logic_done = "yes"; # forces exit, no handling charge added
But that's not doing it. If I can do that, that'll bypass any need to use live shipping for me.
|
Wed Jan 30, 08 10:54 pm |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
The first line:
"|Email|||0.00",
Needs to be:
"Email||||0.00",
You can remove the last line, it's not really needed:
$shipping_logic_done = "yes"; # forces exit, no handling charge added
Now, what version of the cart do you have?
What are the other Custom Shipping Logic settings set at?
What about SBW settings?
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Thu Jan 31, 08 5:01 am |
 |
 |
J_Man
Newbie - Two Blades
Joined: 10 Jan 2008
Posts: 27
|
Quote:Now, what version of the cart do you have?
5.2.000
Quote:What are the other Custom Shipping Logic settings set at?
In what loop of calculate_final_values do you wish to calculate the shipping?
3
Handling Charge to be added to all orders.
0
Handling Charge Type:
Flat
Add handling Charge if shipping total is Zero?
No
Use Alternate Origins?
No
Use the custom shipping logic?
yes
When to run custom shipping logic?
Before
If using Custom Logic, is shipping measured by weight?
No
How Many Custom Shipping Methods Do You Need?
None
Quote:What about SBW settings?
Use the Live/Real-Time SBW (Ship By Weight for UPS/USPS) module?
No
Allow Shipments via which services?
USPS: yes UPS (non-XML): yes
Max weight per box
UPS: 0 USPS: 50
Display Product ID number in recommended box packing order?
No
How do you wish to connect to UPS (non-XML) / USPS XML?
http-lib
Then there's the setting for USPS and UPS which I have that off so I guess those settings really don't matter what they're set at.
|
Thu Jan 31, 08 7:44 am |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
Set this one as follows:
When to run custom shipping logic? after
Since you are using the custom shipping logic, set these as follows:
USPS: NO UPS (non-XML): NO
Make the fixes and let me know how it goes...
HTH!
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Thu Jan 31, 08 8:18 am |
 |
 |
J_Man
Newbie - Two Blades
Joined: 10 Jan 2008
Posts: 27
|
That did it, Thank you! The first method "Email" I was setting so for items that $3.95 or higher is way too high for shipping, I'll let the customer submit the order without shipping and put in the special notes to contact them with the total charge. It's a small hassle, but as few customers as I expect, it won't be that big of a deal. I just need to type up some instructions on the checkout page.
One other thing, I did an edit to the offline product page so that the script I used matched up. I removed the original wording for everything to put my own. It's displaying one of the settings from how the coding originally was. Is that maybe on another pages that it's pulling that from? It's this one:
Method: USPS Parcel Post (Parcel)
These are the ones I have set:
Special Delivery (sending email request)
USPS Parcel Post (5-14 days)
USPS Priority Mail (3-7 days)
USPS Express Mail (1-3 days)
Priority Mail International (6-10 days)
Express Mail International (3-5 days)
UPS Ground (7-10 days)
UPS 2nd Day Air UPS Standard to Canada Only (7-10 days)
UPS Worldwide Express (international)
USPS Parcel Post (Parcel) doesn't appear anywhere on the offline product page now the way I have it set up. So I don't know where it's getting it from.
Oh and for future use for anyone that might be able to use the shipping logic code I typed up, here it is with the corrections:
Code:# Custom Shipping Logic
# Ship based on the total order.
@sc_shipping_logic =
("Email|||0.00",
"USPS_Parcel_Post|1-9.99|||3.95",
"USPS_Parcel_Post|10-19.99|||4.95",
"USPS_Parcel_Post|20-29.99|||5.95",
"USPS_Parcel_Post|30-39.99|||7.95",
"USPS_Parcel_Post|40-49.99|||9.95",
"USPS_Parcel_Post|50-59.99|||12.95",
"USPS_Parcel_Post|60-69.99|||14.95",
"USPS_Parcel_Post|70-79.99|||16.95",
"USPS_Parcel_Post|80-89.99|||18.95",
"USPS_Parcel_Post|90-119.99|||20.95",
"USPS_Parcel_Post|120-|||25.00",
"USPS_Priority_Mail|1-9.99|||8.95",
"USPS_Priority_Mail|10-19.99|||9.95",
"USPS_Priority_Mail|20-29.99|||12.95",
"USPS_Priority_Mail|30-39.99|||14.95",
"USPS_Priority_Mail|40-49.99|||16.95",
"USPS_Priority_Mail|50-59.99|||18.95",
"USPS_Priority_Mail|60-69.99|||20.95",
"USPS_Priority_Mail|70-79.99|||24.95",
"USPS_Priority_Mail|80-89.99|||28.95",
"USPS_Priority_Mail|90-119.99|||30.95",
"USPS_Priority_Mail|120-|||35.00",
"USPS_Express_Mail|1-9.99|||12.95",
"USPS_Express_Mail|10-19.99|||16.95",
"USPS_Express_Mail|20-29.99|||20.95",
"USPS_Express_Mail|30-39.99|||25.95",
"USPS_Express_Mail|40-49.99|||28.95",
"USPS_Express_Mail|50-59.99|||34.95",
"USPS_Express_Mail|60-69.99|||38.95",
"USPS_Express_Mail|70-79.99|||42.95",
"USPS_Express_Mail|80-89.99|||45.95",
"USPS_Express_Mail|90-119.99|||48.95",
"USPS_Express_Mail|120-|||50.00",
"USPS_Priority_International|1-9.99|||14.95",
"USPS_Priority_International|10-19.99|||18.95",
"USPS_Priority_International|20-29.99|||22.95",
"USPS_Priority_International|30-39.99|||26.95",
"USPS_Priority_International|40-49.99|||30.95",
"USPS_Priority_International|50-59.99|||35.95",
"USPS_Priority_International|60-69.99|||38.95",
"USPS_Priority_International|70-79.99|||42.95",
"USPS_Priority_International|80-89.99|||46.95",
"USPS_Priority_International|90-119.99|||50.95",
"USPS_Priority_International|120-|||55.00",
"USPS_Express_International|1-9.99|||20.95",
"USPS_Express_International|10-19.99|||25.95",
"USPS_Express_International|20-29.99|||30.95",
"USPS_Express_International|30-39.99|||35.95",
"USPS_Express_International|40-49.99|||40.95",
"USPS_Express_International|50-59.99|||45.95",
"USPS_Express_International|60-69.99|||50.95",
"USPS_Express_International|70-79.99|||55.95",
"USPS_Express_International|80-89.99|||60.95",
"USPS_Express_International|90-119.99|||70.95",
"USPS_Express_International|120-|||80.00",
"UPS_Ground|1-9.99|||3.95",
"UPS_Ground|10-19.99|||4.95",
"UPS_Ground|20-29.99|||5.95",
"UPS_Ground|30-39.99|||7.95",
"UPS_Ground|40-49.99|||9.95",
"UPS_Ground|50-59.99|||12.95",
"UPS_Ground|60-69.99|||14.95",
"UPS_Ground|70-79.99|||16.95",
"UPS_Ground|80-89.99|||18.95",
"UPS_Ground|90-119.99|||20.95",
"UPS_Ground|120-|||25.00",
"UPS_2nd_Day_Air|1-9.99|||8.95",
"UPS_2nd_Day_Air|10-19.99|||9.95",
"UPS_2nd_Day_Air|20-29.99|||12.95",
"UPS_2nd_Day_Air|30-39.99|||14.95",
"UPS_2nd_Day_Air|40-49.99|||16.95",
"UPS_2nd_Day_Air|50-59.99|||18.95",
"UPS_2nd_Day_Air|60-69.99|||20.95",
"UPS_2nd_Day_Air|70-79.99|||24.95",
"UPS_2nd_Day_Air|80-89.99|||28.95",
"UPS_2nd_Day_Air|90-119.99|||30.95",
"UPS_2nd_Day_Air|120-|||35.00",
"UPS_Standard|1-9.99|||8.95",
"UPS_Standard|10-19.99|||9.95",
"UPS_Standard|20-29.99|||12.95",
"UPS_Standard|30-39.99|||14.95",
"UPS_Standard|40-49.99|||16.95",
"UPS_Standard|50-59.99|||18.95",
"UPS_Standard|60-69.99|||20.95",
"UPS_Standard|70-79.99|||24.95",
"UPS_Standard|80-89.99|||28.95",
"UPS_Standard|90-119.99|||30.95",
"UPS_Standard|120-|||35.00",
"UPS_Worldwide_Express|1-9.99|||14.95",
"UPS_Worldwide_Express|10-19.99|||18.95",
"UPS_Worldwide_Express|20-29.99|||22.95",
"UPS_Worldwide_Express|30-39.99|||26.95",
"UPS_Worldwide_Express|40-49.99|||32.95",
"UPS_Worldwide_Express|50-59.99|||35.95",
"UPS_Worldwide_Express|60-69.99|||38.95",
"UPS_Worldwide_Express|70-79.99|||42.95",
"UPS_Worldwide_Express|80-89.99|||45.95",
"UPS_Worldwide_Express|90-119.99|||48.95",
"UPS_Worldwide_Express|120-|||50.00");
$shipping_price = &calculate_shipping($temp_total,
$total_quantity, $total_measured_quantity);
Also for referance, here's the part from the offline form that I did an edit to:
Code:<!--PASTE SHIPPING METHODS FROM SHIPPING MANAGER BELOW - REPLACE ENTIRE SHIPPING SELECT ELEMENT-->
<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="Email">Special Delivery (sending email request)</option>
<option value="USPS_Parcel_Post">USPS Parcel Post (5-14 days)</option>
<option value="USPS_Priority_Mail">USPS Priority Mail (3-7 days)</option>
<option value="USPS_Express_Mail">USPS Express Mail (1-3 days)</option>
<option value="USPS_Priority_International)">Priority Mail International (6-10 days)</option>
<option value="USPS_Express_International)">Express Mail International (3-5 days)</option>
<option value="UPS_Ground">UPS Ground (7-10 days)</option>
<option value="UPS_2nd_Day_Air">UPS 2nd Day Air</option>
<option value="UPS_Standard">UPS Standard to Canada Only (7-10 days)</option>
<option value="UPS_Worldwide_Express">UPS Worldwide Express (international)</option>
</select>
<!--PASTE SHIPPING METHODS FROM SHIPPING MANAGER ABOVE THIS - REPLACE ENTIRE SHIPPING SELECT ELEMENT-->
|
Thu Jan 31, 08 8:34 am |
|
 |
|
The time now is Tue Apr 29, 25 10:24 am | 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
|
|
|