I just installed CMSMS 1.11.10 and the Products module 2.20.1
First thing I try, add a product. Now there is no possibility to include an image which can be used small in listings, big in detail view. No field for a product image.
In setting it says: "Image processing functions are deprecated and will be removed in a future version. Use CGSmartImage for inline image processing." (Nevertheless, there are Settings for Images.)
I installed CGSmartImage, but still no entry field for a product image appears in the "add product" form.
What surprises me is, no one seems to have a problem with that, I can not find any post asking about how to make this work. And nothing about this in help either.
Who can lead me into the right direction here?
Or should I use another solution? I just want a product list, maybe 2-3 categories) and product detail view. Add to cart, Cart view and then a simple form for the address, who sends the order as an email, no real checkout/payment process.
I first tried the Articles 0.1.3 module, but its faulty, did not even show any entry fields in "add product".
Thanks in advance for any help.
Thom
[SOLVED] Products module / no images?
[SOLVED] Products module / no images?
Last edited by thomahawk on Fri Mar 14, 2014 8:23 am, edited 1 time in total.
Re: Products module / no images?
Just installed the module to check.
Think you need to add a Field Definition of type image.
And then when you add the product there's a tab 'Fields' where you can upload your image.
In templates you can use CGSmartImage to create a thumb of the image.
Think you need to add a Field Definition of type image.
And then when you add the product there's a tab 'Fields' where you can upload your image.
In templates you can use CGSmartImage to create a thumb of the image.
Re: Products module / no images?
Once again, velden raides to the rescue. Thank you!
Well, I have the image entry now under fields. So thats fine. But display it in the frontend, I could not. It appears in detail view, but not in the summary - which should be a products listing.
I took over this code which displays it in detail view
<img src="{$entry->file_location}/{$field->thumbnail}" alt="{$field->value}"/>
but its not working in the summary:
In detail view it displays correctly
...uploads/Products/product_3/thumb_resizedimage300417-Titel2010.jpg
In summary the links is not complete
...uploads/Products/product_3/
Is this an issue with Pretty URL? My first thought. But then, why does it work in detail view?
Well, I have the image entry now under fields. So thats fine. But display it in the frontend, I could not. It appears in detail view, but not in the summary - which should be a products listing.
I took over this code which displays it in detail view
<img src="{$entry->file_location}/{$field->thumbnail}" alt="{$field->value}"/>
but its not working in the summary:
In detail view it displays correctly
...uploads/Products/product_3/thumb_resizedimage300417-Titel2010.jpg
In summary the links is not complete
...uploads/Products/product_3/
Is this an issue with Pretty URL? My first thought. But then, why does it work in detail view?
Re: Products module / no images?
I don't know which fields are available in the summary action but you should note that the $field variable comes with a foreach loop:
You could try to use the foreach loop code from detail template or use it directly
If you don't know what fields are available try:
etc
Adding {debug} at top of summary template can be helpful too
Code: Select all
{foreach from=$entry->fields key='name' item='field'}
Code: Select all
<img src="{$entry->file_location}/{$entry->fields.IMAGEFIELDALIASIDONTKNOW->thumbnail}" alt=""/>
Code: Select all
<pre>{$entry|print_r}</pre>
Code: Select all
<pre>{$entry->fields|print_r}</pre>
Adding {debug} at top of summary template can be helpful too
Re: Products module / no images?
Thank you velden, this did it:
<img src="{$entry->file_location}/{$entry->fields.produktbild->thumbnail}" alt=""/>
<img src="{$entry->file_location}/{$entry->fields.produktbild->thumbnail}" alt=""/>
Re: Products module / no images?
but that is the functionality that is deprecated like you mentioned in the first post... So will be removed in a next release! Use CGSI instead.thomahawk wrote:Thank you velden, this did it:
<img src="{$entry->file_location}/{$entry->fields.produktbild->thumbnail}" alt=""/>
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Re: [SOLVED] Products module / no images?
I don't think you get the complete picture.
I THINK that "Image processing functions" means the functions that e.g. make a thumbnail version of the original image. It makes sense from CG's perspective to NOT implement those functions in each and every module.
Probably (remember: I don't know this module) there's a {$entry->fields.produktbild->value} too.
Then you can use CGSmartImage in your template(s) to create the thumbnail:
{CGSmartImage src1={$entry->file_location} src2={$entry->fields.produktbild->value} filter_xxx...} (read CGSmartImage help for all the options). That gives you much more flexibility. You can use different thumbnail sizes for every template, watermark images, everything CGSmartImage supports.
I THINK that "Image processing functions" means the functions that e.g. make a thumbnail version of the original image. It makes sense from CG's perspective to NOT implement those functions in each and every module.
Probably (remember: I don't know this module) there's a {$entry->fields.produktbild->value} too.
Then you can use CGSmartImage in your template(s) to create the thumbnail:
{CGSmartImage src1={$entry->file_location} src2={$entry->fields.produktbild->value} filter_xxx...} (read CGSmartImage help for all the options). That gives you much more flexibility. You can use different thumbnail sizes for every template, watermark images, everything CGSmartImage supports.