Ejemplo n.º 1
0
 function get_weight($pid)
 {
     global $vendor_country_2_code;
     if (empty($GLOBALS['product_info'][$pid]['weight'])) {
         if ($vendor_country_2_code == "US" || $vendor_country_2_code == "PR" || $vendor_country_2_code == "DO") {
             defined('WEIGHT_UOM') or define('WEIGHT_UOM', "LB");
             $GLOBALS['product_info'][$pid]['weight'] = ps_shipping_method::get_weight_LB($pid);
             return $GLOBALS['product_info'][$pid]['weight'];
         } else {
             defined('WEIGHT_UOM') or define('WEIGHT_UOM', "KG");
             $GLOBALS['product_info'][$pid]['weight'] = ps_shipping_method::get_weight_KG($pid);
             return $GLOBALS['product_info'][$pid]['weight'];
         }
     } else {
         return $GLOBALS['product_info'][$pid]['weight'];
     }
 }