New Zenner
- Join Date:
- Dec 2006
- Location:
- france
- Posts:
- 3
- Plugin Contributions:
- 0
Views: 809
New Zenner
New Zenner
Hello to all the team
User of zencart for 4 years, I look for a contribution which allows to replace the figures of the prices(prizes) by images, as the attached example. Attachment #7059
I found nothing in the contributions(taxes) of the community.
I have nevertheless the beginning of solution with this but adapted for oscommerce by the user 'audioshop'
You Have an idea to adapt him(it) in zencart.
Thank you in advance.
Excuse I from my English but this is a translation! :smile:
In 'general.php' of Osc
//convertit Chiffre en images
function number_replace($str){
$str = preg_replace('#[,]#','<img src="images/prix/virgule.png">', $str);
$str = preg_replace('#(&\#8364;|€)#','<img src="images/prix/euro.jpg">', $str);
$str = preg_replace('#([0-9])#','<img src="images/prix/$1.png">', $str);
return $str;
}
```And '**product_info.php**'
```php
if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
$products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
} else {
$products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
}
```**By**
```php
if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
$products_price = '<s>' . number_replace($currencies->display_price($product_info['products_price']), tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . number_replace($currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id']))) . '</span>';
} else {
$products_price = number_replace($currencies->display_price($product_info['products_price']), tep_get_tax_rate($product_info['products_tax_class_id']));
}
Black Belt
First, change all tep_ to zen_ .
Then. if you need more help, look in the tutorials and the wiki for articles on "port osC mod to Zen Cart".
Tell staff why this post should be reviewed.