settings = $settings;
$this->feedLangId = (int)Configuration::get('PS_LANG_DEFAULT');
return $this->generateXml($this->getCustomers());
}
protected function generateXml($customers)
{
$xml = '';
if (empty($customers)) {
return '';
}
foreach ($customers as $b) {
$xml .= '- ';
$xml .= '';
$xml .= '';
$xml .= '';
$xml .= '';
$xml .= '';
$xml .= '';
$xml .= '';
$xml .= '';
$xml .= '';
$xml .= '';
$xml .= '';
$xml .= '';
$xml .= '';
$xml .= '';
$xml .= '
';
}
$xml .= '';
return $xml;
}
protected function getCustomers()
{
return Db::getInstance()->ExecuteS('
SELECT c.*, gl.name AS social_title
FROM '._DB_PREFIX_.'customer c
LEFT JOIN '._DB_PREFIX_.'gender_lang gl ON
(c.id_gender = gl.id_gender AND gl.id_lang = "'.(int)$this->feedLangId.'")
WHERE c.`deleted` = 0
ORDER BY c.date_add DESC
');
}
}