No picture on Phocacart Catalog

Phoca Cart - complex e-commerce extension
lecoq.fr
Phoca Newbie
Phoca Newbie
Posts: 7
Joined: 13 Apr 2021, 17:27

No picture on Phocacart Catalog

Post by lecoq.fr »

Hi,
After several hours spent on the problem I can not get pictures posted in the Phocacart catalog in PDF version. The photos are however well displayed in HTML version.
In catalog.php the $image variable is correct. The path is good and the jpg exists well. I tried the "large" and "medium" formats without more success.
There is not special formating for display (.ph-catalog-img {height: auto ;width: auto;})

Has anyone ever solved this problem?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: No picture on Phocacart Catalog

Post by Jan »

Hi, are you able to degug the code before it is printed to PDF - it means to stop the code before rendering to PDF and print it e.g. with print_r and see the source code of HTML to check the paths.

Testing now, it is working OK for me :idea:

Image

Jan
If you find Phoca extensions useful, please support the project
eichners
Phoca Member
Phoca Member
Posts: 17
Joined: 23 Apr 2021, 11:14

Re: No picture on Phocacart Catalog

Post by eichners »

I Guess I found the Problem --> so HTML accept adresses like /images/... it has to be the full address of the picture for the PDF catalog to be created.
In my case, i changed the following sequence in catalog.php (Line 104-110): (administrator\components\com_phocacart\layouts)

if ($v['image'] != '') {

$image = PhocacartImage::getThumbnailName($pathItem, $v['image'], 'small');
echo '<img class="ph-catalog-img" src="https://yourdomain.de/' . $image->rel.'" alt="'.PhocacartText::filterValue($v['title'], 'text').'" />';
}
echo '</td>';

BR
Stephan
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: No picture on Phocacart Catalog

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
Post Reply