I need to update my database of products to mark the "base" image of every product as Excluded. Some products have 1 image, some have more than 1. In each case one image is marked as being the Base, Small and Thumb image. In every case, where an image is marked as such, I need it to be excluded from the gallery.
Currently, without it being excluded, that image will show up twice in the lightbox gallery (Magento 1.4.0.1).
Does someone know the database structure well enough to give me a mySQL solution to update this?
I can manage future new products easily enough, but there's no way I'm running through 22000 products manually! :-)
Thanks in advance!
The SQL to do this in Magento 1.4.0.1 is:
UPDATE `catalog_product_entity_media_gallery_value`
SET Disabled = 1
WHERE Position = 1
I agree that updating the gallery code would have been a good/better solution, but in my case I am easily able to keep on top of this as new products are added in future.
It is easier to update your gallery code to exclude the first image you also do not have an ongoing need to update the product images.
Related
I have a test site where some imported product images are not being displayed on the category view or the search view.
It does however show up on the product page.
These products were imported / updated to reflect new images.
Category view
http://sales.magentocommerce.net.au/index.php/irrigation/driptube.html
Product view page
http://sales.magentocommerce.net.au/index.php/irrigation/driptube/221002-drip-eze-pc-13mm-2l-h-0-3m-50m.html
Other products whose images were uploaded manually is showing up.
All cache has been cleared and disabled in Magento.
What else am I missing.
I suspect the database records got screwed up somewhere on these products.
I am running out of ideas to what else to look out for and need a fresh pair of eyes.
Magento ver. 1.9.0.1
It sounds like you forgot to reindex your data.
Go to System -> Index Management, click select all (or at least select the first four indexes) and then press submit to reindex.
I note your image is almost 2MB. On my shared hosting with 1and1, I cannot use such large images as Magento's image processing (eg producing thumbnails) falls over as it runs out of memory. I therefore have to preprocess any large images to shrink them down to something my Magento can handle.
One other thing, png files tend to be significantly larger than jpg files.
how can we show associated simple product information of configurable product in product view page in magento.like sku number of simple product should be shown when we select an option from the drop down of configurable product in product view page.
I would also suggest the Simple Configurable Products extension http://www.magentocommerce.com/magento-connect/simple-configurable-products.html. There are some tweaks you need to make for recent versions of Magento but it works perfectly for me in 1.8.1.
Update with pointer to tweaks
I've pasted in below a review comment by tzvimoshe from the magentocommerce.com entry for SCP.
To get this to work in 1.7 you need to 1) apply fix from Github AND 2)
apply the fix to that as well. See 1)
https://github.com/magdev/magento-configurable-simple/blob/6d88e5e1846713f579f79905dc3ed35112772ebc/app/code/community/OrganicInternet/SimpleConfigurableProducts/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Configurable.php
2)
https://github.com/organicinternet/magento-configurable-simple/pull/85
For everyone's convenience I have posted the complete fix on pastebin.
See http://pastebin.com/spVj88T4 just paste into app / code /
community / OrganicInternet / SimpleConfigurableProducts / Catalog /
Model / Resource / Eav / Mysql4 / Product / Indexer / Price /
Configurable.php
This is a pretty big thing you are asking here.
I don't have a complete solution, but I can give you a nudge in the right direction.
I recommend you this extension.
It does not do what you need, but instead it changes the product dropdowns to clickable labels. This feature can be disabled if your don't need it.
But here is what you might be able to use from it.
When changing a product configuration, it changes the configurable product image if you configure it to do so.
You can take it and modify it so when it changes the image it changes also the name and/or sku.
This is the line that changes the product image: https://github.com/tzyganu/Switcher/blob/master/js/easylife_switcher/product.js#L274.
You can inject your logic there to change the sku or name also.
This is the line that collects the simple product images: https://github.com/tzyganu/Switcher/blob/master/app/code/community/Easylife/Switcher/Block/Catalog/Product/View/Type/Configurable/Config.php#L136.
You can add a similar one that would collect all your skus and/or names.
After that you will need to add some markup around the name or sku so you can easily identify it in the DOM with js.
I hope this helps you at least a little.
The problem I'm having is that I import products with Magmi (magento product import open source solution), but I don't see the product image on the front end. I need to know which table in magento database contains image names so that I could maybe feed it somehow directly...
catalog_product_entity_varchar
The table above stores the values that will link your images, but you need check first with the eav_attribute table to find the correct attribute_id key that will reference the image. While this answers your question, I want to remind you that making database changes directly is strongly discouraged. Hope this makes sense.
catalog_product_entity_varchar references the attributes for base_image, small_image & thumbnail along with other attributes requiring an image.
To find all of the images associates with a product we found all of the images listed within catalog_product_entity_media_gallery. This helped us find all duplicate images uploaded
--
We have also used this post to find/fix missing images after a product uploads
http://www.blog.magepsycho.com/tag/catalog_product_entity_media_gallery/
But as already mentioned, use with caution!
catalog_product_entity_media_gallery_value_to_entity is what you'll have to use to reference which product ties to which image.
i’m new to magento and was wondering if someone can help me.
i have a product that comes in multiple colors, but if i set it up as a configurable product it just gives the user the option of choosing a different color (but doesn’t show an image to him/her)
what i would like to do is have the other colors appear underneath just like up sells would (the same design)
if anyone can help me i would greatly appreciate it
Use the Simple Configurable Products extension by Organic Internet, as available for free on Magento Connect and your problem should be solved.
One way to accomplish this is to store images for each color of the project. With JS, you could auto-select color options on the page, and still make use of a configurable product for this purpose. You'll need to do significant template alteration to make this work.
Another approach is to use simple products (which you've already created in this case), and list them directly in the catalog. With Magento's cross-sell functionality, you can tag the products to each other and provide links between product pages for each color. Obviously, this involves more navigation for the user, but does allow you to manage each product independently.
Both of these methods will retain normal product relationships and track inventory for each color of a product, so they are preferable to solutions that involve hacking the framework.
Hope that helps!
Thanks,
Joseph Mastey
We've just done a mass import. We have allot of products showing up without images and we need to prevent that. There not supposed to have images or show but we can't set them to "Not visible anywhere" in the CSV.
So if images = 0 don't show anywhere.
Any help is greatly appreciated. Thanks in advance.
You can modify the category collection so that it only loads Products that have images. If you use flat tables (recommended), it should not be very difficult to add a filter method to the collection Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Collection.
A more dirty but easier way would be to just not display the products without images in the product listing template (app/design/frontend/templates/catalog/product/list.phtml). The image helper is used there to display the product images. Whenever the default image is about to be shown, you could continue to the next product. But remember, that the products without images are loaded anyway, which is really dirty.
Try putting "Not Visible Individually" in the "Visibility" column of your CSV whenever the "image" column is empty.