💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
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