/* This macro will be parsed as PHP code (see http://www.php.net) The calculateshipping function is called every time a shipping calculation request is made by Shopify. The function must return an array of available shipping options, otherwise no shipping options will be returned to your customers. */ function calculateshipping($DATA) { /* do not edit above this line */ $_RATES = array(); $collectionid = 1234567890; //where 1234567890 is the colelction id (see user guide for more information) $isProductInCollection = false; foreach ($DATA['items'] as $item) { if (incollection($collectionid,$item)) { $isProductInCollection = true; } } return $_RATES; /* do not edit below this line */ }