Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Freight Option


Guest

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?

Link to comment
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.

Link to comment
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?

Link to comment
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.

Link to comment
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?

Link to comment
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.

Link to comment
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?

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...