Hi there,
I have recently created a handful of images for my new magento site and I would like certain ones to appear on certain product pages, if they qualify.
These images display plus points such as:
- Eco Friendly
- Biodegradable
- Zero Plastic
I am wanting to create a block and have these appear on the product page when relevant.
Any pointers would be greatly appreciated. I’m wondering if there’s an image orientated attribute I can apply on a product level or something.
Hi @mgfrench and welcome.
You might find the following videos of some use:
They both go into Blocks and Widgets, which is what you’ll be utilising.
Hi,
Thanks for the response.
I’m pretty happy in handling blocks and widgets but i wondered if i could have certain of these “selling point” images appear only if they qualify.
Ie, i wouldnt want “plastic free” to appear on an item that has plastic in it.
Im thinking an if statement in a block / template above the info tabs that catches a certain image if an attribute exists. Just wondered if there was any built in functionality before i approach it this way.
Cheers
Mitch
Ah, gotcha. No, for that you’d want to create a custom module or build out a child theme. I’ve implemented things similar to what you’re after in the past by extending a child theme template such as a Product Page.
I don’t have walkthroughs for this, but you’ll find enough examples of things on https://magento.stackexchange.com to slowly piece everything together.
In fact, here are 2 times I’ve asked about IF statements and Attitudes that you may find useful when customising your own theme:
Thanks for the advice here.
I’ve managed to map a phtml file in a Block/Widget on my product page, but it seems to be throwing 500 internal server errors as soon as I add any php to the file.
Ever seen this happen?
Lots of things can cause a 500. Be sure to check your Magento logs as you’ll likely find something in there that will shed some light.