[solved] Products Module: Summary templates refer to wrong file_location
Posted: Tue Apr 29, 2008 2:57 pm
[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:
I changed it to:
* 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.
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'];
Code: Select all
$onerow->file_location = $config['uploads_url'].'/'.$this->GetName().'/product_'.$row['id'];
Probably not something that will be used that often, but nice to know.