61ed06dc22
This reverts commit 38a13c74d6e654a40632251017e8e60e1bc709d3.
29 lines
846 B
PHP
29 lines
846 B
PHP
<?php
|
|
class Customer extends CustomerCore
|
|
{
|
|
public function printVersion($value, $params)
|
|
{
|
|
$versions = array(
|
|
'en' => 1,
|
|
'fr' => 2,
|
|
'es' => 3,
|
|
'it' => 5,
|
|
);
|
|
return '<img src="/img/l/'.(int) $versions[$value].'.jpg" alt="" />';
|
|
}
|
|
|
|
public function delete()
|
|
{
|
|
$addresses = $this->getAddresses((int)(Configuration::get('PS_LANG_DEFAULT')));
|
|
foreach ($addresses AS $address)
|
|
{
|
|
$obj = new Address((int)($address['id_address']));
|
|
$obj->delete();
|
|
}
|
|
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'customer_group` WHERE `id_customer` = '.(int)($this->id));
|
|
Db::getInstance()->Execute('UPDATE `'._DB_PREFIX_.'customer_thread` SET `id_customer` = 0 WHERE `id_customer` = '.(int)($this->id));
|
|
Discount::deleteByIdCustomer((int)($this->id));
|
|
return ObjectModel::delete();
|
|
}
|
|
}
|