Jump to content
xt:Commerce Community Forum

Sonderangebote / Darstellung


hwlp

Recommended Posts

servus leutz...

hab ein problem...denke jedoch, da? ihr mir helfen k?nnt ;-)

also...habe testweise die xtc version 2.0 installiert (bald sponsor). soweit alles gut...wenn ich allersings sonderangebote setze ist der neue preis schwarz und der alte preis rot und durchgestrichen.

frage: wie kann ich es so einstellen, sodass der angebotspreis rot ist und der alte preis durchgestrichen ist und die farbe schwarz hat, so wie das eigentlich auch sein sollte?

schon mal vielen dank im voraus.

Link to comment
Share on other sites

in der v3 ist es in der /includes/classes/xtcPrice.php definiert

 function xtcFormatSpecialDiscount($discount,$pPrice,$format) {

  $sPrice = $pPrice-($pPrice / 100)*$discount;

  if ($format) {

  return '<font size="-1" color="#ff0000">Statt <s>'

        .$this->xtcFormat($pPrice,$format).

        '</s></font><br>'.ONLY

        .$this->xtcFormat($sPrice,$format).

        '<br><font size="-1">'.YOU_SAVE

        .$discount.

        '%';

  } else {

  return $sPrice;

  }

in der v2 heisst die funktion glaub ich anders, musst in dem verzeichnis mal suchen, da gibts dann bestimmt so einen ?hnlichen codeabschnitt drin.

Link to comment
Share on other sites

danke f?r deine antwort....

bin jedoch nicht f?ndig geworden.

die einzigen dateien, die ich gefunden hab sind diese hier:

xtc_get_products_special_price.inc.php

xtc_get_products_special_price.inc.php

xtc_format_special_price.inc.php

hat jemand noch ne andere idee?

:grml:

Link to comment
Share on other sites

ich nehme an, da? es das hier ist:

xtc_get_products_special_price.inc.php

<?php

/* -----------------------------------------------------------------------------------------

$Id: xtc_format_special_price.inc.php,v 1.1 2003/09/06 21:47:50 fanta2k Exp $

XT-Commerce - community made shopping

http://www.xt-commerce.com

Copyright © 2003 XT-Commerce

-----------------------------------------------------------------------------------------

by Mario Zanier for XTcommerce

based on:

© 2003 nextcommerce (xtc_format_special_price.inc.php,v 1.6 2003/08/20); www.nextcommerce.org

Released under the GNU General Public License

---------------------------------------------------------------------------------------*/

function xtc_format_special_price ($special_price,$price,$price_special,$calculate_currencies,$quantity,$products_tax)

{

// calculate currencies

$currencies_query = xtc_db_query("SELECT symbol_left,

symbol_right,

decimal_places,

decimal_point,

thousands_point,

value

FROM ". TABLE_CURRENCIES ." WHERE

code = '".$_SESSION['currency'] ."'");

$currencies_value=xtc_db_fetch_array($currencies_query);

$currencies_data=array();

$currencies_data=array(

'SYMBOL_LEFT'=>$currencies_value['symbol_left'] ,

'SYMBOL_RIGHT'=>$currencies_value['symbol_right'] ,

'DECIMAL_PLACES'=>$currencies_value['decimal_places'],

'DEC_POINT'=>$currencies_value['decimal_point'],

'THD_POINT'=>$currencies_value['thousands_point'],

'VALUE'=> $currencies_value['value']) ;

if ($_SESSION['customers_status']['customers_status_show_price_tax'] =='0') {

$products_tax='';

}

//$special_price= (xtc_add_tax($special_price,$products_tax))*$quantity;

//$price= (xtc_add_tax($price,$products_tax))*$quantity;

$price=$price*$quantity;

$special_price=$special_price*$quantity;

if ($calculate_currencies=='true') {

$special_price=$special_price * $currencies_data['VALUE'];

$price=$price * $currencies_data['VALUE'];

}

// round price

$special_price=xtc_precision($special_price,$currencies_data['DECIMAL_PLACES'] );

$price=xtc_precision($price,$currencies_data['DECIMAL_PLACES'] );

if ($price_special=='1') {

$price=number_format($price,$currencies_data['DECIMAL_PLACES'], $currencies_data['DEC_POINT'], $currencies_data['THD_POINT']);

$special_price=number_format($special_price,$currencies_data['DECIMAL_PLACES'], $currencies_data['DEC_POINT'], $currencies_data['THD_POINT']);

$special_price ='<font color="ff0000"><s>'. $currencies_data['SYMBOL_LEFT'].' '.$price.' '.$currencies_data['SYMBOL_RIGHT'].' </s></font>'. $currencies_data['SYMBOL_LEFT']. ' '.$special_price.' '.$currencies_data['SYMBOL_RIGHT'];

}

return $special_price;

}

?>

wo mu? "was" ge?ndert werden.

komme leider nich weid?!

Link to comment
Share on other sites

leider komme ich mit meinem vorhaben nicht mehr weiter:

if ($price_special=='1') {

$price=number_format($price,$currencies_data['DECIMAL_PLACES'], $currencies_data['DEC_POINT'], $currencies_data['THD_POINT']);

$special_price=number_format($special_price,$currencies_data['DECIMAL_PLACES'], $currencies_data['DEC_POINT'], $currencies_data['THD_POINT']);

$special_price ='<font color="000000"><s>'. $currencies_data['SYMBOL_LEFT'].' '.$price.' '.$currencies_data['SYMBOL_RIGHT'].' </s></font>'. $currencies_data['SYMBOL_LEFT']. ' '.$special_price.' '.$currencies_data['SYMBOL_RIGHT'];

}

return $special_price;

}

?>

:grml:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...