0){ $product_sql = "SELECT * FROM ".$wpdb->prefix."product_list WHERE id = ".$product_id." LIMIT 1"; $product = $wpdb->get_row($product_sql, ARRAY_A); $tax_percentage = 0; $country_data = $wpdb->get_row("SELECT * FROM `".$wpdb->prefix."currency_list` WHERE `isocode` IN('".get_option('base_country')."') LIMIT 1",ARRAY_A); if(($country_data['has_regions'] == 1)) { $region_data = $wpdb->get_row("SELECT `".$wpdb->prefix."region_tax`.* FROM `".$wpdb->prefix."region_tax` WHERE `".$wpdb->prefix."region_tax`.`country_id` IN('".$country_data['id']."') AND `".$wpdb->prefix."region_tax`.`id` IN('".get_option('base_region')."') ",ARRAY_A) ; $tax_percentage = $region_data['tax']; } if($product['special']==1) { $price = $product['price'] - $product['special_price']; } $price += $tax_percentage; $output .= "
\n\r"; } } if($replaced_shortcode == true) { return $output; } else { echo $output; } } ?>