shopp_packaging_types

filters the list of names and labels of shipping packager packaging types.

add_filter( 'shopp_packaging_types', [callback] )

@param array $types the list of names and labels of shipping packager packaging types.

Description

filters the list of names and labels of shipping packager packaging types.

These types are used by the Packager class to build different package combinations, depending on the merchant settings.

Defaults are as follows:
* All together by weight – All items in the cart will be added to the same package, and only the weights will be summed.
* All together with dimensions – All items in the cart will be added to the same package, and the dimensions of the final package will be attempted by max width and max length and total height.
* Only like items together – Only multiple quantity of the same item will be placed in one package together. 2 of Item A and 2 of Item B will result in 2 packages.
* Each piece separately – Each item in the cart, including multiple quantities, will be separated into individual packages.

Be careful about altering the existing keys in this array. You can change the labels, and add elements to this array, but changing the keys may affect functionality in shipping modules.

Example

// register filter callback
add_filter('shopp_packaging_types', 'shopp_packaging_types_fltr');

// create filter function
function shopp_packaging_types_fltr( $types ) {
    // the default types
    $types = array( "mass" => __("All together by weight","Shopp"),
                "all" => __("All together with dimensions","Shopp"),
                "like" => __("Only like items together","Shopp"),
                "piece" => __("Each piece separately","Shopp")
                );
    return $types;
}

See Also

You must be logged in to post a comment.

© Ingenesis Limited. Shopp™ is a registered trademark of Ingenesis Limited.

Skip to toolbar