Hi, can you paste a screenshot, I get two columns there.
Jan
Phoca Cart template - Category list on mobile
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoca Cart template - Category list on mobile
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 32
- Joined: 14 Oct 2020, 17:45
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoca Cart template - Category list on mobile
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
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
-
- Phoca Member
- Posts: 32
- Joined: 14 Oct 2020, 17:45
Re: Phoca Cart template - Category list on mobile
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.
"$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.
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoca Cart template - Category list on mobile
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
-
- Phoca Member
- Posts: 32
- Joined: 14 Oct 2020, 17:45
Re: Phoca Cart template - Category list on mobile
now it's almost ok, only the images are not all the same, i set box height equal in view general options
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoca Cart template - Category list on mobile
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 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
-
- Phoca Member
- Posts: 32
- Joined: 14 Oct 2020, 17:45
Re: Phoca Cart template - Category list on mobile
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
- Jan
- Phoca Hero
- Posts: 48386
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Phoca Cart template - Category list on mobile
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:
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
See:
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
-
- Phoca Member
- Posts: 32
- Joined: 14 Oct 2020, 17:45
Re: Phoca Cart template - Category list on mobile
As You can see I have "Equal Heights" in my configuration