The plugin shows one more or many more prices for each product in Webasyst Shop-Script
Shows as many prices as id currencies you specify to him. Displays prices according to the pattern and formatting of your currency from the admin panel and each price has its own style class (.cena1, .cena2 .......) Installing the plugin:
The file function.cena.php is placed in the / kernel / includes / smarty / plugins folder <?php function smarty_function_cena( $params, &$smarty ) { $disp=''; $sql='SELECT Price FROM SC_products WHERE productID="'.$params['pid'].'"'; if($r=mysql_query($sql)){ $res=mysql_fetch_assoc($r); $price=$res['Price']; } $curr=explode(',',$params['curr']); $a=1; foreach ($curr as $d){ $sql='SELECT * FROM SC_currency_types WHERE CID="'.$d.'"'; if($r=mysql_query($sql)){ $res=mysql_fetch_assoc($r); $curs=$res['currency_value']; $nprice=round($curs*$price,2); if($res['thousands_delimiter']=='_') $res['thousands_delimiter']=' '; $nprice=number_format($nprice,$res['decimal_places'],$res['decimal_symbol'],$res['thousands_delimiter']); $nprice=str_replace('{value}',$nprice,$res['display_template_ru']); $disp.=''.$nprice.''; } $a++; } return $disp; } ?>
in the / published / SC / html / scripts / templates / frontend folder in the file product_brief.html (product card on the category page) where you want to display prices, for example, inside a block <div class = ”prdbrief_price”> call the plugin {cena pid = `$ product_info.productID` curr = '9,7 ′} where pid is the product ID, curr is a comma-separated list of currency ids.
in the product_list.html file (these are product listings) {cena pid = `$ _product.productID` curr = '9,7 ′}
in the product_price.html file (output price on the product page) {cena pid = `$ product_info.productID` curr = '9,7 ′}