How to add Youtube video to product details page in magento
1. Add an attribute called video_embed_code
2. Add the attribute into your products’ attribute sets.
3. Fill in youtube embed codes into these attributes.
4. Where you want to render the videos, place the following code:
<div><code> <div class='youtube-vid'> <?php if ($_product->getData('video_embed_code')): ?> <?php $youtubevid= $_product->getResource()->getAttribute('video_embed_code')->getFrontend()->getValue($_product); ?> <?php echo $youtubevid; ?> <?php endif; ?> </div> </code></div> <div>
now enjoy magento
for more info visit mage-people
Advertisements
Wonderful paintings! This is the kind of information that should be shared across the internet. Shame on Google for no longer positioning this publish upper! Come on over and discuss with my site . Thank you =)
I’m not that much of a internet reader to be honest but your sites really nice,
keep it up! I’ll go ahead and bookmark your website to come back later. Cheers