/** * Get total amount of each items in cart. * @param $item * @param $key * @return mixed * * @update 1.1.3 */ static function get_item_total($item, $key) { $data = $item['data']; $post_type = get_post_type($key); switch ($post_type) { case "st_hotel": $return = self::get_hotel_price($data, $item['price'], $item['data']['room_num_search']); break; case "st_rental": $return = self::get_hotel_price($data, $item['price'], 1); break; case "st_cars": $return = STCars::get_cart_item_total($key, $item); break; case "st_tours": $return = STTour::get_cart_item_total($key, $item); break; case "st_holidays": $return = STHoliday::get_cart_item_total($key, $item); break; case "st_activity": $return = STActivity::get_cart_item_total($key, $item); //return $item['price']; break; } return $return; }
/** * Get total amount of each items in cart. * @param $item * @param $key * @return mixed * * @update 1.1.3 */ static function get_item_total($item, $key) { $data = $item['data']; $post_type = get_post_type($key); switch ($post_type) { case "st_hotel": return $item['price'] * 1; break; case "st_rental": return self::get_hotel_price($data, $item['price'], 1); break; case "st_cars": return STCars::get_cart_item_total($key, $item); break; case "st_tours": return STTour::get_cart_item_total($key, $item); break; case "st_activity": return STActivity::get_cart_item_total($key, $item); //return $item['price']; break; } }