LineTV Posted June 16, 2014 Share Posted June 16, 2014 I just want to know if its possible to display products created on multishops on the homepage of the Master (default) page. For example, lets say you have 5 different multishops, and want to have products created on these multishops to display on the Master (default) shop... How is it possible? I have called/email/ sought answer for this problem including Prestashop tech support, and I never got a yes or no answer from anyone - they all say "yes its possible", but no one knows how to configure.... So if you please know the answer to this question.. please help. Thanks Link to comment Share on other sites More sharing options...
NemoPS Posted June 17, 2014 Share Posted June 17, 2014 You can, but only using a custom query, by simply not passing a shop ID as condition in the where clause Of course you have to remember grouping by product id to avoid duplicates Link to comment Share on other sites More sharing options...
LineTV Posted June 17, 2014 Author Share Posted June 17, 2014 @Nemo, Hello and thank you for your response. So all I have to do is not pass a shop ID as a condition - Would I have to hire someone to write the codes or is this something a novince can do using Prestashop? Link to comment Share on other sites More sharing options...
NemoPS Posted June 18, 2014 Share Posted June 18, 2014 Well if you need a new module, yes, otherwise you can try editing Product::getNewProducts if you want to get new ones, and remove shop conditions from there. Indeed if you know php, you can do it, otherwise you should probably hire someone do do the wet work! Link to comment Share on other sites More sharing options...
LineTV Posted June 18, 2014 Author Share Posted June 18, 2014 @Nemo, Thanks again for the pointer. I am somewhat skillful in php, not the best though, and I was able to make the edit from: $newProducts = Product::getNewProducts((int) $this->context->language->id, 0, (int)Configuration::get('NEW_PRODUCTS_NBR')); to: $newProducts = Product::getNewProducts(intval($params['cookie']->id_lang), 0, 100);shuffle($newProducts);array_splice($newProducts, Configuration::get('NEW_PRODUCTS_NBR') ); Do you thikn that's gonna fix it - make those products in multishop display on the default home? Link to comment Share on other sites More sharing options...
NemoPS Posted June 20, 2014 Share Posted June 20, 2014 Well no, this is only going to randomize 100 products, and anyway gets bigger data from the database so it's slower. I didn't test it but you can try removing this $sql->join(Shop::addSqlAssociation('product', 'p')); From Product::getnewProducts() Link to comment Share on other sites More sharing options...
Recommended Posts