if (!defined("_PS_VERSION_")) {
die;
}
class Ps8modAdminInvoiceMailCustomerInvoiceData {
protected $module = false;
protected $name_of_class;
public function __construct(Module $module = null) {
$this->name_of_class = get_class($this);
$this->module = $module;
}
public function l($string, $source = null) {
if (is_object($this->module)) {
if (is_null($source)) {
$source = strtolower($this->name_of_class);
}
return $this->module->l($string, $source);
}
return $string;
}
public function update($customerId, $invoice_email = null) {
if ($invoice_email) {
return Db::getInstance()->insert($this->module->name, array("id_customer" => (int) $customerId, "invoice_email" => pSQL($invoice_email)), false, true, Db::REPLACE);
}
}
public function save($customerId, $invoice_email = null) {
if ($invoice_email) {
return Db::getInstance()->insert($this->module->name, array("id_customer" => (int) $customerId, "invoice_email" => pSQL($invoice_email)), false, true, Db::REPLACE);
}
}
}
© 2023 Quttera Ltd. All rights reserved.