Jump to content

Unknown column 'b.id_shop' in 'where clause


Recommended Posts

Bonjour,

 

Au moment du passage de commande et juste avant de procéder au checkout je me retrouve avec cette erreur. Je ne comprends d'ou vient l'erreur.

J'ai eu un problème de langue, mais tout semble rentré dans l'ordre. J'avais voulu faire du ménage mais j'ai du renoncer.

 

Est ce qu'une personne à une idée, j'ai cherché un peu sans succès.

 

Merci,

 

Laurent

 

[PrestaShopDatabaseException]

Unknown column 'b.id_shop' in 'where clause'
 

SELECT *
FROM `ps_cms` a
LEFT JOIN `ps_cms_lang` `b` ON a.id_cms = b.id_cms AND b.id_lang = 5
LEFT JOIN `ps_cms_shop` `c` ON a.id_cms = c.id_cms AND c.id_shop = 1
WHERE (a.id_cms = 3) AND (b.id_shop = 1)
LIMIT 1

at line 635 in file classes/db/Db.php

 

630.             WebserviceRequest::getInstance()->setError(500, '
 '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
631.         }
632.         else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))
633.         {
634.             if ($sql)
635.                 throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
636.             throw new PrestaShopDatabaseException($this->getMsgError());
637.         }
638.     }
639.
640.     /**
Link to comment
Share on other sites

bonjour

 

Le AND (b.id_shop = 1) n'a rien à faire ici vu qu c.id_shop est déjà défini plus haut

 

essayez en commantant les 2 lignes suivantes dans le fichier classes/ObjectModel.php vers la ligne 205: (ajoutez les //)

					//if ($this->id_shop && !empty($this->def['multilang_shop']))
						//$sql->where('b.id_shop = '.$this->id_shop);

Vous devez être en multishop ou l'avoir activé/désactivé.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...