For a shipping module, the dimensions of a product (length, width and height) must be used to determine the cardboard box for shipping.
I created the products_length, products_width and products_height fields in the products table.
I found that you can use $order->products in the shipping module, this gets information from the products table, but it doesn't give me products_length, products_width and products_height.
I can't seem to find in the files how and where this information is found. I think that would be what I need to move forward.
Unless there is another way that I haven't thought of...
Thanks in advance.
Where is $order->product created?
-
ecartz
- Core Team
- Posts: 3084
- Joined: Tue Nov 05, 2019 6:02 pm
- Phoenix Version:
- Has thanked: 4 times
- Been thanked: 208 times
Re: Where is $order->product created?
https://github.com/CE-PhoenixCart/Phoen ... er.php#L33
That is the line with the hook to add columns to be copied from the cart to the order.
That is the line with the hook to add columns to be copied from the cart to the order.
Code: Select all
class hook_shop_siteWide_dimensions {
public function listen_cartOrderProductColumns($parameters) {
$parameters['column_keys']['length'] = 'length';
$parameters['column_keys']['width'] = 'width';
$parameters['column_keys']['height'] = 'height';
}
}