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. To do this, enable the corresponding option in the plugin settings and add the call to the "{shopAweightHelper::showWeight($cart.items)}" and/or "{shopAweightHelper::showSize($cart.items)}" helper call to the template's cart.html file (works only for step-by-step checkout). 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.