宇讯一资源

add video to product

发布于2020年06月03日 | 暂无评论 | 90阅读 | magento
  1. Create one attribute under admin panel > catalog > attributes > create the attribute on the name of the video

要在产品列表里显示要把attribute添加到对就的Attribute Sets\Groups里面

2、By using , you can get that data   //    \app\design\frontend\模板\default\template\catalog\product\view.phtml

<iframe width="100%" height="auto" src="<?php echo $_product-> 
 getData('video'); ?>" frameborder="1" allowfullscreen></iframe>  //(video) Attribute Code
  1. youtube.com

视频分享获取 <iframe width="560" height="315" src="https://www.youtube.com/embed/Ep77pqUmjwI" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

把对应的  https://www.youtube.com/embed/Ep77pqUmjwI 输入对应产品的属性值

暂无评论

发布评论