Page 1 of 1

show 2 articles side by side

Posted: 08 Jun 2023, 11:13
by Angelo.pe
Good morning guys,
When the customer sees the articles over the phone, I would like to show 2 items per line. whereas at the moment it is only possible to see 1. how can I do this?
Thank you and nice day ;-)

Re: show 2 articles side by side

Posted: 08 Jun 2023, 11:49
by mino182
With template override, change this file components\com_phocacart\layouts\items_grid.php on line 32

from:

Code: Select all

echo '<div class="'.$s['c']['row-item'].' '.$s['c']["col.xs12.sm{$col}.md{$col}"].'">';
to:

Code: Select all

echo '<div class="'.$s['c']['row-item'].' col-6 col-md-3">';
But you should use boostrap based template. If your template use another framework, you have to change classes according to your framework...

Re: show 2 articles side by side

Posted: 08 Jun 2023, 12:22
by Angelo.pe
Thank you Minio,
I'm using Jf Simone. I think that it's possible to modify the template..

Re: show 2 articles side by side

Posted: 08 Jun 2023, 18:05
by Angelo.pe
In the layout folder I modified the file /items_grid.php with the string you indicated. On the computer the items overlap and go beyond the margin of the template while on the phone nothing changes.
I noticed that in the layout folder, in addition to the file /items_grid.php there is also a file called /items_gridlist.php
Shouldn't we act on this second file?

Re: show 2 articles side by side

Posted: 08 Jun 2023, 18:49
by mino182
Depend if you use grid or gridlist layout... It should be only hint. Classes "col-6 col-md-3" make 2 item in small devices and 4 items in medium and bigger devices... If it doesn't work, there can be another framework in use, not bootstrap 5. Or another issiue in css...