Magento2: How to add a small Icon image on product image in product view page in magento 2Base Image, Small Image, Thumbnail Image radio buttons are not selected after product images CSV importOverlap Product image By uploaded image in product view pageMagento 2: Add border-radius to image on product pageHow to get the upsell product Collection in list page in magento 2How to add a custom template for fieldset in ui-component form in magento 2How to add new div section in ko template(Checkoutpage payment section) in magento 2Magento 2 : Payment methods uncheck while clicking custom icon in checkout pageHow the upsell products handled in view page?How to resize product view page image on different devices in magento 2how to get the weight unit of the product from quote in magento 2
How can I find an old paper when the usual methods fail?
A trip to the library
What is a "soap"?
Pokemon Go: Gym Badge Over-completed?
Finding the shaded region
Escape Velocity - Won't the orbital path just become larger with higher initial velocity?
How to prevent criminal gangs from making/buying guns?
How can I communicate my issues with a potential date's pushy behavior?
Global BGP Routing only by only importing supernet prefixes
How can I shoot a bow using strength instead of dexterity?
Is it possible to know the exact chord from the roman numerals
Boss wants me to ignore a software API license
What would it take to get a message to another star?
Lípínguapua dopo Pêpê
How does the Athlete Feat affect the Ravnica Centaur playable race?
Help, I cannot decide when to start the story
"Mouth-breathing" as slang for stupidity
Good textbook for queueing theory and performance modeling
Why is there a large performance impact when looping over an array with 240 or more elements?
What is the most difficult concept to grasp in Calculus 1?
Why is the result of ('b'+'a'+ + 'a' + 'a').toLowerCase() 'banana'?
How come the Rambam forbids picking up money found in the street?
How did Arecibo detect methane lakes on Titan, and image Saturn's rings?
What is the prop for Thor's hammer made of?
Magento2: How to add a small Icon image on product image in product view page in magento 2
Base Image, Small Image, Thumbnail Image radio buttons are not selected after product images CSV importOverlap Product image By uploaded image in product view pageMagento 2: Add border-radius to image on product pageHow to get the upsell product Collection in list page in magento 2How to add a custom template for fieldset in ui-component form in magento 2How to add new div section in ko template(Checkoutpage payment section) in magento 2Magento 2 : Payment methods uncheck while clicking custom icon in checkout pageHow the upsell products handled in view page?How to resize product view page image on different devices in magento 2how to get the weight unit of the product from quote in magento 2
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I wish to add small icon image on the product image in magento 2.
- From which template the product image is loaded in product view page.
Please provide me a solution.
template product-images magento2.2.2
|
show 3 more comments
I wish to add small icon image on the product image in magento 2.
- From which template the product image is loaded in product view page.
Please provide me a solution.
template product-images magento2.2.2
You want that image, on Product detail's page only right ?
– Aditya Shah
May 19 '18 at 12:43
if my answer solves your concern then there is green right tick mark , hit that tickmark for right ansewer that will help future readers.
– Nikunj Vadariya
May 24 '18 at 9:33
Yes I want it in Product Details page @Aditya Shah
– Jaisa
May 25 '18 at 5:08
I need the exact template file to add my image icon, If you have an idea Please suggest me
– Jaisa
May 25 '18 at 5:18
Yes, got you !!
– Aditya Shah
May 25 '18 at 5:20
|
show 3 more comments
I wish to add small icon image on the product image in magento 2.
- From which template the product image is loaded in product view page.
Please provide me a solution.
template product-images magento2.2.2
I wish to add small icon image on the product image in magento 2.
- From which template the product image is loaded in product view page.
Please provide me a solution.
template product-images magento2.2.2
template product-images magento2.2.2
edited May 20 '18 at 7:31
JB Pakalapati
4033 silver badges19 bronze badges
4033 silver badges19 bronze badges
asked May 19 '18 at 10:42
JaisaJaisa
9482 gold badges11 silver badges50 bronze badges
9482 gold badges11 silver badges50 bronze badges
You want that image, on Product detail's page only right ?
– Aditya Shah
May 19 '18 at 12:43
if my answer solves your concern then there is green right tick mark , hit that tickmark for right ansewer that will help future readers.
– Nikunj Vadariya
May 24 '18 at 9:33
Yes I want it in Product Details page @Aditya Shah
– Jaisa
May 25 '18 at 5:08
I need the exact template file to add my image icon, If you have an idea Please suggest me
– Jaisa
May 25 '18 at 5:18
Yes, got you !!
– Aditya Shah
May 25 '18 at 5:20
|
show 3 more comments
You want that image, on Product detail's page only right ?
– Aditya Shah
May 19 '18 at 12:43
if my answer solves your concern then there is green right tick mark , hit that tickmark for right ansewer that will help future readers.
– Nikunj Vadariya
May 24 '18 at 9:33
Yes I want it in Product Details page @Aditya Shah
– Jaisa
May 25 '18 at 5:08
I need the exact template file to add my image icon, If you have an idea Please suggest me
– Jaisa
May 25 '18 at 5:18
Yes, got you !!
– Aditya Shah
May 25 '18 at 5:20
You want that image, on Product detail's page only right ?
– Aditya Shah
May 19 '18 at 12:43
You want that image, on Product detail's page only right ?
– Aditya Shah
May 19 '18 at 12:43
if my answer solves your concern then there is green right tick mark , hit that tickmark for right ansewer that will help future readers.
– Nikunj Vadariya
May 24 '18 at 9:33
if my answer solves your concern then there is green right tick mark , hit that tickmark for right ansewer that will help future readers.
– Nikunj Vadariya
May 24 '18 at 9:33
Yes I want it in Product Details page @Aditya Shah
– Jaisa
May 25 '18 at 5:08
Yes I want it in Product Details page @Aditya Shah
– Jaisa
May 25 '18 at 5:08
I need the exact template file to add my image icon, If you have an idea Please suggest me
– Jaisa
May 25 '18 at 5:18
I need the exact template file to add my image icon, If you have an idea Please suggest me
– Jaisa
May 25 '18 at 5:18
Yes, got you !!
– Aditya Shah
May 25 '18 at 5:20
Yes, got you !!
– Aditya Shah
May 25 '18 at 5:20
|
show 3 more comments
2 Answers
2
active
oldest
votes
1) Create media image attribute From admin menu, Stores > Attributes > product.
2) Get this attribute to your file.
<?php
$_product = $objectManager->get('MagentoCatalogModelProduct')->load($productId);
$attrImage = $_product->getData('my_logo');
if(isset($attrImage) && $attrImage != 'no_selection' )
$productImageAttr = $product->getCustomAttribute( 'my_logo' );
$productImage = $this->helper('MagentoCatalogHelperImage')->init($product, 'my_logo')->setImageFile($productImageAttr->getValue());?>
<img src="<?php echo $productImage->getUrl() ?>" alt="<?php echo $block->escapeHtml($product->getTitle()) ?>" />
<?php ?>
In Which template is responsible to add my icon image to display on product image
– Jaisa
May 25 '18 at 5:14
add a comment |
This will work for you, Just add image tag to display custom attribute
in product listing page.
- From this you can add attribute name you want to create as They have given Diamond icons and then select Catalog Input Type as Media image. Now save the attribute.
Let me know if if you have any query.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f226698%2fmagento2-how-to-add-a-small-icon-image-on-product-image-in-product-view-page-in%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
1) Create media image attribute From admin menu, Stores > Attributes > product.
2) Get this attribute to your file.
<?php
$_product = $objectManager->get('MagentoCatalogModelProduct')->load($productId);
$attrImage = $_product->getData('my_logo');
if(isset($attrImage) && $attrImage != 'no_selection' )
$productImageAttr = $product->getCustomAttribute( 'my_logo' );
$productImage = $this->helper('MagentoCatalogHelperImage')->init($product, 'my_logo')->setImageFile($productImageAttr->getValue());?>
<img src="<?php echo $productImage->getUrl() ?>" alt="<?php echo $block->escapeHtml($product->getTitle()) ?>" />
<?php ?>
In Which template is responsible to add my icon image to display on product image
– Jaisa
May 25 '18 at 5:14
add a comment |
1) Create media image attribute From admin menu, Stores > Attributes > product.
2) Get this attribute to your file.
<?php
$_product = $objectManager->get('MagentoCatalogModelProduct')->load($productId);
$attrImage = $_product->getData('my_logo');
if(isset($attrImage) && $attrImage != 'no_selection' )
$productImageAttr = $product->getCustomAttribute( 'my_logo' );
$productImage = $this->helper('MagentoCatalogHelperImage')->init($product, 'my_logo')->setImageFile($productImageAttr->getValue());?>
<img src="<?php echo $productImage->getUrl() ?>" alt="<?php echo $block->escapeHtml($product->getTitle()) ?>" />
<?php ?>
In Which template is responsible to add my icon image to display on product image
– Jaisa
May 25 '18 at 5:14
add a comment |
1) Create media image attribute From admin menu, Stores > Attributes > product.
2) Get this attribute to your file.
<?php
$_product = $objectManager->get('MagentoCatalogModelProduct')->load($productId);
$attrImage = $_product->getData('my_logo');
if(isset($attrImage) && $attrImage != 'no_selection' )
$productImageAttr = $product->getCustomAttribute( 'my_logo' );
$productImage = $this->helper('MagentoCatalogHelperImage')->init($product, 'my_logo')->setImageFile($productImageAttr->getValue());?>
<img src="<?php echo $productImage->getUrl() ?>" alt="<?php echo $block->escapeHtml($product->getTitle()) ?>" />
<?php ?>
1) Create media image attribute From admin menu, Stores > Attributes > product.
2) Get this attribute to your file.
<?php
$_product = $objectManager->get('MagentoCatalogModelProduct')->load($productId);
$attrImage = $_product->getData('my_logo');
if(isset($attrImage) && $attrImage != 'no_selection' )
$productImageAttr = $product->getCustomAttribute( 'my_logo' );
$productImage = $this->helper('MagentoCatalogHelperImage')->init($product, 'my_logo')->setImageFile($productImageAttr->getValue());?>
<img src="<?php echo $productImage->getUrl() ?>" alt="<?php echo $block->escapeHtml($product->getTitle()) ?>" />
<?php ?>
answered May 24 '18 at 9:32
Nikunj VadariyaNikunj Vadariya
3,0431 gold badge9 silver badges25 bronze badges
3,0431 gold badge9 silver badges25 bronze badges
In Which template is responsible to add my icon image to display on product image
– Jaisa
May 25 '18 at 5:14
add a comment |
In Which template is responsible to add my icon image to display on product image
– Jaisa
May 25 '18 at 5:14
In Which template is responsible to add my icon image to display on product image
– Jaisa
May 25 '18 at 5:14
In Which template is responsible to add my icon image to display on product image
– Jaisa
May 25 '18 at 5:14
add a comment |
This will work for you, Just add image tag to display custom attribute
in product listing page.
- From this you can add attribute name you want to create as They have given Diamond icons and then select Catalog Input Type as Media image. Now save the attribute.
Let me know if if you have any query.
add a comment |
This will work for you, Just add image tag to display custom attribute
in product listing page.
- From this you can add attribute name you want to create as They have given Diamond icons and then select Catalog Input Type as Media image. Now save the attribute.
Let me know if if you have any query.
add a comment |
This will work for you, Just add image tag to display custom attribute
in product listing page.
- From this you can add attribute name you want to create as They have given Diamond icons and then select Catalog Input Type as Media image. Now save the attribute.
Let me know if if you have any query.
This will work for you, Just add image tag to display custom attribute
in product listing page.
- From this you can add attribute name you want to create as They have given Diamond icons and then select Catalog Input Type as Media image. Now save the attribute.
Let me know if if you have any query.
answered May 25 '18 at 10:58
Aditya ShahAditya Shah
5,2172 gold badges12 silver badges45 bronze badges
5,2172 gold badges12 silver badges45 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f226698%2fmagento2-how-to-add-a-small-icon-image-on-product-image-in-product-view-page-in%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You want that image, on Product detail's page only right ?
– Aditya Shah
May 19 '18 at 12:43
if my answer solves your concern then there is green right tick mark , hit that tickmark for right ansewer that will help future readers.
– Nikunj Vadariya
May 24 '18 at 9:33
Yes I want it in Product Details page @Aditya Shah
– Jaisa
May 25 '18 at 5:08
I need the exact template file to add my image icon, If you have an idea Please suggest me
– Jaisa
May 25 '18 at 5:18
Yes, got you !!
– Aditya Shah
May 25 '18 at 5:20