Welcome, Guest
Username: Password: Remember me
Use this Category for your support questions about Virtuemart Template - CleanMart (SKU# FLEX-00015)

TOPIC: Tutorial 2: Multiple Thumbs. in Category

Tutorial 2: Multiple Thumbs. in Category 10 years 6 months ago #6661

Hi,

Note: The procedure is exactly the same for Virtuemart3.x and Virtuemart 2.x

As you might know, CleanMart comes a feature of showing more than 1 product thumbnails in the category browse page.
But there is small patch that should be applied to Virtuemart Core file in order to achieve this. Don't worry, this is not a Core Hack, it is an innocent customization.

1- Open this PHP file:
/component/com_virtuemart/views/category/view.html.php

2- Based on your Virtuemart version, apply the following coding patch:

For VM3.0.14+:
find:
$imgAmount = VmConfig::get('prodimg_browse',1);
replace with:
$imgAmount = VmConfig::get('prodimg_browse');


For VM3.0.12+:
find:
$productModel->addImages($this->products, VmConfig::get('prodimg_browse',1) );
replace with:
$productModel->addImages($this->products);




For VM3.0.0 - VM3.0.10:
find:
$productModel->addImages($this->products,1);
replace with:
$productModel->addImages($this->products);




For VM2.x:
find:
$productModel->addImages($products,1);
replace with:
$productModel->addImages($products);




And that's it. You are all set.

From now on, all the additional product pictures will be visible in the category browse page.
You might also consider to change that number "1" to "3" or "5" instead of completely eliminating, so... that many product pictures will be visible only. For instance, if some of your product has 10 additional pictures, it would make sense to make that number 4 or 5, so there won't be any layout corruption in the browse page.

Every time you update Vrtuemart to a newer version, you need to apply this patch manually (each time) because your change would get back to stock once you update your Virtuemart.

Regards.
Last Edit: 8 years 1 week ago by Support.
The administrator has disabled public write access.

Tutorial 2: Multiple Thumbs. in Category 9 years 7 months ago #10852

Hi, guys!

Ten days ago you verified my website and said that everything was OK (and actually, it looks like that it is). Then I feel that some pages weren´t looking like that template (ClearMart) and couldn´t find how to show them the right way. At this moment, I was seeing my CATEGORY PAGES with 3 CATEGORIES PER LINE, with multiplke lines.

Then, I applied again your Tutorial, copying again the DRAG AND DROP files to my template HTML folder; Now my category pages shows only ONE image per line (distribuidoradafec.org.br/s1/index.php/cat-generos).

Attachment Gneros1.png not found



You already have my credentials at this email replies we exchanged before ("Re: I bought and I am not sure about what I bought!"). If you need that I send it again, please also send me your IP number, so I can ask to give you access for FTP (last time you used ProFiles, from inside Joomla).

Thanks again for any help. Waiting the 2 days time.

PS: I cheched this hack and everything is OK, except that the command line is around line 120.

Regards
Last Edit: 9 years 7 months ago by Satyro Oliveira. Reason: Explain better.
The administrator has disabled public write access.

Tutorial 2: Multiple Thumbs. in Category 9 years 7 months ago #10860

Hi,

Because your Joomla Template has this CSS rule:
.category {
    width: 100%;
}

which is ridiculous css rule, i don't know why your Joomla template has this rule. It forces to category grid has 100% all the time.

To fix it. Open this CSS file:
distribuidoradafec.org.br/s1/templates/rt_epsilon/html/com_virtuemart/assets/css/flexibleVM2Global.css

and include this CSS rule:
div.category.width33 {width:33%;}

and you will be good to go.

regards.
Support
The administrator has disabled public write access.

Tutorial 2: Multiple Thumbs. in Category 8 years 4 months ago #13455

just a quick one the code in VM 3 have changed and it is now

from:
$productModel->addImages($this->products, VmConfig::get('prodimg_browse',1) );

replace by:
$productModel->addImages($this->products, VmConfig::get('prodimg_browse') );
The administrator has disabled public write access.

Tutorial 2: Multiple Thumbs. in Category 8 years 4 months ago #13463

Thanks for raising this M Heos,. in VM3.0.12, the line has been changed in the Core file.

But actually you are little mistaken, you should replace this:
$productModel->addImages($this->products, VmConfig::get('prodimg_browse',1) );

into this:
$productModel->addImages($this->products);


FYI: Looks like VmConfig::get('prodimg_browse',1) is a variable that is taken from Virtuemar Config file.. But honestly, there is no field in the Virtuemart backend to match that variable. Maybe I missed it? Anybody noticed a new parameter in the VM Backend >> Configuration that controls the VmConfig::get('prodimg_browse') ?

regards.
Last Edit: 8 years 4 months ago by Support.
The administrator has disabled public write access.

Tutorial 2: Multiple Thumbs. in Category 8 years 3 months ago #13537

thank you i don't know for this variable :)
The administrator has disabled public write access.

Tutorial 2: Multiple Thumbs. in Category 8 years 3 months ago #13550

I suppose, VM Team thought about altering the image-count for the category-page, but then forgot to create the field in the VM configuration dashboard ;)
The administrator has disabled public write access.
Time to create page: 0.394 seconds

MaterialMart

for Virtuemart 3

Google's Material Design has finally arrived to Virtuemart

Virtumart Template - MaterialMart Virtumart Template - CleanMart Virtumart Template - CleanMart Virtumart Template - CleanMart

Fully responsive!

Buy Now   |   Live Demo