Does magento 2 is having something inbuilt function for currency symbol getting ?
What I want is - Input will be 3 characters currency code as USD, INR, JPY, EUR etc. corresponsing to that output should be $ , ₹ , ¥ etc...
All the solutions are appreciated even if its inbuilt in magento 2 or custom function or some API.
Edit - Code Added
At the position echo $ocd;
it gives me USD after that I need to print $, it may give Euro then I need to echo € and so on..
$detail_query_1="SELECT a.quote_id,a.entity_id,a.state,a.status,a.coupon_code,a.shipping_description,a.order_currency_code,a.discount_amount,a.customer_id,a.base_discount_amount,a.base_grand_total,a.base_shipping_amount,DATE_FORMAT(a.created_at,'%d-%m-%Y') AS order_date,a.total_item_count,b.increment_id FROM rpt_sales_order AS a JOIN rpt_sales_order_grid AS b ON a.entity_id=b.entity_id WHERE 1 AND b.increment_id='$ids'";
//echo $detail_query_1;//exit;
$sql_detail_1=mysqli_query($con,$detail_query_1) or die(mysqli_error($con));
if(@mysqli_num_rows($sql_detail_1))
{
$cnt1=@mysqli_num_rows($sql_detail_1);
while($rt_details_1=mysqli_fetch_array($sql_detail_1,MYSQLI_ASSOC))
{
#print_r($rt_details);exit;
$ordDt=$rt_details_1['order_date'];
$shpDesc=$rt_details_1['shipping_description'];
$ocd= $rt_details_1['order_currency_code'];
echo $ocd;
$discount_amount= $rt_details_1['discount_amount'];
}
echo '<h3 class="shipping-method">Shipping Method: '.$shpDesc.'</h3>';
}
Thanks
Vibhore