Order weight and size

Order weight and size for Shop-Script

Order weight and size in the cart and backend

After plugin activation strings with the order weight and/or size appear on the order page in the backend. If the weight or size (dimensions) is not set for all products in the order, a warning is displayed listing the SKUs and names of the products for which the weight/size are not specified (a very useful option, since the weight and dimensions of the order directly affect the delivery cost). The size of the order is calculated as follows: the products are sorted by size reduction and stacked in layers; if the next product does not fit into the remaining space, it is stacked on the next layer. The algorithm is imperfect and for some products can lead to significant deviations from reality, but for relatively homogeneous products it leads to fairly adequate results. Also, the weight and/or size of the order can be displayed in the shopping cart. If order in the cart is used, just enable the corresponding options in the plugin settings. If you use step-by-step checkout, you must also add a helper call "{shopAweightHelper::showWeight($cart.items)}" and/or "{shopAweightHelper::showSize($cart.items)}" to the template's cart.html file. Additionally, you can specify the weight and size of the package (weight and increase of dimensions, respectively, added to the weight and each side of the order to take into account the increase in weight and dimensions during packing). The output of information in the cart and backend works independently. The text of all labels displayed can be changed in the plugin settings.