on 07-21-2014 12:34 PM
How I can have multiple thumbnail images for a product besides the primary image of a prodct on product details page.
Please suggest
we will be creating medias and media containers for holding medias. Then we will assign the media containers to the products.
Sample impex for all this is
INSERT_UPDATE Media;mediaFormat(qualifier);code[unique=true];@media[translator=de.hybris.platform.impex.jalo.media.MediaDataTranslator];mime[default='image/jpeg'];$catalogVersion;folder(qualifier) ;1200Wx1200H;/1200Wx1200H/1225857_4679.jpg;$siteResource/images/1200Wx1200H/1225857_4679.jpg;;;images ;1200Wx1200H;/1200Wx1200H/1225857_4764.jpg;$siteResource/images/1200Wx1200H/1225857_4764.jpg;;;images ;515Wx515H;/515Wx515H/107701-5509.jpg;$siteResource/images/515Wx515H/107701-5509.jpg;;;images ;515Wx515H;/515Wx515H/1099285-1035.jpg;$siteResource/images/515Wx515H/1099285-1035.jpg;;;images ;300Wx300H;/300Wx300H/107701-5509.jpg;$siteResource/images/300Wx300H/107701-5509.jpg;;;images ;300Wx300H;/300Wx300H/1099285-1035.jpg;$siteResource/images/300Wx300H/1099285-1035.jpg;;;images ;96Wx96H;/96Wx96H/107701-5509.jpg;$siteResource/images/96Wx96H/107701-5509.jpg;;;images ;96Wx96H;/96Wx96H/1099285-1035.jpg;$siteResource/images/96Wx96H/1099285-1035.jpg;;;images ;65Wx65H;/65Wx65H/107701-5509.jpg;$siteResource/images/65Wx65H/107701-5509.jpg;;;images ;65Wx65H;/65Wx65H/1099285-1035.jpg;$siteResource/images/65Wx65H/1099285-1035.jpg;;;images ;30Wx30H;/30Wx30H/107701-5509.jpg;$siteResource/images/30Wx30H/107701-5509.jpg;;;images ;30Wx30H;/30Wx30H/1099285-1035.jpg;$siteResource/images/30Wx30H/1099285-1035.jpg;;;images
INSERT_UPDATE MediaContainer;qualifier[unique=true];$medias;$catalogVersion ;897853_8772;/1200Wx1200H/897853_8772.jpg,/515Wx515H/897853_8772.jpg,/300Wx300H/897853_8772.jpg,/96Wx96H/897853_8772.jpg,/65Wx65H/897853_8772.jpg,/30Wx30H/897853_8772.jpg; ;553637-934;/515Wx515H/553637-934.jpg,/300Wx300H/553637-934.jpg,/96Wx96H/553637-934.jpg,/65Wx65H/553637-934.jpg,/30Wx30H/553637-934.jpg;
UPDATE Product;code[unique=true];$picture;$thumbnail;$detail;$others;$normal;$thumbnails;$galleryImages;$catalogVersion ;23210;/300Wx300H/23210.jpg;/96Wx96H/23210.jpg;;/515Wx515H/23210.jpg,/515Wx515H/23213.jpg,/515Wx515H/23231.jpg,/515Wx515H/65652.jpg,/65Wx65H/23210.jpg,/65Wx65H/23213.jpg,/65Wx65H/23231.jpg,/65Wx65H/65652.jpg,/30Wx30H/23210.jpg,/30Wx30H/23213.jpg,/30Wx30H/23231.jpg,/30Wx30H/65652.jpg;/300Wx300H/23210.jpg,/300Wx300H/23213.jpg,/300Wx300H/23231.jpg,/300Wx300H/65652.jpg;/96Wx96H/23210.jpg,/96Wx96H/23213.jpg,/96Wx96H/23231.jpg,/96Wx96H/65652.jpg;23210,23213,23231,65652;
Please follow this impex and create your set of images for products.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Using something similar, I am able to get the 2 images for thumbnails under the title aditional multimedia objects in HMC for that perticular product.
INSERT_UPDATE Listing;code[unique=true];$catalogVersion;$galleryImages;$picture;$thumbnail;$detail;$others;$normal;$thumbnails ;I10;;i10_1.jpg;/300Wx300H/i10.jpg;/96Wx96H/A1firstdrive3.jpg;;;/515Wx515H/i10.jpg;/96Wx96H/i10seats.jpg,/96Wx96H/A1firstdrive3.jpg
But on frontend it is giving only one thumbnail in scrollbar on productsdetail page
in controller productdata = productFacade.getProductForOptions(listingModel, Arrays.asList( ProductOption.BASIC, ProductOption.PRICE, ProductOption.SUMMARY,ProductOption.DESCRIPTION, ProductOption.GALLERY, ProductOption.CATEGORIES, ProductOption.REVIEW, ProductOption.PROMOTIONS, ProductOption.CLASSIFICATION, ProductOption.VARIANT_FULL, ProductOption.STOCK, ProductOption.VOLUME_PRICES,ProductOption.DELIVERY_MODE_AVAILABILITY)); for productdata it contails images array with 2 thumbnail images but one is with type gallary and other is with primary.getGalleryImages gives only one thumbnail
Use the productGallery attribute.
This contains a list of media container objects. Each media container holds an image in the various dimension formats.
The Accelerator hot folder feature provides a simplified way of importing these.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply. This is what i am trying to do
INSERT_UPDATE Media;mediaFormat(qualifier);code[unique=true];$media;mime[default='image/jpg'];$catalogVersion;folder(qualifier) ;96Wx96H;/96Wx96H/A1firstdrive3.jpg;$siteResource/96Wx96H/A1firstdrive3.jpg;;;images ;96Wx96H;/96Wx96H/i10seats.jpg;$siteResource/96Wx96H/i10seats.jpg;;;images INSERT_UPDATE Listing;code[unique=true];$catalogVersion;$galleryImages;$picture;$thumbnail ;I10;;i10_1.jpg,i10_11.jpg;/300Wx300H/i10.jpg;/96Wx96H/A1firstdrive3.jpg,/96Wx96H/i10seats.jpg please suggest how to do 2 thumbnail for same product
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.