Page 1 of 1

[solved] Products Module: Summary templates refer to wrong file_location

Posted: Tue Apr 29, 2008 2:57 pm
by CarpElgin
[update: this was fixed in the 2.0.1 release]

I filed this as a bug, but I thought I'd share my solution here as well...

When I tried to refer to a full sized product image (from a user defined image field) in a summary template, I found that $entry->file_location returned an incorrect path ('.../products_). The field's thumbnail reference included the correct path '.../product_'.

I'm not a PHP programmer, but I looked at the code and found the problem on line 259:

Code: Select all

$onerow->file_location = $config['uploads_url'].'/'.$this->GetName().'/products_'.$row['id'];
I changed it to:

Code: Select all

$onerow->file_location = $config['uploads_url'].'/'.$this->GetName().'/product_'.$row['id'];
* This is the same way the file_location is referred to in line 59 of action.details.php

Probably not something that will be used that often, but nice to know.