From 25cffa3a74fc2320487ca9cf3e948ccae0acd32d Mon Sep 17 00:00:00 2001 From: Marion Muszynski Date: Thu, 27 Apr 2017 10:55:06 +0200 Subject: [PATCH] addition of statement for preheader and title if its tomorrow news --- modules/emarsys_rss/flux.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/emarsys_rss/flux.php b/modules/emarsys_rss/flux.php index 41f347a2..0b8e632e 100755 --- a/modules/emarsys_rss/flux.php +++ b/modules/emarsys_rss/flux.php @@ -96,7 +96,7 @@ class Catalog $sale->description[(int) $id_lang] = $desc->get_text(); } - $this->setXml($sales_today, $sales_last_day, $sale_current, false, $version); + $this->setXml($sales_today, $sales_last_day, $sale_current, false, $version, $test_for_tomorrow); } @@ -108,7 +108,7 @@ class Catalog echo 'Fichier généré'; } - public function setXml($sales_today, $sales_last_day, $sale_current, $rss=false, $version) + public function setXml($sales_today, $sales_last_day, $sale_current, $rss=false, $version, $tomorrow=false) { $id_lang = (int) $this->versions[$version]; @@ -146,7 +146,7 @@ class Catalog $sql_title = ' SELECT `title`, `preheader` FROM `ps_privatesale_newsletter` - WHERE `date_pub` = CURDATE() + WHERE `date_pub` = '.($tomorrow?'CURDATE() + INTERVAL 1 day':'CURDATE()').' AND `version` = "'.$version.'"' ; $info_newsletter = Db::getInstance()->getRow($sql_title);