Jump to content

Shop::addSqlRestriction doesn't work on PS 1.5.4.0


logan871

Recommended Posts

hello, I'm trying to generate a query to retrieve product by some attribute.

The query should work in multistore configuration.

So i added at the end of the query

 

.Shop::addSqlRestriction(false, 'ps');

 

'ps' is the alias to table product_shop used in the inner join of the query.

 

This query works pretty good on prestashop 1.5.6+, but on prestashop 1.5.4 Shop::addSqlRestriction always append to query

 

AND ps.id_shop IN (1)

 

Despite the actual shop is active it always search on shop with id '1'.

 

Why?

Thank in advance for reply.

Link to comment
Share on other sites

  • 1 year later...

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