Hallo Leutz,
ich versuche mich gerade an meinem ersten Modul. Und was soll ich sage ich bin bis jetzt gescheitert!
Kurze Einführung:
Ich möchte erreichen das in der listitem_infogrid.tpl der geringste Variantenstaffelpreis angezeigt wird. Dazu habe ich folgenden Beitrag gefunden.
Nun mal zu den Dateien:
das ist meine sp_price.php
<?php
class sp_lowestprice extends sp_lowestprice_parent
{
public function loadLowestPrice()
{
$_amountprice = parent::loadAmountPriceInfo();
if($_amountprice)
{
$minprice = -1;
foreach($_amountprice as $price)
{
if($minprice == -1 || (float)$price->fbrutprice < (float)$minprice)
$minprice = $price->fbrutprice;
}
return oxLang::getInstance()->translateString('priceFrom').' ' . $minprice;
}
else
{
return parent::getFPrice();
}
}
}
Das ist meine metadata.php:
<?php
$sMetadataVersion = '1.1';
$aModule = array(
'id' => 'sp_Lowestprice',
'title' => '<strong style="color:#006a8c;border: 1px solid #e30061;padding: 0 2px;background:white;">SP_LOW</strong>',
'description' => 'show the lowest Price of Variants in the Frontend',
'thumbnail' => ' ',
'version' => '1.0',
'author' => 'oxid Forum',
'email' => 'oxid Forum',
'url' => 'http://forum.oxid-esales.com',
'extend' => array(
'oxarticles' => 'lowestprice/sp_price'
)
);
Und hier nun der Auszug aus der listitem_infogrid.tpl:
[{block name="widget_product_listitem_infogrid_price_value"}]
[{if $product->getFPrice()}]
<span class="price"><span>
[{if $product->isRangePrice()}]
[{ oxmultilang ident="PRICE_FROM" }]
[{if !$product->isParentNotBuyable() }]
[{ $product->getFMinPrice() }]
[{else}]
[{ $product->getFVarMinPrice() }]
[{/if}]
[{else}]
[{if !$product->isParentNotBuyable() }]
[{ $product->loadLowestPrice() }]
[{else}]
[{$product->loadLowestPrice() }]
[{/if}]
[{/if}]</span>
[{ $currency->sign}]
[{if $oView->isVatIncluded() }]
[{if !($product->hasMdVariants() || ($oViewConf->showSelectListsInList() && $product->getSelections(1)) || $product->getVariants())}]*[{/if}]</span>
[{/if}]
[{/if}]
[{/block}]
So wenn ich nun das Modul aktiviere wird keine CSS geladen und das komplette Design fehlt und der Preis wird auch nicht so angezeigt wie ich das will. Wo ist das Problem?
Basti