shopp_product_set_shipping()

turn on/off shipping charges on product with no variations

shopp_product_set_shipping ( $product, $flag, $settings )

@param int $product (required) The Product id to turn setup the shipping settings on.
@param bool $flag (optional default:false) true for on, false for off. Turns on or off the shipping charges on the product.  If false, settings are ignored.
@param array $settings array of shipping dimensions (weight => float, height => float, length => float, width => float)
@return bool true on success, false on failure

Description

turn on/off shipping charges on product with no variations

This function uses shopp_product_variant_set_shipping().

Example

// create setting array
// units are setup in your shipping settings in the Admin
$ship_settings = array(
    'weight' => 16.5,
    'width' => 10,
    'length' => 10,
    'height' => 7.5
);

// enable shipping costs on single/non-variant
// product and set weight/dimension
shopp_product_set_shipping ( 23, true, $ship_settings );

See Also

You must be logged in to post a comment.

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

Skip to toolbar