www.uburst.com www.uburst.com

"Shipping Charges Question"

Go back to the LobbyClick here to Go Back to Main ListingClick here to see helpClick here to Search the Forum

Tax, Shipping, and Handling Questions
Forum Type: Public
Moderator: edmunds
Time Zone: EST
Printer Friendly Format
Original Message
 
"Shipping Charges Question"
Posted by Bradley Edwards on Sep-20-00 at 06:58 AM (EST)
Hello,

I would like to setup something similar to the "Subtotal Table" except I would like to use percentages instead of a dollar amount. Can this be done in the "Subtotal Table"?

I might be able to do figure it out in the ushop.pl script but the documentation is not real clear (for me). I can do some scripting but am by no means a wiz. Where exactly would I start the customization at?

Do I actually modify the script itself or would I enter the coding in the window where you select "Custom Script".

If I edit the script itself where exactly would I start the coding? - Right after all the variables?

This is what I'm looking to do:

$0.00 - $124.00 = $6
$125.00 - $399.00 = 4%
$400.00 - $699.00 = 3.5%
$700.00 - $999.00 = 3%
$1,000.00 and over = 2.5%

would this coding work?:

if ($totals_subtotal1 > 125 && < 399) {
$ret_value = ($totals_subtotal1 * .04);

} elseif ($totals_subtotal1 > 400 && < 699) {
$ret_value = ($totals_subtotal1 * .035);

} elseif ($totals_subtotal1 > 700 && < 999) {
$ret_value = ($totals_subtotal1 * .03);

} elseif ($totals_subtotal1 > 1000) {
$ret_value = ($totals_subtotal1 * .025);

} else {$ret_value = "6";}

Regards,
Bradley Edwards

Click to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents

 Table of Contents

RE: Shipping Charges Question, Bill Weiner, Sep-20-00, (1)
Shipping Modifier, Bradley Edwards, Sep-21-00, (2)
RE: Shipping Modifier, Bill Weiner, Sep-21-00, (3)
Shipping Modifier, Bradley Edwards, Sep-21-00, (4)
Shipping Modifier, Bradley Edwards, Sep-25-00, (5)
RE: Shipping Modifier, Bill Weiner, Sep-26-00, (6)
RE: Shipping Modifier, Bradley Edwards, Sep-28-00, (7)
RE: Shipping Modifier, Bill Weiner, Sep-28-00, (8)
RE: Shipping Modifier, Bradley Edwards, Sep-29-00, (9)

 

 
Click here to goto Click here to goto the Lobby
Messages in this discussion
 
1 . "RE: Shipping Charges Question"
Posted by Bill Weiner on Sep-20-00 at 01:46 PM (EST)
I agree, our documentation concerning implementing custom shipping calculations could be a little more clearer.

To answer you question, yes, you actually do modify the ushop.pl script. (That is why we left all of the comments in that script... to help identify the customizable subroutines and variables).

To implement a custom shipping method you would:

1) Begin by using any text editor (such as WordPad) to open "ushop.pl" script.

2) Once that script is opened, do a search on the "sub custom_shipping" subroutine. (This is the subroutine that is called for all shipping methods that have the "Calculation Type" set to "CUSTOM").

3) Simply insert your custom Perl code into that subroutine.

4) Save the file (as text if your editor asks)... and try it out!

As for the actual Perl code that could implement percent table:

$0.00 - $124.00 = $6
$125.00 - $399.00 = 4%
$400.00 - $699.00 = 3.5%
$700.00 - $999.00 = 3%
$1,000.00 and over = 2.5%

Your code was pretty close....just a couple syntax changes.

For some reason, this forum is not letting me POST the code here ... but just send us an email at support@uburst.com and I'll send you the code for the above table.

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
2 . "Shipping Modifier"
Posted by Bradley Edwards on Sep-21-00 at 06:14 AM (EST)
Bill, thanks for the syntax fixes! The script seems to work fine, although I do have another problem and not just with the custom scripting.

For the custom script I added:
$ret_value += $totals_shipping_modifier;
as suggested but the shipping_modifier fees are not being added to the "Shipping & Handling" total.

I also have a shipping selection setup with a "Subtotal Formula" and it's not coming through in there either.

From what I read, all I should have to do is set the charge in the applet. Correct? Or is there something else I need to set to get it to work.

Thanks Again.
Bradley Edwards

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
3 . "RE: Shipping Modifier"
Posted by Bill Weiner on Sep-21-00 at 01:54 PM (EST)
The shipping modifier is calculated by summing the "shipping_modifier" of all items in the shopping cart. If the applets for any of the items in the shopping cart did not have the "shipping_modifer" parameter specified, then it will be assumed to have a shipping modifier value of $0.00 for those particular items.

With that in mind, for any of the standard shipping calculation methods (including the Subtotal Formula), the shipping total will first be computed via the specified calculation method and then the "shipping_modifier" (if any) will be added to the shipping total.

So in other words, providing you added some items to the shopping cart which did have a value specified for their "shipping_modifier" parameter.... then that shipping modifier should be added to the results of your shipping calculation.

So double-check that the items that you are ordering do indeed have the "shipping_modifier" set.... and that the "shipping_modifier" parameter is spelled/setup correctly... and see if you are still not seeing the modifier added to the calculated shipping costs.

If not, give me the URL and I will take a look at it.

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
4 . "Shipping Modifier"
Posted by Bradley Edwards on Sep-21-00 at 11:07 PM (EST)
HI Bill,

The coding for the applet was simply copied and pasted from the applet reference. But I did do a check on the spelling and it is correct.

The URL is http://Virtual-Direct.com/mmi, there is 2 applets on the page (the "Order Now" button) the one at the top is set with the "shipping_modifer" at $3.00 the one at the bottom is set to $0.00.

I have set a "TEST" shipping mode that does not add any shipping. You can use this to check it out. For me it does not add the "modifier". I tried it in both Explorer and Netscape, same thing.

Keep me posted. Thanks again!
Bradley Edwards

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
5 . "Shipping Modifier"
Posted by Bradley Edwards on Sep-25-00 at 07:19 PM (EST)
Hello Bill,

Just wondering if anything regarding my previous post was discovered.

Thanks in advance.
Bradley Edwards

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
6 . "RE: Shipping Modifier"
Posted by Bill Weiner on Sep-26-00 at 12:17 PM (EST)
I took a look at your site... and could indeed verify that the "shipping_modifier" being posted to the uShop CGI script is still 0.0.... so the problem must be occuring on the Java-side. So then I took a look at your HTML... and everything does appear fine ... with the exception that you have two applets on that page with the exact same settings (ID, Name, Description, etc)... except one has a "shipping_modifier" set to "$3.00" ... and the other has a "shipping_modifier" set to "$0.00". In theory, this shouldn't cause a problem (even if the IDs are the same).... so there may indeed be something weird going on on the Java side. I will take a look at the Java code a little later today... and if necessary, we'll get any correction related to that in an applet release that is scheduled for later this week.

... will let you know...

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
7 . "RE: Shipping Modifier"
Posted by Bradley Edwards on Sep-28-00 at 00:48 AM (EST)
Bill,

Thanks a bunch!! I did intentionally do the appletts that way so that you could "experiment", one with & one without!

So keep me posted...

Thanks again,
Bradley Edwards

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
8 . "RE: Shipping Modifier"
Posted by Bill Weiner on Sep-28-00 at 10:47 AM (EST)
After further investigation here, we eventually did find the problem. A fix has been implemented and is currently being tested at:

http://www.uburst.com/uShop/testsite/

(See test item 5)

So it should be in the next applet release - to which we are still doing some other tests on - but should be available early next week.

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents
 
9 . "RE: Shipping Modifier"
Posted by Bradley Edwards on Sep-29-00 at 02:42 PM (EST)
Thanks Bill, Looking forward to it!

Bradley Edwards

Remove this Message: Administrator and Moderator onlyClick to Send Alert Message to the Administrator Click to edit this messageClick to EMail Click here to reply to this messageClick here to reply to this message with quotesClick to goto the Table of Contents


Archive This Thread: Admin and Moderator OnlyRemove This Thread: Admin and Moderator Only
Click here to goto Click here to goto the Lobby

 

 

 

 

 

 

 

 

 

 

 

 
Questions or problems regarding this bulletin board should be directed to Webmaster
©1997-1999 by DCScripts. All rights reserved.