Forums / All Other Contributions/Addons / Replaced Price(Prize,Prices,Prizes) by images

Replaced Price(Prize,Prices,Prizes) by images

Locked

Views: 809

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
12 Feb 2010, 2:37 PM
#1
frenchy avatar

frenchy

New Zenner

Join Date:
Dec 2006
Location:
france
Posts:
3
Plugin Contributions:
0

Replaced Price(Prize,Prices,Prizes) by images

Oupssss

12 Feb 2010, 2:39 PM
#2
frenchy avatar

frenchy

New Zenner

Join Date:
Dec 2006
Location:
france
Posts:
3
Plugin Contributions:
0

Re: Replaced Price(Prize,Prices,Prizes) by images

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'])); 
    }
12 Feb 2010, 4:19 PM
#3
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Replaced Price(Prize,Prices,Prizes) by images

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".