Skip to content

Commit

Permalink
Var symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
tohaaa committed Oct 8, 2020
1 parent 88f7904 commit 9b1a7d4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Requires at least: 5.0.0
Tested up to: 5.3.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Version: 1.4.11
Version: 1.4.12


== Description ==
Expand Down
2 changes: 1 addition & 1 deletion beedirect.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin name: BeeDirect by Omnibees
Plugin uri: widgets.omnibees.com/manual
Description: Widgets to BeeDirect
Version: 1.4.11
Version: 1.4.12
Author: Omnibees
Author uri: www.omnibees.com
License: GPlv2 or Later
Expand Down
13 changes: 7 additions & 6 deletions widgets/price/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ protected function render(){

<?php
$beeCurrency = $settings['currency'];
var symbol = '<?php echo $beeCurrency ;?>';
/*
function getCurrencySymbol($beeCurrency){
switch ($beeCurrency) :
Expand Down Expand Up @@ -231,22 +232,22 @@ function start_price(){
bestPriceApi += "<span class='best-price-since'><?php echo $settings['title'] ?> </span>";
//bestPriceApi += "<span class='best-price-value'> <?php /* echo getCurrencySymbol($beeCurrency) */ ?> " + parseFloat(Math.round(bestPrice * 100) / 100).toFixed(2) + "</span>";

if ($beeCurrency == 16){
if (symbol == 16){
bestPriceApi += "<span class='best-price-value'>R$ " + parseFloat(Math.round(bestPrice * 100) / 100).toFixed(2) + "</span>";
}
if ($beeCurrency == 23){
if (symbol == 23){
bestPriceApi += "<span class='best-price-value'>$ " + parseFloat(Math.round(bestPrice * 100) / 100).toFixed(2) + "</span>";
}
if ($beeCurrency == 34){
if (symbol == 34){
bestPriceApi += "<span class='best-price-value'>€ " + parseFloat(Math.round(bestPrice * 100) / 100).toFixed(2) + "</span>";
}
if ($beeCurrency == 66){
if (symbol == 66){
bestPriceApi += "<span class='best-price-value'>$ " + parseFloat(Math.round(bestPrice * 100) / 100).toFixed(2) + "</span>";
}
if ($beeCurrency == 108){
if (symbol == 108){
bestPriceApi += "<span class='best-price-value'>£ " + parseFloat(Math.round(bestPrice * 100) / 100).toFixed(2) + "</span>";
}
if ($beeCurrency == 109){
if (symbol == 109){
bestPriceApi += "<span class='best-price-value'>$ " + parseFloat(Math.round(bestPrice * 100) / 100).toFixed(2) + "</span>";
}

Expand Down

0 comments on commit 9b1a7d4

Please sign in to comment.