#1 (permalink)  
Alt 27.08.2009, 15:04
Neuer Benutzer
 
Registriert seit: 08.05.2007
Beiträge: 24
Standard Modul Preis als Grafik -> Sonderangebote

Moin Jungs,
hab das Modul Preis als Grafik bei mir "installiert".
Nun folgende Frage:
Wie kann ich das hinkiegen, dass bei Sonderangeboten
das Statt XX,XX€ wieder durchgestrichen angezeigt wird und nur das
Jetzt XX,XX€ als Grafik angezeigt wird?

Jemand eine Idee? Also es muss wohl was an der "get_price_image.php" geändert werden. Soviel konnte ich schon googeln *g*

Johnny
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #2 (permalink)  
Alt 27.08.2009, 15:05
Neuer Benutzer
 
Registriert seit: 08.05.2007
Beiträge: 24
Standard

So sieht meine get_price_image.php aus



<?php
/*
Gibt einen Preis als Grafik aus
Copyright(C) 2006 Sergej Stroh und Walter Lutz.

http://www.*************************...***********.de
21.10.2006
*/

function getPriceImage($price, $cur_sym_right = '')
{
$price_string_pre = '';
$price_string_suf = '';
$specials = false;

if (strstr ($price, INSTEAD))
{
$split_price = split (INSTEAD, $price);
$new_price = split (ONLY, $split_price[1]);
$price = $new_price[0];
$currency = split (' ', $new_price[1]);
$cur_sym_right = end($currency);
$price_string_pre = INSTEAD;
$specials = true;
}
else if (strstr ($price, FROM))
{
$price_string_pre = FROM;
}

// Zahlen als Grafiken, bei Bedarf anpassen
$images = array('<img src="templates/'.CURRENT_TEMPLATE.'/img/0.gif" alt="0" />',
'<img src="templates/'.CURRENT_TEMPLATE.'/img/1.gif" alt="1" />',
'<img src="templates/'.CURRENT_TEMPLATE.'/img/2.gif" alt="2" />',
'<img src="templates/'.CURRENT_TEMPLATE.'/img/3.gif" alt="3" />',
'<img src="templates/'.CURRENT_TEMPLATE.'/img/4.gif" alt="4" />',
'<img src="templates/'.CURRENT_TEMPLATE.'/img/5.gif" alt="5" />',
'<img src="templates/'.CURRENT_TEMPLATE.'/img/6.gif" alt="6" />',
'<img src="templates/'.CURRENT_TEMPLATE.'/img/7.gif" alt="7" />',
'<img src="templates/'.CURRENT_TEMPLATE.'/img/8.gif" alt="8" />',
'<img src="templates/'.CURRENT_TEMPLATE.'/img/9.gif" alt="9" />');

$image_comma = '<img src="templates/'.CURRENT_TEMPLATE.'/img/komma.gif" alt="komma" />';
$currency = '<img src="templates/'.CURRENT_TEMPLATE.'/img/' . strtolower($cur_sym_right) . '.gif" alt="curr" />';
$number = array("0","1","2","3","4","5","6","7","8","9");

if(is_string($price)){ //is_numeric

$strlen_price = strlen($price) - 1;
$count_number_array = count ($number);

for ($i = 0; $i < $strlen_price; $i++)
{

if ($price{$i} == ',')
$price_string_suf .= $image_comma;
for ($y = 0; $y < $count_number_array; $y++)
{
if ($price{$i} == $number[$y])
$price_string_suf .= $images[$y];
}
}
$price_string_suf .= $currency;
$price_string = $price_string_pre . $price_string_suf;
}

if ($specials)
{
$price_string_suf = '';
$price = $new_price[1];
if(is_string($price))
{ //is_numeric
$strlen_price = strlen($price) - 1;
$count_number_array = count ($number);
$price_string_pre = ' <br /> ' . ONLY;
if (strstr ($price, FROM))
$price_string_pre .= ' ' . FROM;

for ($i = 0; $i < $strlen_price; $i++)
{
if ($price{$i} == ',')
$price_string_suf .= $image_comma;
for ($y = 0; $y < $count_number_array; $y++)
{
if ($price{$i} == $number[$y])
$price_string_suf .= $images[$y];
}
}
$price_string_suf .= $currency;
$price_string .= $price_string_pre . $price_string_suf;
}
}

return $price_string;
}

?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
  #3 (permalink)  
Alt 01.09.2009, 23:42
Erfahrener Benutzer
 
Registriert seit: 24.05.2007
Beiträge: 154
Standard

Hi,

frage doch Sergej oder Janna von So...dge. Sie müssten das eigenlich wissen als Entwickler des Moduls.

Gruß Rene
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!
Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
grafik, modul, preis, sonderangebote

Themen-Optionen
Ansicht

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are aus
Pingbacks are aus
Refbacks are aus



Alle Zeitangaben in WEZ +1. Es ist jetzt 05:38 Uhr.

Copyright © 2011 xt:Commerce GmbH / xt:Commerce International Ltd. - All Rights Reserved

xt:Commerce is a SafeCharge brand