Suppose I have a clothes e-commerce and I have a Clothes attribute set with clothing_size. The e-commerce manager wants to be able to attach an image to the product that will display some laundry instructions.
I thought I could accomplish that by creating an attribute typed 'Image Media' and add it to the Clothes attribute set.
I set it as:
Code: launtry_instructions_image
Scope: Global
Entry type: Media Image
Apply to: [Simple Product, Configurable Product]
I hoped that would give the store manager a file input so he could upload an image, but I was wrong. Nothing changed.
Am I missing something or there's no simple way of accomplishing that?
Thnak you in advance.
Edit
As #marius pointed out this input will be placed in the Images tab.
I was able to get the image by
$this->helper('catalog/image')->init($product, 'laundry_instructions_image');
Thanks!
The new image attribute should appear as a column inside the Images tab.
Related
I am using magento (1.8.1.0) configurable product with size and color attributes. I want to change the main-image on configurable-product view as per the options chosen Like If I choose red-color then image of associated-product which has red color attribute value should display on main-image as soon as I choose the option.
How can i do this??
You can use the Simple Configurable Products extension for this.
http://www.magentocommerce.com/magento-connect/simple-configurable-products.html
This extension is not updated for latest version, so you need to do some changes that you can read from the extension reviews.
By default in Magento for product images exist column "Base image". But it doesn't exist in my project, probably someone deleted it or something like that.
How to return it?
Should be
This is image system attribute and user can not delete this from admin panel. Please check in your current attribute set from Attributes >> Manage Attribute Sets. It may be possible by mistake someone drag this in another group.
You need to drag image attribute in Images attribute group to resole the issue.
How can i separate, medias for different stores in Magento? For example: I have two stores "Store1", and Main Website Store by default. When i upload any image or something else on Store1, image has been stored in default media folder.
So my question is, is there any way to local storage for Store1 can be other media, that is not default? Thank you.
In Magento you can select different image for different website or store view. It works in the same way of the others field. From the admin interface, when you are on a product page, switch on your desired store view using the combo box on the left, then from the image section, uncheck the checkbox "use default value" and select the image that you want to display as base image, small image and thumb, relative to active store view. Than, if you want that an image is unavailable in your store view, you can use the "exclude" checkbox. If you are searching something to completely separate images, I think that Magento by default doesn't have this feature. I hope that's useful.
If you edit a product and browse to the media gallery, you will notice that each type of image (Base, small, thumbnail) is a radio button. Furthermore, if you create your own product attribute and assign it to the product, it too is a radio button.
The intended functionality I would like is to upload many images and assign it to that attribute. I am creating a gallery on product view pages, and each product has an arbitrary amount of images.
I would like to know if there is an easy way to do it, and if not, what the best solution would be. I am running Magento 1.6.0 for this project.
If you upload images and do not assign them as base/small/thumb, then Magento will automatically create an image gallery for you on the product page. you could also extend the catalog/product/list.phtml to display a gallery on the category and search results listing if you wanted.
So, AFAIK, there's no need for you to change the application functionality in the way that you describe.
In magento you can set an image to a category which is shown above products.
Is it possible to use the category image as the default product image instead?
If a product has an image it'll use it but if it doesn't and its first category has an image it will use it.
The simplest way is to override the product block and template and to find the category and image for each product without an image but that will add many queries. For category view I can make one query but for search result I'll have to make one query per product because each product can be from a different category.
Is there a better way to do it?
Maybe with custom category design or overriding indexes?
Thanks
The helper usually used to generate those images (Mage_Catalog_Helper_Image) has a method placeholder($filename) that should set the placeholder image URL. You should be able to set that image before displaying the category products to use the category image as the placeholder image.
Hope that helps!
Thanks,
Joe
To complete Joseph and Pablo answer, on Magento 1.9.1, it is used in the __toString() method of the helper.
Note that when calling $this->helper('catalog/image')->placeholder($placeholder), $placeholder is a relative file path in the skin directory, so it can barely be used for your problem (mine neither, I'll do with your solution :) )