Jump to content

2 product columns on mobile


SeizeTheDay

Recommended Posts

11 hours ago, Prescol said:

You must edit the product.tpl file, and then modify according to the css framework your theme is using. If it is default them: bootstrap4

Hi @Prescol thank you for support but I still don't know what to do. If you want, I can send the product.tpl file and the css file to you. I don't know what codes to change.

Link to comment
Share on other sites

Big confusion :)

You have some css errors in your code

 

add this to your file custom.css

@media (max-width: 767px){
    .products .product-miniature {
            width:100%!important;
            float:left!important;
    }
}

To add custom css code do this:

 

 

image.thumb.png.9ca2e754a6e9183ff97e76df8ab1290c.png

 

after code you will see :

 

image.png.a8c398a19621d65626a230aee61b5b94.png

Edited by luisleitaoaudio (see edit history)
Link to comment
Share on other sites

  • 5 months later...
On 6/17/2020 at 12:36 AM, Prescol said:

I will not edit code on demand. There are thousand of tutorials online and thousand of programmers ready to do it. Perform a search and you will see a lot of information, even in this forum.

 

On 6/17/2020 at 1:24 AM, Prescol said:

Well, the difference between writing the code or telling you what to do and where is not so big...

There are no tutorials on how to do this for prestashop 1.7.6.   I'm not sure why you even answered the person, only to be snarky. There are plenty of other shopping carts, where the community help each other. 

  • Like 1
Link to comment
Share on other sites

On 12/16/2020 at 8:31 PM, pinwheel said:

 

There are no tutorials on how to do this for prestashop 1.7.6.   I'm not sure why you even answered the person, only to be snarky. There are plenty of other shopping carts, where the community help each other. 

There are a lot of professional programmers ready to work. You only need to hire them. This is a forum, not a free service.  Value your work.

Edited by Prescol (see edit history)
Link to comment
Share on other sites

4 hours ago, Prescol said:

There are a lot of professional programmers ready to work. You only need to hire them. This is a forum, not a free service.  Value your work.

Yes, I'm well aware that you are after shekels. Where other people are happy to help on this forum. 

  • Like 1
Link to comment
Share on other sites

  • 6 months later...
On 17/06/2020 at 04:41, SeizeTheDay said:

Eu não queria que você fizesse isso. Só quero saber quais códigos preciso alterar. então eu disse que posso enviar os arquivos. De qualquer forma, obrigada. Há mais alguém que possa ajudar?

Conseguiu fazer o que precisava?

Link to comment
Share on other sites

  • 1 year later...

I did the following on 1.7.8.8:

Open file

/themes/classic/templates/catalog/listing/product-list.tpl

change:

{include file='catalog/_partials/products.tpl' listing=$listing productClass="col-xs-12 col-sm-6 col-xl-4"}

to

{include file='catalog/_partials/products.tpl' listing=$listing productClass="col-xs-6 col-xl-4"}

AND

 

In the file:

themes/classic/templates/catalog/_partials/productlist.tpl

change

{if !empty($productClass)}{$productClass}{else}col-xs-12 col-sm-6 col-xl-4{/if}{/capture}

to

{if !empty($productClass)}{$productClass}{else}col-xs-6 col-xl-4{/if}{/capture}

 

That worked for me.

Best regards,
Mikael

 

Edited by Mikael Mortensen (see edit history)
  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...
On 24/2/2023 at 1:19 PM, Mikael Mortensen dice:

I did the following on 1.7.8.8:

Open file

/themes/classic/templates/catalog/listing/product-list.tpl

change:

{include file='catalog/_partials/products.tpl' listing=$listing productClass="col-xs-12 col-sm-6 col-xl-4"}

to

{include file='catalog/_partials/products.tpl' listing=$listing productClass="col-xs-6 col-xl-4"}

AND

 

In the file:

themes/classic/templates/catalog/_partials/productlist.tpl

change

{if !empty($productClass)}{$productClass}{else}col-xs-12 col-sm-6 col-xl-4{/if}{/capture}

to

{if !empty($productClass)}{$productClass}{else}col-xs-6 col-xl-4{/if}{/capture}

 

That worked for me.

Best regards,
Mikael

 

Ha funzionata anche a me...
che tu sappia è possibile modificare il modulo nuovi prodotti e prodotti popolari nello stesso modo ?

Link to comment
Share on other sites

On 2/24/2023 at 1:19 PM, Mikael Mortensen said:

I did the following on 1.7.8.8:

Open file

/themes/classic/templates/catalog/listing/product-list.tpl

change:

{include file='catalog/_partials/products.tpl' listing=$listing productClass="col-xs-12 col-sm-6 col-xl-4"}

to

{include file='catalog/_partials/products.tpl' listing=$listing productClass="col-xs-6 col-xl-4"}

AND

 

In the file:

themes/classic/templates/catalog/_partials/productlist.tpl

change

{if !empty($productClass)}{$productClass}{else}col-xs-12 col-sm-6 col-xl-4{/if}{/capture}

to

{if !empty($productClass)}{$productClass}{else}col-xs-6 col-xl-4{/if}{/capture}

 

That worked for me.

Best regards,
Mikael

 

Thank you, works.
Reminder for others: copy those files and paste them in your child theme folder to save after updates.

Link to comment
Share on other sites

  • 2 weeks later...
On 4/5/2023 at 1:18 PM, daninapoli dice:

Ha funzionata anche a me...
che tu sappia è possibile modificare il modulo nuovi prodotti e prodotti popolari nello stesso modo ?

In teoria dovrebbe già funzionare così perché entrambi i file (/catalog/listing/best-sales.tpl e /catalog/listing/new-products.tpl) richiamano sempre lo stesso file:
/catalog/listing/product-list.tpl

 

Link to comment
Share on other sites

  • 3 months later...
  • 7 months later...
On 5/1/2024 at 5:25 PM, vinzo said:

help please guys i still have the same problem i cant make it work 

Hello,

It is so silly that PrestaShop doesn't have this feature but anyway, this worked for me. You also need to fiddle around with paddings and margins to make it right but if you are familiar with the browser console, you should be able to select specific items you want to adjust.

The good thing about this is that you don't need to edit any core files to make it work, you can just add the css to the Theme Editor in back-office.

@media only screen and (max-width: 600px) {
    .products.row > .col,
    .products.row > [class*="col-"] {
padding: 0rem;
max-width: 50%!important;
}

Hope this helps you.

Link to comment
Share on other sites

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