多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
1.创建布局文件catalog_product_view.xml ~~~ <?xml version="1.0"?> <!-- /** * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ --> <page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <head> <css src="mage/gallery/gallery.css"/> </head> <update handle="catalog_product_opengraph" /> <update handle="page_calendar"/> <body> <container name="abc"> <block name="aaa" before="product.info.description" class="Njzz\BlockExtend\Block\Cms\Index\Product" template="Njzz_BlockExtend::cms/index/product.phtml"> </block> </container> </body> </page> before="product.info.description":在那个block页面前加东西product.info.description 是block名 class="Njzz\BlockExtend\Block\Cms\Index\Product":block template="Njzz_BlockExtend::cms/index/product.phtml":模板 ~~~ 2.创建模板 3.创建block