Resolve cart and account logout issue

This commit is contained in:
shreesh arora
2021-05-19 13:08:17 +05:30
parent 99d1dfd172
commit c2c386fa7a
3 changed files with 7 additions and 2 deletions

View File

@@ -2632,6 +2632,9 @@ class CartCore extends ObjectModel
*/
public static function desintifier($int, $delimiter = ',')
{
if (!$int)
return;
$delimiter_len = $int[0];
$int = strrev(substr($int, 1));
$elm = explode(str_repeat('0', $delimiter_len + 1), $int);

View File

@@ -136,7 +136,7 @@ class ConnectionCore extends ObjectModel
'.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).'
ORDER BY `date_add` DESC';
$result = Db::getInstance()->getRow($sql, false);
if (!$result['id_guest'] && (int)$cookie->id_guest) {
if (!isset($result['id_guest']) && (int)$cookie->id_guest) {
// The old connections details are removed from the database in order to spare some memory
Connection::cleanConnectionsPages();

View File

@@ -2925,7 +2925,9 @@ class AdminProductsControllerCore extends AdminController
public function renderForm()
{
// This nice code (irony) is here to store the product name, because the row after will erase product name in multishop context
$this->product_name = $this->object->name[$this->context->language->id];
if (Validate::isLoadedObject(($this->object))) {
$this->product_name = $this->object->name[$this->context->language->id];
}
if (!method_exists($this, 'initForm'.$this->tab_display)) {
return;