Phoca Cart template - Category list on mobile

Phoca Templates - templates for Joomla! CMS
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Cart template - Category list on mobile

Post by Jan »

Hi, can you paste a screenshot, I get two columns there.

Jan
If you find Phoca extensions useful, please support the project
vitoricciardi
Phoca Member
Phoca Member
Posts: 32
Joined: 14 Oct 2020, 17:45

Re: Phoca Cart template - Category list on mobile

Post by vitoricciardi »

Image
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Cart template - Category list on mobile

Post by Jan »

Hi, in categories view, you can set the column number in Options but then the one column for mobile needs to be changed the same way like in categories view:

components\com_phocacart\views\categories\tmpl\default_standard.php

The same change the 12 to 6 for "xs"

Jan
If you find Phoca extensions useful, please support the project
vitoricciardi
Phoca Member
Phoca Member
Posts: 32
Joined: 14 Oct 2020, 17:45

Re: Phoca Cart template - Category list on mobile

Post by vitoricciardi »

In "default_standard.php" I see this instructions:
"$col = 12/(int)$this->p->get('columns_cats', 3);

foreach ($this->t['categories'] as $v) {
echo '<div class="'.$this->s['c']["col.xs12.sm{$col}.md{$col}"].' row-item">'; "

If I change "col.xs12.sm{$col}" in "col.xs6.sm{$col}" I see on PC 2 columns/row and 1 column/row on mobile, if I change "$col = 12/(int)" in "$col = 6/(int)" I see on PC 6 columns/row and in mobile 1 column/row.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Cart template - Category list on mobile

Post by Jan »

Hi, try to change to:

Code: Select all

echo '<div class="col-xs-6 col-sm-'.$col.' col-md-'.$col.' row-item">'; "
If you find Phoca extensions useful, please support the project
vitoricciardi
Phoca Member
Phoca Member
Posts: 32
Joined: 14 Oct 2020, 17:45

Re: Phoca Cart template - Category list on mobile

Post by vitoricciardi »

now it's almost ok, only the images are not all the same, i set box height equal in view general options
Image
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Cart template - Category list on mobile

Post by Jan »

Hi,

- if the images are different, try to see if all images have the same thumbnail size - if not, try to recreate thumbnails
- if the boxex are different, just see my previous post regarding box equal height.

Jan
If you find Phoca extensions useful, please support the project
vitoricciardi
Phoca Member
Phoca Member
Posts: 32
Joined: 14 Oct 2020, 17:45

Re: Phoca Cart template - Category list on mobile

Post by vitoricciardi »

in my opinion the problem is not the image but the writing, in fact the size is different where the writing is larger than 1 word or the word is very long
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca Cart template - Category list on mobile

Post by Jan »

Hi, yes, but this should be solved by "equal heights" parameter. This parameter uses flexbox to set all the boxes to the same height.

See:
Image

You can see, that in each box, there is a different size of title or description (some with one line, others with more lines) but the box height is thanks to "equal heights" parameter the same.

Jan
If you find Phoca extensions useful, please support the project
vitoricciardi
Phoca Member
Phoca Member
Posts: 32
Joined: 14 Oct 2020, 17:45

Re: Phoca Cart template - Category list on mobile

Post by vitoricciardi »

Image
As You can see I have "Equal Heights" in my configuration
Post Reply