showing thumbnails on the "Products" list

Events happening in the community are now at Drupal community events on www.drupal.org.
AndriaD's picture

I'm wondering how I can get thumbnails of images that are attached to file products to display on the page that shows when you click the "Products" link. I get the image and thumbnail just fine when an individual product is clicked, but I want a thumb display on the "Products" page.

I'm using Drupal 5.7, eC3.4, and the Image module 5.x-1.7.

Is there any way of doing this?

BTW, I tried Ubercart before I tried eC, not knowing that uber was still a beta release, and I have to say, eC installed like a dream, comparatively speaking. More problems understanding uber, getting it to work, that I can shake a stick at. So I hope I can get thumbnails to show in the Products list, or I might have to go back to pulling my hair out over uber. groan

Thx much,
Andria

Comments

Views!

jax's picture

The product page is a page that was defined by the developer with some configuration options. You cannot choose which additional node fields are displayed in the product page.

With views (and I think you have to activate EC views) you can build your own view and therein define that you want to show the thumbnails. If you've never tried views I recommend you try it out, it's pretty good at building custom "views" of your nodes.

http://drupal.org/project/views

that's good news!

AndriaD's picture

That's very good news; I have the "views" module, though when I first installed it I wasn't precisely sure what I needed it for; I think I probably have a better shot at understanding Views than in getting ubercart to work properly. :D

Thx!!
Andria

Try views anyway

drew reece's picture

Hi,

I tried Ubercart and it has some nice feature, but its still in beta, so I'm sticking with eCommerce for now. You may want to enable the views module and give it a try, since it allows you to decide what feilds to show in a node view, a list, a block.

It has lots of use for other node types too, combined with CCK (Content Construction Kit) it allows for a lot of customization beyond basic setup. I think the EcViews module has a products list view that appears when you enable it.

Drew

yep it works great

AndriaD's picture

I did get Views installed and setup, and it works great for showing those thumbnails!

However if I can't get some help about setting up eC with Paypal, I may still have to go back to Ubercart, or even set up some third party thing like os-commerce. I can't get responses from anyone anywhere about those URLs in eC's paypal setup page.

Thx!
Andria

ec with paypal

cwittusen's picture

Andria:
Please elaborate on what you need assistance with regarding ec and paypal because I don't see anything in this post about it; I tried out ec but changed over to ubercart and I found installing and configuring ubercart very easy and it integrates with paypal easier and with paypal sandbox as well much easier . The pros for ec is that it can take any content type and make it into a product while ubercart is still working on that; however, if you are looking to sell tangible products then ubercart does a very good job.

Regards,
Chris W

Regards,
Chris W

views

msosin's picture

Ok, so could anyone be so kind and tell me step by step, how can I enable or create thumbnails in eC on the products main page??

Or maybe there's a manual about that?

Thanks in advance

Kind Regards

..::Michal

..::Michal

@Michal. You need to use the

drew reece's picture

@Michal.
You need to use the ecViews module (included with ECommerce) and views. You will also need to use CCK module (content construction kit) to add a product 'image_field' to the 'product type' you are using in your store.

The view will be responsible for finding all the products that fit whatever criteria you set. It will display them as full nodes or as teasers, or lists of fields.

Start with a test site and add a few feilds to a content type and use views to display it. There is a lot of info on views & cck on drupal.org and a basic tutorial is here http://drupal.org/node/144725. Views is complex but worth the effort to learn to harness its power.

Good luck.
Drew

using module image instead of imagecache

AndriaD's picture

Actually, for the site that instigated this whole thread, I'm not using Imagecache, I'm using Image, and it works just fine; it's also very easy to use, which certainly can't be said for 'Views' -- though I'm starting to get a handle on that too (JUST starting to!). That thing is way powerful, but it's also not very transparent to those just arrived to it.

Andria

Views can be tricky…

drew reece's picture

It's worth using the theme wizard and the 'export view' tab to back up any view that you have working. Just save to a text file and keep incase the next settings you try break the view.

There are a few videocasts (Lullabot.com, theartlab.net) on using views and cck, worth checking out if it makes no sense.

The main benefit to image cache over image is the multiple image sizes for any images. So you can have a preview on a list view and a large image in the full node. You can also alter the preset and the images get regenerated to the new size on next request. You get the different preset sizes as a select list in the views fields settings. Oh yeah, it crops too.

Drew

almost there.

msosin's picture

@Drew: It looks like you know exactly what I am looking for. Could you please put some more light on that? Especially "You need to use the ecViews module (included with ECommerce) and views. You will also need to use CCK module (content construction kit) to add a product 'image_field' to the 'product type' you are using in your store."

I play with views at the moment, there are some defined structures, but nothing that would make me happy.

How can I use CCK to add a product image field? I learn on examples, if you could be so kind and provide me a brief manual, what should I do, I could probably extend that in the future, and offer my humble help to others, that are struggling with the same thing.

As you can see, I am a newbie to Drupal, but I really enjoy it, and would like to start doing useful things. I just need some help to start up :)

Thanks in advance
..::Michal

..::Michal

A few tutorials for cck & views

drew reece's picture

If possible create a test site for each example, so it becomes clear what each combination of modules is doing.

Create an image gallery using only CCK and Views…
http://drupal.org/node/144725

Image and Image Exact Sizes vs. Imagefield and ImageCache
http://www.lullabot.com/articles/image_and_image_exact_sizes_vs_imagefie...
extra follow-up to above …
http://2bits.com/articles/drupal-using-imagecache-with-views-and-cck-ima...

How to build Flickr in Drupal
http://www.lullabot.com/articles/how_to_build_flickr_in_drupal

Other useful stuff is on http://theartlab.net/ and also the Drupal documentation - http://drupal.org/handbooks and don't forget to google for "drupal cck views and ecommerce" etc…

In answer to your question.
CCK - modules
There are lots of modules for adding various 'fields' in cck. Ones for images (eg imagefield), ones for video or sound, another for links…
Install imagefield and you can then edit your 'content types' (Content Management>Content Types) and add fields. Start by adding an image feild to the product type and then get it to appear in a view.
CCK requires a few modules to be useable so read any warnings when installing & add/enable any modules it asks for.

Views - modules
ECommerce comes with other modules, such as flexicharge, paypal, ec_views, invoice etc… turn on EC_views and you get to use the fields inside your views from any products you have. Obviously turn on a product type that fits your needs (eg Tangible = things that ship & have stock control, Generic = services that don't need shipping or stock control)

I think the ec_views module adds the 'products listing view', but I'm not 100% certain, it could be created by another ec_… module, use this as a starting point, clone it after enabling in the 'Site building>Views' page and see what editing does to it.
If you choose list view you get an unordered list (<ul> </ul>) with whatever fields you add. It looks ugly until you theme it, but it is where the power of views is.

Theming Views
Theming views involves using the 'views theme wizard' (another module to enable) to create a .tpl file and a .css file named after the view eg views-list-'YOUR_VIEW_NAME'.tpl and .css. Copy the code to files inside the sites theme folder and then you can style the items. FWIW the .tpl file gets used for every individual node that the view finds and this gets wrapped inside the <li> </li> tags. Firefox's Firebug addon really helps with the theming.

I'd recommend getting to grips with cck, views and views theming, before trying to get image_cache set up, since image_cache has an odd interface that is confusing at the start. When you do create image_cache presets, name them once and don't change the preset name, or the fields will be broken in any views that use that preset.

Once you learn views, you'll realize there is probably 3 ways to get things done :)

HTH,
Drew

Fantastic

msosin's picture

Thanks Drew,

I wouldn't expect that! Great job!

In the other hand, there is so much work and effort to gain such small effect like pictures of the products...

thanks again

Kind Regards,

..::Michal

Edit: That's so obvious now! Thanks Drew, if you didn't help me, I would probably be looking now for another solution!

Good Man!

..::Michal

Great…

drew reece's picture

… Views an CCK are scary, but too powerful to avoid.

It's worth all the 'WT*' moments you go through, so that it sinks in and it becomes impossible to imagine a site without Views & CCK :)

Glad to be of help.

Drew

e-Commerce Module

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: