prestashop_newuser Posted September 10, 2015 Share Posted September 10, 2015 Hello, I am okay with creating modules for Prestashop. But I want to know how to make modules for multistore compatible. Is there any kind of tutorials or any free module where I can get the code and know how to create module for multistore. Link to comment Share on other sites More sharing options...
bellini13 Posted September 10, 2015 Share Posted September 10, 2015 There really is not too much you need to do different for multistore. Is there an issue you are having? Link to comment Share on other sites More sharing options...
prestashop_newuser Posted September 11, 2015 Author Share Posted September 11, 2015 There really is not too much you need to do different for multistore. Is there an issue you are having? Yes. Actually I have created a module to show some products from store. But when the module is installed in multistore enabled site then it showed products from the other store. So I just wanted to know how to use the module for multistore? Link to comment Share on other sites More sharing options...
bellini13 Posted September 11, 2015 Share Posted September 11, 2015 Then you need to use the context and shop variables properly. How are you retrieving a list of products from the database? Did you write your own SQL statement, or did you use a function within Products class? Link to comment Share on other sites More sharing options...
prestashop_newuser Posted September 11, 2015 Author Share Posted September 11, 2015 Then you need to use the context and shop variables properly. How are you retrieving a list of products from the database? Did you write your own SQL statement, or did you use a function within Products class? I have written a small sql query and from that I am getting the products. So can you tell me how to use the Context and shop variables in order to get product from multistore? Link to comment Share on other sites More sharing options...
bellini13 Posted September 11, 2015 Share Posted September 11, 2015 The Product class has a function "getProducts" public static function getProducts($id_lang, $start, $limit, $order_by, $order_way, $id_category = false, $only_active = false, Context $context = null) 1 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