Jump to content
Sign in to follow this  
BlueLaredo

Freight Option

Recommended Posts

After exploring the UPS shipping module, it really looks good. It appears to be quite accurate for shipments inside the US. Does it calculate international rates from the US?

 

Is there a way with the UPS module to flag items above a given weight or from a specific manufacturer to inform the customer that freight charges will be emailed for such items?

Share this post


Link to post
Share on other sites

UPS will automatically calculate international rates when shipping to the international location is available. If you want to restrict the shipping methods available you can use the UPS Choice or UPS XML contributions.

 

Flagging specific products for different shipping methods would require the Multi Vendor Shipping contribution. There is no way to flag shipments by weight since osCommerce shipping modules only look at a total weight, not individual product weights. They don't look at the manufacturer at all.

 

Posting a notice to the customer that a rate quote will be emailed would require a custom shipping module. This should be quite simple to write.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites
UPS will automatically calculate international rates when shipping to the international location is available. If you want to restrict the shipping methods available you can use the UPS Choice or UPS XML contributions.

 

Flagging specific products for different shipping methods would require the Multi Vendor Shipping contribution. There is no way to flag shipments by weight since osCommerce shipping modules only look at a total weight, not individual product weights. They don't look at the manufacturer at all.

 

Posting a notice to the customer that a rate quote will be emailed would require a custom shipping module. This should be quite simple to write.

 

Regards

Jim

 

The Multi Vendor Shipping is far more involved than I need. A JavaScript driven solution I've done can determine whether each product must ship by freight and then informs the customer at checkout. If I were to add a "Freight" field to the products table, it would be possible to modify the appropriate shipping code. Which file/s would need to be modified if I plan to use the UPS shipping module for all other non-freight items? The checkout_shipping.php, the ups.php, or both?

Share this post


Link to post
Share on other sites

If you will never need anything more complex, I would use the freight field to trigger the notice to the customer and set the weight of those items to zero. UPS will then calculate the correct cost from the total weight of the remaining items. No further modifications would be needed.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites
If you will never need anything more complex, I would use the freight field to trigger the notice to the customer and set the weight of those items to zero. UPS will then calculate the correct cost from the total weight of the remaining items. No further modifications would be needed.

 

Regards

Jim

 

Which file or files would need to be modified? The only script I could find that performs a query for product_weight is the shopping_cart.php but modifying this file alone does not affect any change. Is this the correct file to modify or should I be looking at another file?

Share this post


Link to post
Share on other sites

I don't understand what you are trying to accomplish with this modification. Could you provide some more information?

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites
Which file or files would need to be modified? The only script I could find that performs a query for product_weight is the shopping_cart.php but modifying this file alone does not affect any change. Is this the correct file to modify or should I be looking at another file?

 

Modifying the shopping_cart.php from the includes->classes folder does indeed change the shipping charges but it appears a packaging weight is being added on the affected products. For example, 3 lbs is added to the weight of a DVD, marked as freight for testing. That weight should have been set to zero. And marking the HPLJ100 as freight changed this final weight from 49.5 lb to 3 lbs as well. Is some minimum packaging weight being added some where?

Share this post


Link to post
Share on other sites

Admin > Configuration > Shipping/Packaging > Package Tare weight sets the Tare (packaging) weight (default 3 lbs.) Larger packages - percentage increase sets the Tare weight for larger packages. You could set both of these to zero. You may then need to adjust your product weights to allow for packaging.

 

You could also edit includes/classes/shipping.php (line 54):

        if (SHIPPING_BOX_WEIGHT >= $shipping_weight*SHIPPING_BOX_PADDING/100) {
         $shipping_weight = $shipping_weight+SHIPPING_BOX_WEIGHT;
       } else {
         $shipping_weight = $shipping_weight + ($shipping_weight*SHIPPING_BOX_PADDING/100);
       }

That's where the Tare weight (SHIPPING_BOX_WEIGHT) and precentage Tare weight(SHIPPING_BOX_PADDING) are added in. Comment out or remove those lines and all of the shipping modules will ignore Tare weight.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites
Admin > Configuration > Shipping/Packaging > Package Tare weight sets the Tare (packaging) weight (default 3 lbs.) Larger packages - percentage increase sets the Tare weight for larger packages. You could set both of these to zero. You may then need to adjust your product weights to allow for packaging.

 

You could also edit includes/classes/shipping.php (line 54):

 ? ? ? ?if (SHIPPING_BOX_WEIGHT >= $shipping_weight*SHIPPING_BOX_PADDING/100) {
? ? ? ? ?$shipping_weight = $shipping_weight+SHIPPING_BOX_WEIGHT;
? ? ? ?} else {
? ? ? ? ?$shipping_weight = $shipping_weight + ($shipping_weight*SHIPPING_BOX_PADDING/100);
? ? ? ?}

That's where the Tare weight (SHIPPING_BOX_WEIGHT) and precentage Tare weight(SHIPPING_BOX_PADDING) are added in. Comment out or remove those lines and all of the shipping modules will ignore Tare weight.

 

 

Whether I set the Tare weight and percentage Tare both to zero or comment out that section, if the only item ordered is freight and has no shipping charges, it produces an error. "An error occurred with the UPS shipping calculations." If another item is added to an order which also includes a freight item there is no problem.

Share this post


Link to post
Share on other sites

Interesting. Apparently UPS doesn't like being asked for a quote on zero weight. That hadn't occurred to me.

 

You'll need to disable the request for quote when the weight is zero. In the UPS shipping module, find this code (line 70):

    function quote($method = '') {
     global $HTTP_POST_VARS, $order, $shipping_weight, $shipping_num_boxes;

and add this just after it:

      if ($shipping_weight == 0) return;

That should prevent the module from even requesting a quote unless there is at least one product with a weight.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites
Interesting. Apparently UPS doesn't like being asked for a quote on zero weight. That hadn't occurred to me.

 

You'll need to disable the request for quote when the weight is zero. In the UPS shipping module, find this code (line 70):

 ? ?function quote($method = '') {
? ? ?global $HTTP_POST_VARS, $order, $shipping_weight, $shipping_num_boxes;

and add this just after it:

 ? ? ?if ($shipping_weight == 0) return;

That should prevent the module from even requesting a quote unless there is at least one product with a weight.

 

 

Thanks, Jim. Your suggestion does indeed prevent the error message but with only a freight item selected, the "Continue" button does not proceed to the Payment method. When clicked, nothing happens.

 

And adding a non-freight item to the cart then produces a message that "an error occured with the UPS shipping calculations." This will also happen if a non-freight item is the only thing in the cart or if there is a mix of freight and non-freight items. Of course, the "Continue" button does not function at point.

 

If I disable all shipping modules within the Admin, the UPS error message does not occur and one can continue to the Payment page. But that would not be desirable for non-freight items.

Share this post


Link to post
Share on other sites

I should have thought of that. The osCommerce code checks for the selection of a shipping method and refuses to let you proceed without selecting one. This would require further modifications to allow checkout when the weight is zero, and to pass the proper data to the next page.

 

At this point I would advise you to just go with MVS. It already does what you need, and the code base will be supported.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites
I should have thought of that. The osCommerce code checks for the selection of a shipping method and refuses to let you proceed without selecting one. This would require further modifications to allow checkout when the weight is zero, and to pass the proper data to the next page.

 

At this point I would advise you to just go with MVS. It already does what you need, and the code base will be supported.

 

Regards

Jim

 

Which version of the MVS are you suggesting? There are several versions posted in the Contributions section.

Share this post


Link to post
Share on other sites

Try the one linked from my sig. I've never managed to get any of the others to work.

 

Regards

Jim


See my profile for a list of my addons and ways to get support.

Share this post


Link to post
Share on other sites
Try the one linked from my sig. I've never managed to get any of the others to work.

 

Regards

Jim

 

Thanks. If I understood the discussion about MVS, I don't need the freight field and code that sets freight items to zero weight, right? Instead, products from certain venders are flagged for freight. Or can one choose to designate just certain products for freight shipping?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×