How to set Product price for india in rupees and out of india in dollar? : <p>I developing ecommerce website. Almost i have done. But i have one problem in show product price in dollar. If user open website in india shows product price in rupees and if website access in out of country shows product price in dollar.</p>

<p>I created product detail page and below provide my code: </p>

<pre><code>public function getProductDetail($pro_code,$error_msg){
$showProDetail='';
$result =$this-&gt;connect()-&gt;query("SELECT * FROM wm_products WHERE pro_code='$pro_code'");
if($result-&gt;num_rows&gt;0){            
    $row = $result-&gt;fetch_assoc();
    $cate_id = $row['cate_id'];         
    $image = json_decode($row['pro_img']);
    $showProDetail.='
    &lt;div class="page product_detail_wrapper"&gt;
        &lt;div class="panel-body"&gt;
            &lt;div class="row"&gt;
                &lt;div class="col-lg-4 col-mg-4 col-sm-4 col-xs-12"&gt;
                    &lt;figure class="thumbnail"&gt;
                        &lt;img src="../uploads/product_images/' .$image[0].'" alt=""&gt;
                    &lt;/figure&gt;
                &lt;/div&gt;
                &lt;div class="col-lg-8 col-mg-8 col-sm-8 col-xs-12"&gt;
                    &lt;div class="responsive-table"&gt;
                        &lt;table class="table table-striped"&gt;                             
                            &lt;tr&gt;
                                &lt;td&gt;&lt;strong&gt;Product Code&lt;/strong&gt;&lt;/td&gt;
                                &lt;td&gt;:'.$row["pro_code"].'&lt;/td&gt;
                            &lt;/tr&gt;
                            &lt;tr&gt;
                                &lt;td&gt;&lt;strong&gt;Name&lt;/strong&gt;&lt;/td&gt;
                                &lt;td&gt;:'.ucfirst(str_replace("_", " ", $row["pro_name"])).'&lt;/td&gt;
                            &lt;/tr&gt;                   
                            &lt;tr&gt;
                                &lt;td&gt;&lt;strong&gt;Price&lt;/strong&gt;&lt;/td&gt;
                                &lt;td&gt;: Rs.'.$row["pro_price"].'&lt;/td&gt;
                            &lt;/tr&gt;
                            &lt;tr&gt;
                                &lt;td&gt;&lt;strong&gt;Discount&lt;/strong&gt;&lt;/td&gt;
                                &lt;td&gt;:'.$row["pro_discount"].'&lt;/td&gt;
                            &lt;/tr&gt;
                            &lt;tr&gt;
                                &lt;td&gt;&lt;strong&gt;Available In&lt;/strong&gt;&lt;/td&gt;
                                &lt;td&gt;:'.$row["pro_weight"].'&lt;/td&gt;
                            &lt;/tr&gt;
                            &lt;tr&gt;
                                &lt;td&gt;&lt;strong&gt;Quantity&lt;/strong&gt;&lt;/td&gt;
                                &lt;td&gt;:'.$row["pro_quantity"].'&lt;/td&gt;
                            &lt;/tr&gt;
                            &lt;tr&gt;
                                &lt;td&gt;&lt;strong&gt;Short Description&lt;/strong&gt;&lt;/td&gt;
                                &lt;td&gt;:'.$row["short_disc"].'&lt;/td&gt;
                            &lt;/tr&gt;                                   
                        &lt;/table&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;&lt;br&gt;              
        &lt;/div&gt;
    &lt;/div&gt;';
}
else{
    $showProDetail = '&lt;div class="alert alert-danger"&gt;Product Detail Not Found&lt;/div&gt;';
}
return  $showProDetail;
}
</code></pre>

<p>So, How to set Product price for india in rupees and out of india in dollar?</p>
