Products and Images [solved]

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
dwinters
Forum Members
Forum Members
Posts: 53
Joined: Mon Mar 17, 2008 12:46 pm

Products and Images [solved]

Post by dwinters »

Hi all,

I have read many posts on this and followed all advise and still stuck
CMS - 1.4.1
Module = Products 2.1.2

Problem cant get images to show I am using the following code

{foreach from=$items item=entry}
   {*
     the summary template has access to custom fields via the $entry->fields hash
     and to categories via the $entry->categories array of objects.  Also
     attribute information is available via $entry->attributes.
     you should use the get_template_vars and the print_r modifier to see
     what is available
    *}





{$entry->product_name}
{$entry->details}
{$currency_symbol}{$entry->price}

detail_url}">View details
file_location}/{$entry->largeimg}" alt="{$field->value}"/>




{/foreach}

Also cant fine thumbnails does Products make these each and every image uploaded through it? Where are they?
Last edited by dwinters on Sat Oct 18, 2008 10:30 am, edited 1 time in total.
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm
Location: the Netherlands

Re: Products and Images

Post by Dee »

Add a Field Definition of type "image", for example Image1, then you can use this code:

Code: Select all

{foreach from=$items item=entry}

{if $entry->fields.Image1->thumbnail ne ''}
<img src="{$entry->file_location}/{$entry->fields.Image1->thumbnail}" alt="{$field->value}" />
{/if}

{/foreach}

Images and thumbs are stored in uploads/Products/product_*product_id*

Regards,
D
dwinters
Forum Members
Forum Members
Posts: 53
Joined: Mon Mar 17, 2008 12:46 pm

Re: Products and Images

Post by dwinters »

Thanks

But still does not work - there is no thumb in that directory

I even tried the syntax file_location}/{$entry->fields.largeimg}" alt="{$field->value}"/>

I called my custom image largeimg.

This did not pull in the big image.

Help!

Thanks
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm
Location: the Netherlands

Re: Products and Images

Post by Dee »

Try saving the module Preferences (no need to make changes), I had problems with the thumb-creation/saving of images because the preference for watermarking is not set by the install.

If you called the Field Definition "largeimg" this code shows the thumbnail:

Code: Select all

<img src="{$entry->file_location}/{$entry->fields.largeimg->thumbnail}" />
and this the large image:

Code: Select all

<img src="{$entry->file_location}/{$entry->fields.largeimg->value}" />
Regards,
D
dwinters
Forum Members
Forum Members
Posts: 53
Joined: Mon Mar 17, 2008 12:46 pm

Re: Products and Images

Post by dwinters »

OK that makes sense.

But

Still get html of

When using




{$entry->product_name}
{$entry->details}
{$currency_symbol}{$entry->price}
detail_url}">View details
file_location}/{$entry->fields.largeimg->value}" />




And the large file is there in that dir - no thumb however even after saving preferences - do I have to have watermark on?

Thanks

Dan
dwinters
Forum Members
Forum Members
Posts: 53
Joined: Mon Mar 17, 2008 12:46 pm

Re: Products and Images

Post by dwinters »

OK a setting in file manager was hiding the thumbs they are there

and I had set them no not public doh...

Thanks  Solved now
Post Reply

Return to “Modules/Add-Ons”