dietodeskralle Posted December 10, 2013 Report Share 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. Link to comment Share on other sites More sharing options...
Jobsti Posted April 17, 2016 Report Share 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? Link to comment Share on other sites More sharing options...
EigenArt Posted April 19, 2016 Report Share 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... Link to comment Share on other sites More sharing options...
Jobsti Posted April 26, 2016 Report Share Posted April 26, 2016 Ganz dicken Daumen nach oben. Vielen Dank! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.