soup
1
moin,
In mein page/details/inc/productmain.tpl hab ich folgendes, das die preis ausschmeist
$oDetailsProduct->getFPrice()
das is die preis mit mein Rabatt schön eingerechnett (5% auf alles)
Wie kann ich die ürsprungspreis anziegen dH. ohne Rabatt ?
…ich will die orginal preis ziegen - durchsteichen, und dann die aktuellen preis zeigen
danke im voraus
Versuch es mal mit:
[{$oDetailsProduct->oxarticles__oxprice->value}]
soup
3
danke
wenn es jemand hilft, hier ist ein hack aus productmain.tpl das zeigt, ein durchgestrichen original preis, und wie viel wird gesparrt
<?php
$prod = $this->get_template_vars('oDetailsProduct');
$nondiscountprice = $prod->oxarticles__oxprice->value;
$newtest = $this->get_template_vars('fPrice');
$newdiscountpricetmp = str_replace(".", "", $newtest);
$newdiscountprice = str_replace(",", ".", $newdiscountpricetmp);
$savedprice = $nondiscountprice - $newdiscountprice;
$savedprice =number_format($savedprice, 2, '.', ',');
?>
<strong itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<span itemprop="price">[{$fPrice}]</span>
<span itemprop="priceCurrency" style="display:none">EUR</span>
<span>[{ $currency->sign}]</span>
</strong>
<span>*</span>
<del><span style='color: #737373;font-size:1.3rem;'>[{$oDetailsProduct->oxarticles__oxprice->value|number_format:2:",":"."}] [{ $currency->sign}]</span></del>
<div class="smstarttext">* Inkl. 5% Online-Rabatt.[{if $hasVariations ne true}] Sie sparen <?php echo $savedprice;?> € [{/if}]· zzgl. 19 % USt.</div>
Oh oh oh… PHP in Templates. You like the dirty way, hmm? 