Jump to content


  • Posts

  • Joined

  • Last visited

Profile Information

  • Activity

wshyang's Achievements


Newbie (1/14)



  1. One way this problem manifests itself can be seen in Catalogs -> Products -> Association. When a "patch" is made in classes/shop/Shop.php at getCategory() to forcibly return a "1" every time, a more desirable result occurs. However, without the patch, the behaviour is that the category tree is rooted in one of our subcategories. I simply can't work out why this is happening, because in the database table (ps_category), that 2nd category is neither defined as a root category nor does it have a id_parent of 0. Any help or insight into this will be appreciated
  2. Hi all, We've recently upgraded our store from to and for the most part things are working fine, however something seems critically wrong with our categories. We used to have a root category (in ps_category this category has id_category of "1" and id_parent "0"), but somehow for some reason after the upgrade Prestashop seems to have decided that category id "2" is the root category now. Tracing through the code, it seems like the problem started from $shop->getCategory(). It seems like forcibly making this function return "1" fixes the problem in some of the places. I'm not able to work out what's causing the $shop->id_category problem to be set to "2" in the first place, so I am wondering if anyone more experienced with how Prestashop works can offer some advice as to where it happens? Thank you!
  3. Hi guys I've been wanting to create a add-on cron script that utilises Prestashop's DB class instead of instantiating the database handle directly, but I can't seem to figure out where did the "Db" class commonly referenced by "Db::getInstance()" calls get defined. Before I get accused of not searching, I did actually read the other thread However, as bizarre as it is, that file does not exist on our installation: [/home/xxxx/www/shop]# find . | grep Db.php ./classes/Db.php ./admin1234/tabs/AdminDb.php And even better: [/home/xxxx/www/shop/classes]# grep -r "extends Db" ../ ../classes/MySQL.php:class MySQLCore extends Db And most intriguing! [/home/xxxx/www/shop/override]# cd ../override/ [/home/xxxx/www/shop/override]# ls ./ ../ classes/ controllers/ [/home/xxxx/www/shop/override]# cd classes/ [/home/xxxx/www/shop/override/classes]# ls ./ ../ _FrontController.php* _Module.php* _MySQL.php* Our shop is working, so obviously I am missing something. We are running Prestashop 1.4.1. Edit: One more grep through the code base found nothing: grep -rwI "Db" . | grep -v "::" ./modules/productcomments/productcommentscriterion.php:require_once(dirname(__FILE__).'/../../classes/Db.php'); ./classes/MySQL.php:class MySQLCore extends Db ./classes/Db.php: * Get Db object instance (Singleton) ./classes/Db.php: * @return object Db instance ./classes/Db.php: * Build a Db object
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More