Jump to content

Products not shown in front end category pages (1.7)


Major Bob

Recommended Posts

I've made several products in the back office and via CSV uploads. None of them are showing up in the categories in the front-end. Everything is correct in the back office and they are set to be displayed.

 

The products are allocated to categories in the front end but the only places they are visible is in 'popular products' on the home page and if you search for them.

Has anybody seen this before?

 

Debugging on one of the category pages displays this:

 

[PrestaShopDatabaseException]

Access denied for user 'xxx' to database 'yyy'
 

CREATE TEMPORARY TABLE ps_cat_restriction ENGINE=MEMORY                                                        SELECT DISTINCT cp.id_product, p.id_manufacturer, product_shop.condition, p.weight FROM ps_category c                                                        STRAIGHT_JOIN ps_category_product cp ON (c.id_category = cp.id_category AND                                                        c.nleft >= 153                                                        AND c.nright <= 162                                                        AND c.active = 1)                                                        STRAIGHT_JOIN ps_product_shop product_shop ON (product_shop.id_product = cp.id_product                                                        AND product_shop.id_shop = 1)                                                        STRAIGHT_JOIN ps_product p ON (p.id_product=cp.id_product)                                                        WHERE product_shop.`active` = 1 AND product_shop.`visibility` IN ("both", "catalog")

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

739.         if ($webservice_call && $errno) {740.             $dbg = debug_backtrace();741.             WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);742.         } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {743.             if ($sql) {744.                 throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');745.             }746. 747.             throw new PrestaShopDatabaseException($this->getMsgError());748.         }749.     }

 

Link to comment
Share on other sites

  • 3 months later...
  • 2 weeks later...

 

Your database's user does not have CREATE TEMPORARY TABLES privilege, you need to grant the privilege to the user by this way:

GRANT CREATE TEMPORARY TABLES ON `yyy`.* TO 'xxx'@'localhost';

hi

 

I'm having the same problem using the latest version of Prestashop what do I replace yyy and xxx with? And where do I execute this query ???

 

thank you for any help

Link to comment
Share on other sites

  • 2 weeks later...

hi

I'm having the same problem using the latest version of Prestashop what do I replace yyy and xxx with? And where do I execute this query ???

thank you for any help

`yyy` is the table name and `xxx` is the MySQL user name. You should execute this query in the MySQL client after you logged as root.

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...