lars95 Posted March 15, 2013 Share Posted March 15, 2013 (edited) Hi! I am not very well versed with the MVC- concept so I may be putting some terms wrong here. Feel free to correct me. If i have a number of shops on multistore mode (eg. 1,2,3 etc.) all the products are stored in the same tables in the database. Now say that I am looking at the front end of STORE 2. I can only see the products that have been added to associated to STORE 2. So far so good. The question is: in what file can I find the code that queries/filters away the products from other stores? Best regards, Lars Edited March 15, 2013 by lars95 (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted March 15, 2013 Share Posted March 15, 2013 (edited) Hi, well, actually he proble is that it's not stored in a single place. All queries (or well, most of them), say Category::getProducts, have "AND id_shop =1" (with the respective ID of course, and table reference). Products and categries, for example, have category_shop, and product_shop as tables in the database. Edited March 15, 2013 by Nemo1 (see edit history) Link to comment Share on other sites More sharing options...
lars95 Posted March 15, 2013 Author Share Posted March 15, 2013 Hi Nemo! Thanks for digging in. I see. I suppose the shop id is in the variable $id_shop? Do you know where that variable is set? Link to comment Share on other sites More sharing options...
NemoPS Posted March 15, 2013 Share Posted March 15, 2013 (edited) It should be in the context, like $this->context->shop->id i believe it's also retrieved like this Shop::getContextShopID() Edited March 15, 2013 by Nemo1 (see edit history) Link to comment Share on other sites More sharing options...
lars95 Posted March 15, 2013 Author Share Posted March 15, 2013 Ok- you have brought some light into this. Thank you! Link to comment Share on other sites More sharing options...
lars95 Posted March 15, 2013 Author Share Posted March 15, 2013 Hi again! Do you know how i mark this thread [sOLVED]? Link to comment Share on other sites More sharing options...
NemoPS Posted March 15, 2013 Share Posted March 15, 2013 I believe you have to edit your first post and add the text at the beginning (at least, that's what I do usually ) Link to comment Share on other sites More sharing options...
lars95 Posted March 15, 2013 Author Share Posted March 15, 2013 Thanks Nemo, appreciate it! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now