addition of statement for preheader and title if its tomorrow news

This commit is contained in:
Marion Muszynski 2017-04-27 10:55:06 +02:00
parent 0a3c45ef95
commit 25cffa3a74

View File

@ -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);