Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Jan 2013
    Posts
    811
    Plugin Contributions
    0

    Default Dim weight modifications

    if i add another field to products, for dimensional weight.
    EX.
    Products Shipping Weight: 0.5
    Products Shipping Dimensional Weight: 3
    how would i write code to make it work in lets say fedexwebservices or would i add it else where?
    something in line like this, and i know this is not correct but i have the idea
    dim_weight =$db->Execute("SELECT * FROM products where products_id='$id'");
    If weight < dim_weight
    continue
    else use dim weight
    Jimmie
    Last edited by jimmie; 28 Jan 2016 at 01:19 AM.

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Dim weight modifications

    Quote Originally Posted by jimmie View Post
    if i add another field to products, for dimensional weight.
    EX.
    Products Shipping Weight: 0.5
    Products Shipping Dimensional Weight: 3
    Sorry, but I'm a little confused. I know weights, and I know dimensions. WTF is 'dimensional weight'?

    Quote Originally Posted by jimmie View Post
    how would i write code to make it work in lets say fedexwebservices or would i add it else where?
    There are a couple of shipping modules that will add dimension fields for the products, and these same module will use this data to calculate the size of the parcel (generally used where 'cubing rules' may apply.

    ozpost is one such module that I know for sure does this, but I know that at least one of the US postage modules also does it, so if this is the kind of thing you are after, then my suggestion would be to d/load one of these module and reverse engineer the relevant parts of the code.

    Other than the adding of these fields, Zencart itself doesn't know about them - so all you really need to deal with is making use of this data in the shipping module itself.

    In theory - all pretty straightforward. In practice, creating the code that takes the varying dimensions of multiple products to combine them into a single parcel (if that is what is required) can be *very* complex.

    Cheers
    RodG

  3. #3
    Join Date
    Jan 2013
    Posts
    811
    Plugin Contributions
    0

    Default Re: Dim weight modifications

    if a product weighs 1 lb. but is in a 12 x 12 x 12 box. new weight is 12 x 12 x 12 / 166 = 10.409638554

  4. #4
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Dim weight modifications

    Quote Originally Posted by jimmie View Post
    if a product weighs 1 lb. but is in a 12 x 12 x 12 box. new weight is 12 x 12 x 12 / 166 = 10.409638554
    Hmmm, this must be some new math that didn't exist when I went to school ;-)

    What I was taught is that if a product weighs 1lb, and the box weighs 1lb, the total parcel weight will be 2lb.

    Where does the "magic number" 166 in your formula come from?
    What laws of physics is it that determines that all boxes of a given size will always weigh the same regardless of the material it is made from.

    I think that you are actually trying to describe are the "cubing rules" that I previously mentioned. Please take note that if this is the case you probably need to be aware that the formula used for this is somewhat arbitrary and it can/does change from carrier to carrier.

    The good news is that you don't actually need to know the formula being used. All you need do is supply the parcel deadweight and parcel dimensions to the carriers API and they will return the correct results according to their own formula.

    If I'm wrong, and this isn't the cubing rules that you are referring to then you still have me totally confused,. :-(

    Cheers
    RodG

  5. #5
    Join Date
    Jan 2013
    Posts
    811
    Plugin Contributions
    0

    Default Re: Dim weight modifications

    fedex and ups have implemented dimensional shipping, this is how they determine dimensional weight by multiplying l x w x h /166, (for Domestic) they divide by 136 if international, they use the higher number
    Last edited by jimmie; 28 Jan 2016 at 09:19 PM.

  6. #6
    Join Date
    Jan 2013
    Posts
    811
    Plugin Contributions
    0

    Default Re: Dim weight modifications

    from fedex website
    Why is proper packaging important?
    Recent e-commerce shipping trends have led to a decrease in package density. The average package weight compared to its exterior dimensions is declining, which is inefficient and costly for small businesses. Dimensional weight pricing methods will encourage businesses everywhere to optimize their packaging practices.

    As an industry leader in sustainable transportation practices, FedEx has the resources and solutions to provide you with efficient packaging options.

    Packing properly can boost your bottom line.
    Many businesses use a few standard box sizes for all shipments without realizing the impact of dimensional weight on their shipping costs. FedEx can help you analyze your typical shipments and determine the right variety of box sizes necessary to protect your products without wasted dimensional weight.

    Read these Frequently Asked Questions to find out how dimensional weight can affect your business, and how you can maximize profits with proper packaging.

    Dimensional weight FAQs
    What is dimensional weight?
    Dimensional weight reflects package density, which is the amount of space a package occupies in relation to its actual weight. All FedEx Express® and FedEx Ground® shipments within the U.S., U.S. import-rated international shipments, and U.S. export shipments are subject to dimensional weight rating.

    Billable weight is the weight used to calculate your rate. For domestic and international services, the billable weight will either be the dimensional weight or the actual weight of your package (whichever number is greater). Calculations of dimensional weight are subject to change without notice.

    See the FedEx Service Guide for more details on dimensional weight.

    How is dimensional weight calculated?
    Dimensional weight is calculated based on the length, height, and width of the package. The dimensional weight becomes the billable weight when the dimensional weight of your package exceeds its actual weight.

    Follow these easy steps to calculate dimensional weight:

    Calculate the cubic size of your package in inches. Multiply the length by width by height of your package. Round each measurement to the nearest whole inch. The resulting total is the cubic size of your package.
    Determine actual weight. Use any standard scale to determine the actual weight of your package. Increase any fraction to the next whole pound.
    Determine dimensional weight. Divide the cubic size of your package in inches by 166 (for shipments within the U.S. and shipments between the U.S. and Puerto Rico) or 139 (for U.S. export and U.S. import-rated international shipments). Increase any fraction to the next whole pound.
    Determine billable weight. Compare the package's actual weight to its dimensional weight. The larger of the two weights is the billable weight and should be used to calculate the rate.
    For multiple-package shipments, total the billable weight of all packages in the shipment.

  7. #7
    Join Date
    Jan 2013
    Posts
    811
    Plugin Contributions
    0

    Default Re: Dim weight modifications

    if you sell air. weighs less than a lb but only fits in 24 x 24 x 24 box that weighs 1 lb. actual weight is 2 lbs. but when you add package size on fedex.com quick quote. no package size sent to fedex price is $11.something. when package size is added price goes to $46.00 Something for air

  8. #8
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Dim weight modifications

    Ok, I should done this sooner, but before coming back here to find your last couple of response I Googled "dimensional weight" (seriously, a term I've not come across before), and am now a lot wiser.

    This IS the exact same thing that I know as the cubic weight (or cubing rules), so now what has surprised me is that it is relatively new for FedEx/USPS.

    Australians have been charged via this method for as long as I can remember by every carrier/courier that we have.

    Other than this issue of terminology, everything else I have written in this thread is still applicable to what you are asking/seeking, so if until now you've been caught up trying to make me understand what "dimensional weight" is and not taken any notice of anything else, then maybe now would be a good time to go back and re-read my comments and suggestions. Of specific note being the suggestion that if you need to code for this yourself your best/easiest option would be to take an existing shipping module that already adds and utilizes the dimension fields and use them as a base or example for the module that you are trying to create/update.

    Don't expect this to be "easy" though. In addition to creating additional fields for the dimensions in the database there are at least 3 of the zencart core files that need to be modified just to enter/store this data before you can even consider using them in any shipping calculations.
    Also, if you base your module/update based on one of the existing modules you will (hopefully) retain the same field names, and this can be very important for the future.
    You probably won't want to find yourself in the situation where (for example) the USPS module creates the fields "Length , width, height " and for your FedEx module you decide to call them "Length, width and Depth" ... This would be a total nightmare for a customer using both modules and certainly something to avoid.

    Hmmm, what else, oh yeah, the actual usage of the dimensions. Now this is where things start to get *really difficult*. On the surface it seems like a trivial task, but take my word for this, but this could well be one of the most difficult programming challenges you will ever undertake.
    The "obvious" method (sum up the cubes for each of the products in the cart) doesn't actually work because that doesn't provide the dimensions of the packaged parcel. In order to make it work you need a method to "pack or stack" the individual products to determine the final size of the package and *then* apply the "magic formula" that the carrier has opted to use (and to repeat from a prior reply, this "formula" is somewhat arbitrary, and it basically depends on how much a parcel of a given size would weight if filled to capacity of a substance or material of their choosing.

    This seemingly simple task (cubing rules aka dimensional weight) always starts out simple enough, one product, dimensions x, y, z, a walk in the park.
    Add two products of different dimensions, also pretty easy (take the maximum lengths and widths, then sum the heights), with three products you are in the situation whereby two smaller products can sit side by side atop the larger product, and when you think about it, this means that this 3 product parcel could have the exact same dimensions as the parcel that only contains the 2 products.
    As more and more items gets added the more complex it all becomes, and ultimately it pretty much all falls apart in one way or another anyway (you end up "creating" parcels that require a tetris expert to replicate the computed packing, and at the other end of the scale the computed packing ends up with a lot of 'empty space' in between the products that a human packer would normally fill with smaller items, in other words that calculated parcel dimensions could be significantly larger than the human packed parcel (leading to overquoting)

    Anyway, I wish you the best of luck with this endeavour (assuming I haven't really turned you off of the idea), It isn't my intention to scare you with the difficulties you will face, but having "been there, done that" and seen *many* others also attempt it only to give up week/months later (when they realise that what we are trying to achieve is often referred to as a "holy grail") it would be wrong for me to start you on this path without giving a little bit of an idea where you are heading.

    When I first created the ozpost module (almost a decade ago) no one was around to explain the difficulties I was going to face. If I had known, I almost certainly wouldn't have started the project. I would have spent hundreds of hours trying and testing methodologies that were doomed to failure (Eg, summing the cubes then trying to reverse calculate what the dimensions should be). Even to this day my packing/stacking algorithms are being constantly tweaked and adjusted in the ongoing effort to find that 'perfect balance' between how the code packs things and how a human would pack the same items. In short, this isn't an exact science, it isn't as simple as applying a formula detailed by the carrier companies. In effect, what started out for me as being a "simple weekend project" (how hard can it be? ) has pretty much taken over my life.

    Adding the dimensions to zencart... Easy.
    Obtaining the quotes from the carriers using the dimensional data..... Easy.
    The bit that few people consider (the handling of an unknown qty of items of various different dimensions...... Near impossible to suit all users in all circumstances.

    You have been forewarned.

    Note: A common /easy method/solution that I've been seeing used a fair bit is to completely ignore the packing problem and quote for each item individually. Many merchants appear quite happy with this (and some even take advantage of it to make a little extra profit (by shipping in a single parcel anyway at a cheaper cost). The problem here is that it often comes at a cost of lost sales (not an issue for me module developer, but not good for the merchant that has no choice in the matter. So although quite common it isn't a good method for either the customer or the merchant.

    Again, I wish you the best of luck.

    Cheers
    Rod

  9. #9
    Join Date
    Jan 2013
    Posts
    811
    Plugin Contributions
    0

    Default Re: Dim weight modifications

    dont the shipping modules look at the weight field in zen products table, i want to change this method to look at and compare the the two fields, always use weight field, unless something in dim_weight field. Most of my items are ready to ship (no other packaging required
    Last edited by jimmie; 29 Jan 2016 at 03:01 AM.

  10. #10
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Dim weight modifications

    Additional note that you may like to consider.

    As indicated by the info you supplied from FedEx, the rate actually charged is
    "The dimensional weight becomes the billable weight when the dimensional weight of your package exceeds its actual weight."

    In other words, the dimensional weights are only used in certain circumstances.
    What hasn't been made clear here is that unless you really *are* selling "air" (or perhaps feathers) there is a *very high* probably that *most* merchants will be selling products and packaging them in such a way that these "dimensional weights" will never apply. In effect, in spite of this change, calculating the quotes based on the parcel deadweight alone is still going to provide accurate quotes for most merchants. Having said that if/when the dimensional weight charges do actually apply the price difference can be huge, so it shouldn't be overlooked either.

    Mind if I ask, are you proposing to take on this task for the benefit of others, or is it something you are needing (or think you need) for your own store? If for you own purposes only have you ever measured and weighed you products to see if they are going to be subject to the dimensional charges anyway? (if so, what do you actually sell? )

    You could very easily be looking for a solution to a problem that won't even apply to you.

    As an aside to this, as previously stated, the ozpost module has support for product dimensions, but its main use/benefit isn't so much for the dimensional charges (which rarely apply, even though that was the original purpose of my adding them).
    These days I use the dimensions purely for the packing/stacking algorithms in order to determine the smallest "standard box size" (or satchel) needed for any given order.
    Even though the dimensional weights have been used in Australia for as long as I remember, and that the ozpost module added the support to cater for this, I am literally *astonished* at the number of merchants that don't bother to add the product dimensions anyway (and the 0.5% that do tend to either guess at the dimensions, or worse, exaggerate them, effectively forcing a dimensional weight calculation when in practice it doesn't apply. In other words if you are planning to do this for the benefit of others you should prepare yourself for the fact that most merchants won't bother utilising it anyway, except for the small handful that sell things like bubble wrap, feathers and hats.

    It can actually be quite depressing to see all that work going to waste.

    I'm sure I've given you a lot of food for thought here. Not much else I can tell you really other than to suggest that you carefully considere who you are doing this for and why you are doing it, because it really is possible that it could all be for nought.

    Cheers
    RodG


 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v155 Modifications
    By Music Man in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 16 Jun 2016, 08:20 PM
  2. COWOA question: Dim Form Elements if Checkbox = True
    By Inxie in forum Templates, Stylesheets, Page Layout
    Replies: 13
    Last Post: 5 Oct 2012, 05:38 AM
  3. v150 Attributes Dim Weight : Table Prefix
    By rudy386 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 15 Jul 2012, 07:18 PM
  4. Modifications
    By Fluffy Bunny in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 25 Jul 2007, 08:47 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR