• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: [SOLVED] Products module / no images?
PostPosted: Thu Mar 13, 2014 9:44 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Fri Jul 25, 2008 10:13 am
Posts: 290
Location: Zug, Switzerland
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


Last edited by thomahawk on Fri Mar 14, 2014 8:23 am, edited 1 time in total.

Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Products module / no images?
PostPosted: Thu Mar 13, 2014 11:09 am 
Offline
Dev Team Member
Dev Team Member

Joined: Mon Nov 28, 2011 9:29 am
Posts: 3121
Location: The Netherlands
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.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Products module / no images?
PostPosted: Thu Mar 13, 2014 1:55 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Fri Jul 25, 2008 10:13 am
Posts: 290
Location: Zug, Switzerland
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?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Products module / no images?
PostPosted: Thu Mar 13, 2014 3:49 pm 
Offline
Dev Team Member
Dev Team Member

Joined: Mon Nov 28, 2011 9:29 am
Posts: 3121
Location: The Netherlands
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:

\$1:
{foreach from=$entry->fields key='name' item='field'}


You could try to use the foreach loop code from detail template or use it directly

\$1:
<img src="{$entry->file_location}/{$entry->fields.IMAGEFIELDALIASIDONTKNOW->thumbnail}" alt=""/>


If you don't know what fields are available try:

\$1:
<pre>{$entry|print_r}</pre>

\$1:
<pre>{$entry->fields|print_r}</pre>

etc
Adding {debug} at top of summary template can be helpful too


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Products module / no images?
PostPosted: Fri Mar 14, 2014 8:23 am 
Offline
Power Poster
Power Poster
User avatar

Joined: Fri Jul 25, 2008 10:13 am
Posts: 290
Location: Zug, Switzerland
Thank you velden, this did it:

<img src="{$entry->file_location}/{$entry->fields.produktbild->thumbnail}" alt=""/>


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Products module / no images?
PostPosted: Fri Mar 14, 2014 11:47 am 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Apr 23, 2008 7:53 am
Posts: 7699
Location: The Netherlands
thomahawk \thomahawk:
Thank you velden, this did it:

<img src="{$entry->file_location}/{$entry->fields.produktbild->thumbnail}" alt=""/>
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.

_________________
$1

Did my post help you solving a problem at your (customers) website and it saved you many hours of work? Great!! Consider buying me a cup of coffee in return!



Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [SOLVED] Products module / no images?
PostPosted: Fri Mar 14, 2014 1:11 pm 
Offline
Dev Team Member
Dev Team Member

Joined: Mon Nov 28, 2011 9:29 am
Posts: 3121
Location: The Netherlands
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.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting