tivicrdotcom Posted May 17, 2024 Share Posted May 17, 2024 Hello fellow Geeks, I was wondering how to display on mobile, the products as two columns instead of one. There is a lot of unused space with one single view. Thanks in advance. AJ Link to comment Share on other sites More sharing options...
Prestashop Addict Posted May 17, 2024 Share Posted May 17, 2024 Hi, please can you specify PS version and theme used. Link to comment Share on other sites More sharing options...
tivicrdotcom Posted May 17, 2024 Author Share Posted May 17, 2024 Hi @Prestashop Addict, classic theme PS 8 up to date. Link to comment Share on other sites More sharing options...
Prestashop Addict Posted May 17, 2024 Share Posted May 17, 2024 Change in template themes/classic/templates/catalog/_partials/productlist.tpl {capture assign="productClasses"}{if !empty($productClass)}{$productClass}{else}col-xs-12 col-sm-6 col-xl-4{/if}{/capture} to {capture assign="productClasses"}{if !empty($productClass)}{$productClass}{else}col-xs-6 col-sm-6 col-xl-4{/if}{/capture} I recommend you to create a child theme, otherwise you'll loose your modification on theme update 😉 Link to comment Share on other sites More sharing options...
tivicrdotcom Posted May 18, 2024 Author Share Posted May 18, 2024 Did the change but took no effect, obviously cleared cache, you try it https://www.artbyjunior.shop Link to comment Share on other sites More sharing options...
Prestashop Addict Posted May 18, 2024 Share Posted May 18, 2024 Il y a 21 heures, Prestashop Addict a dit : {capture assign="productClasses"}{if !empty($productClass)}{$productClass}{else}col-xs-6 col-sm-6 col-xl-4{/if}{/capture} Did you set this? Check in settings if you have Never recompile templates Link to comment Share on other sites More sharing options...
tivicrdotcom Posted May 18, 2024 Author Share Posted May 18, 2024 I sure did. Link to comment Share on other sites More sharing options...
Prestashop Addict Posted May 21, 2024 Share Posted May 21, 2024 Ok found it, you need to modify following templates (search in sub folders): manufacturer.tpl, product-list.tpl, search.tpl, supplier.tpl and change parameter productClass="col-xs-12 col-sm-6 col-xl-3..." to productClass="col-xs-6 col-sm-6 col-xl-3..." Link to comment Share on other sites More sharing options...
tivicrdotcom Posted June 1, 2024 Author Share Posted June 1, 2024 I give up. Found them all under subfolder themes/catalog/listing, made the changes, forced comilation on the theme, forced cache yet no changes are seen. Link to comment Share on other sites More sharing options...
Prestashop Addict Posted June 2, 2024 Share Posted June 2, 2024 Humm strange, do you have a cache server like varnish? If so empty cache. Link to comment Share on other sites More sharing options...
printy Posted June 25, 2024 Share Posted June 25, 2024 Hello AJ (tivicrdotcom), I'm facing the same Problem. Did all the same steps as described here, but No success. And then I looked at your Shop - and it Looks right. you seem to have found Out where to Change the Code for 2 columns one mobile ?!? Would you mind to share your solution ? Thanks in advance ACW Link to comment Share on other sites More sharing options...
tivicrdotcom Posted June 28, 2024 Author Share Posted June 28, 2024 Hi @printy, my site still looks the same, I couldn't find a solution, also followed the steps, cleared cache, but nothing happened, the site still displays as a single column on my end. Link to comment Share on other sites More sharing options...
Prestashop Addict Posted June 28, 2024 Share Posted June 28, 2024 Il y a 5 heures, tivicrdotcom a dit : Hi @printy, my site still looks the same, I couldn't find a solution, also followed the steps, cleared cache, but nothing happened, the site still displays as a single column on my end. All using classic theme, nor a child theme. Could you provide url Link to comment Share on other sites More sharing options...
tivicrdotcom Posted June 29, 2024 Author Share Posted June 29, 2024 thanks @Prestashop Addict. Mine is artbyjunior.shop Exactly, using classic not child. I do have to get better at using child themes as every time PS updated, it rids of customization on header, footer and theme Link to comment Share on other sites More sharing options...
Prestashop Addict Posted July 1, 2024 Share Posted July 1, 2024 Le 29/06/2024 à 11:34 PM, tivicrdotcom a dit : Exactly, using classic not child. I do have to get better at using child themes as every time PS updated, it rids of customization on header, footer and theme A french tutorial for child theme Link to comment Share on other sites More sharing options...
Prestashop Addict Posted July 1, 2024 Share Posted July 1, 2024 With a classic theme change themes/classic/catalog/listing/product-list.tpl (do same change in manufacturer.tpl, search.tpl, supplier.tpl) {block name='product_list'} {include file='catalog/_partials/products.tpl' listing=$listing productClass="col-xs-12 col-sm-6 col-xl-4"} {/block} to {block name='product_list'} {include file='catalog/_partials/products.tpl' listing=$listing productClass="col-xs-6 col-sm-6 col-xl-4"} {/block} Verify in advanced parameters you are in "Recompile templates if the files have been updated" option. If not change 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