Create a new file in:
/admin/includes/functions/extra_functions
call it something like:
always_free_shipping_functions.php
and add the code:
Code:
<?php
////
// Sets the status of a product
function zen_set_product_is_always_free_shipping($products_id, $always_free_shipping_status) {
global $db;
if ($always_free_shipping_status == '1') {
return $db->Execute("update " . TABLE_PRODUCTS . "
set product_is_always_free_shipping = 1, products_last_modified = now()
where products_id = '" . (int)$products_id . "'");
} elseif ($always_free_shipping_status == '0') {
return $db->Execute("update " . TABLE_PRODUCTS . "
set product_is_always_free_shipping = 0, products_last_modified = now()
where products_id = '" . (int)$products_id . "'");
} else {
return -1;
}
}
Bookmarks