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

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
CarpElgin
New Member
New Member
Posts: 4
Joined: Tue Apr 29, 2008 1:03 pm

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

Post 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.
Last edited by CarpElgin on Wed Jun 25, 2008 11:56 pm, edited 1 time in total.
Post Reply

Return to “Modules/Add-Ons”