dietodeskralle 10 Report post Posted December 10, 2013 Hallo zusammen, gibt es eine Möglichkeit per Smarty das Anfangs- und Enddatum des Sonderpreises beim Artikel (product.html) auszugeben? Sonst müsste ich was mit PHP basteln. Quote Share this post Link to post Share on other sites
Jobsti 0 Report post Posted April 17, 2016 Daran bin ich auch gerade, hab's bisher so gelöst: Hook:global $db; $rs = $db->Execute("SELECT date_expired, status FROM ".TABLE_PRODUCTS_PRICE_SPECIAL." WHERE products_id = '".$this->data['products_id']."'"); $this->data['date_expired'] = $rs->fields['date_expired']; $this->data['date_status'] = $rs->fields['status']; Im Product-Template: {if $date_status == 1} <span class="product-infos"><b>{txt key=TEXT_ANGEBOT}:</b> {$date_expired}<br></span> {/if} Jetzt habe ich nur noch das Problem, dass das Datum so formatiert ist wie in der DB, also z.B. 2016-04-30 00:00:00Hat da wer ne Lösung für mich? Quote Share this post Link to post Share on other sites
EigenArt 16 Report post Posted April 19, 2016 On 17.4.2016 at 0:31 AM, Jobsti said: Im Product-Template: {if $date_status == 1} <span class="product-infos"><b>{txt key=TEXT_ANGEBOT}:</b> {$date_expired}<br></span> {/if} Hallo, {$date_expired|date_format:"%d.%m.%Y"} sollte eigentlich gehen... 1 Jobsti reacted to this Quote Share this post Link to post Share on other sites
Jobsti 0 Report post Posted April 26, 2016 Ganz dicken Daumen nach oben. Vielen Dank! Quote Share this post Link to post Share on other sites