Product media gallery API - magento

I am working on a product page and need to create two separate galleries - one main gallery and additional one. Currently I output images with empty label on main gallery and images with specific prefix on additional one.
Is there a way to query only images labeled by specified label? I found only getMediaGalleryImages method which doesn't do anything specific.
Or maybe there is just the other way to work with the gallery?

By default there is no way to query images based on a labels or other conditions except for the main and thumbnail options. We use the following setup:
Get a list of all images for the product
Itinerate through each finding out all the details and sorting inside two arrays.
Going through each array for each gallery and outputting the images inside the right tags.
Aother way of doing this would be to extend the product model and adding another gallery field. But that's IMO much too complex for something this simple.

Related

If no image, show no product: shopify

I think this one is pretty easy but cannot quite wrap my head around it.
Pretty straight forward command, since I am working with no completed database I'd like to show products only if they have at least one image associated with them.
Shortly, I'd need something like: if product doesn't have an image, then hide product.
How would I go about this on Shopify? Many thanks
There is no straight forward way to hide it using the settings. However since Shopify is extensible product. You can write your own plug-in to hide.
Another simple way is it to export your products as CSV. Open it in Excel and set the Hidden column's value based on the Image column's value, such that if Image column is blank Hidden column's value is true. You can use a formula for that.
Once done save the CSV and import it back in to your Shopify.

image style depend on taxonomy term drupal 7 on a view

i have a view to list all users in the site ,i want to change the user picture display style depending on the users's category(which is a taxonomy term) i have tried to add CSS class to the picture with the name of the category(via rewrite field) but that will re-size image on the fly and this will first increase load time second image may be pixeled any suggestions on how to make this available .
I can only suggest creating a PHP field and have a condition there.

How to display list of content items using Telerik Grid component

I'm begginer in the Orchard CMS.
I would like to create Content Type composed from different parts and fields which I know before. I want this content type to be enumerable ie I use content part List, I want to list it using telerik components.
For example my content type is Product and I specify its fields: Price, SKU apart from default: user(who created it) and creation time fields. Moreover the product contains also image gallery, ie image gallery content part.. I want the list of products to be shown using Telerik component Grid, including creation time and user name.
Is it better to create the whole module specifying all its fields(price,SKU) and its templates or is there any way to just take what has been already created in orchard as a content type and display it different way(using telerik)..
thanks for any advice ;)
Tomas
It appears this topic was moved and answered here:
http://orchard.codeplex.com/discussions/371276

com_zoo related items depend on category

What I really want is to have in my com_zoo app items description page a custom block what is showing the related items to clicked one. So one I found out, that it can be made it manually adding to every specific item the related items. The problem is that is not generated dynamically.
My question would be:is it possible from the actual administration tasks to handle this or it has to be coded. If it has to be code, what is the shortest way to achieve results. should I build a custom element or there is another way to do it?
thanks
Your related products module may be based on your product tags, for example.

Data binding controls in asp.net

I have to display a set of data in the following manner:
Which ASP.NET 3.5 control best matches my requirement?
If one matches, could you please give me an idea about how to format it to view like the image?
Well, first off you have multiple blocks (multiple rows) so I would suggest a Repeater. Within each block you must display three columns (the image the text and the small images), and you should use a Panel (renders as a ). In the second panel you have multiple lines of text for which you can use Labels because they allow for rendering as a so that you an include a class.
Style everything nicely with CSS and you should be able to remake the above picture.
I think repeater control would be fine for your requirement.

Resources