Dimensions Settings
Last updated
Last updated
It is possible to set the dimensions - length, width and height - of the ordered item dynamically with the help of Dimensions Settings functionality.
The related modal form can be accessed by clicking on this icon in the Builder.
This is how it looks like:
Dimensions Calculation. This setting enables/disables this functionality. It must be enabled prior using it.
Measurement unit. An option can be chosen here if you want to let you customers to choose an input measurement unit dynamically. Select the option which handles this. The values of the options responsible for width, height and length will be automatically converted FROM the unit chosen in this option TO the measurement unit of your store before beign both sent to shipping plugin and used in price calculation.
⚠️ Important: The option chosen in this setting must be either select or radio option type. Its suboptions must have these slugs:
mm
cm
m
in
ft
yd
These are 6 supported types of units. ONLY these units are supported! Again, it is essential to keep suboptions slugs named identically to the supported unit types. You can use all of them or just some of them. This is how one of the suboptions may look like:
Again, "Title" can be any, but "Value" (aka "Slug") must be one of the supported unit types!
Next, there are three select fields where custom options may be chosen which are responsible for a certain dimension. Practically, it means that values of those custom options (all or some) will be used as order item dimensions.
Convert <dimension> automatically? setting enables/disables auto conversion. It is convenient most of the time, but not always. For instance, you have width and height custom options and measurement unit and would like to convert these two dimensions automatically. At the same time you also have length which is fixed or just not need to be converted as it is already in 'cm' and always be. So, just disable auto conversion for length dimension and it will be used as is.
Similarly to the weight calculation functionality, UniCPO makes it possible to set 'width', 'height' and 'length' attributes dynamically. These are standard functionality of WooCommerce - a possibility to set these properties dynamically. Shipping calculation plugins could benefit from it and provide real shipping rates based on ordered item's dimensions. Unfortunately, not every shipping plugin supports this functionality. We have tested UniCPO with ShipperHQ for WooCommerce plugin and made an effort to add such compatibility. This is the link to gist https://gist.github.com/mrpsiho/ddd09acf639ab486ca368461c80d68ff with the actual code and explanation what should be done to add support of ShipperHQ WC plugin for UniCPO and use dynamic product dimensions in shipping rates calculation.