show 2 articles side by side

Phoca Cart - complex e-commerce extension
User avatar
Angelo.pe
Phoca Professional
Phoca Professional
Posts: 142
Joined: 02 May 2020, 12:42

show 2 articles side by side

Post 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 ;-)
mino182
Phoca Professional
Phoca Professional
Posts: 195
Joined: 12 Feb 2015, 13:30

Re: show 2 articles side by side

Post 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...
User avatar
Angelo.pe
Phoca Professional
Phoca Professional
Posts: 142
Joined: 02 May 2020, 12:42

Re: show 2 articles side by side

Post by Angelo.pe »

Thank you Minio,
I'm using Jf Simone. I think that it's possible to modify the template..
User avatar
Angelo.pe
Phoca Professional
Phoca Professional
Posts: 142
Joined: 02 May 2020, 12:42

Re: show 2 articles side by side

Post 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?
mino182
Phoca Professional
Phoca Professional
Posts: 195
Joined: 12 Feb 2015, 13:30

Re: show 2 articles side by side

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