By drupaceous on
Hello,
I would like to add the possibility of adding a thumbnail to cart/view when the node is an image (added in turn to the store).
I know a bit of PHP and CSS, but I am new to drupal, so I would need some assistance on where exactly and how I could achieve this. Some hint to point me in the right direction would already be helpful.
The following archived email (http://lists.heydon.com.au/htdig.cgi/ecommerce-heydon.com.au/2006-April/...) seems to suggest that it is possible, but I'm afraid it's still too cryptic for me as a starting point...
So, where should I begin?
Thanks,
Comments
This is the function that
This is the function that displays the cart form. I put this in my template.php to override the original function. I added a column to display the thumbnail. Currently it just displays the string 'thumbnail'. Is there a simple variable I could substitute in order to display the thumbnail, something like
print $image[thumbnail]?I do already have the $nid in the function. So what could I do with this?
you're almost there..
I was searching for adding images to the shopping cart view form, found this thread and thought I would post how I did it using Drupal 5.1 and the ecommerce version 3.x-dev suite of modules.
Step 1: (with CCK and the imagefield.module for cck enabled) I added an image field to products under CONTENT MANAGEMENT -> CONTENT TYPES -> PRODUCT -> ADD FIELD. I called the field
product_imageso if you call it something else, you will need to edit the template.php theme override below to match what you called your imagefield.Step 2: create your template.php override.
Step 3: Copy that into an existing template.php file using a text editor like pspad or create a new template.php file if one doesn't exist andupload it to
yourthemenamefolder. I have set the thumbnails to be output at 100 x 100 pixels. You can change that in the template.php override to suit.In my template.php override, I have called the cck image field
product_imageremember to change that to match what you called the imagefield for your product nodes.I have also added a class name to the view cart table, so it's easier to style the contents using CSS after the template.php override is applied.
hope that helps others.
I am using Drupal 6.22 and
I am using Drupal 6.22 and eCommerce 6.x-4.4, your method doesn't seem to work for me, any ideas why? I am getting frustrated trying to add thumbnails, any help you could give would be a massive help!
_
this thread is 3 years old and based on d4.7-- the chances of it working as is are pretty much nil.