microdata - Shopware 丰富的代码片段增加了产品问题
问题描述
我在我的商店使用 Shopware 5.5.10。我尝试为谷歌搜索控制台的每个产品设置“priceValidUntil”,因为它有警告。
5.5.8 版更新中告知的商店软件
priceValidUntil
为、url
和增加了丰富的image
片段gtin13
我在 details/index.tpl 中有以下部分
{block name='frontend_detail_index_buy_container_inner'}
<div itemprop="offers" itemscope itemtype="{if $sArticle.sBlockPrices}http://schema.org/AggregateOffer{else}http://schema.org/Offer{/if}" class="buybox--inner">
{* Product name *}
{block name='frontend_detail_index_name'}
<h1 class="product--title" itemprop="name" style="margin: 0px 0px 20px 0px; margin: 0rem 0rem 1.25rem 0rem;">
{$sArticle.articleName}
</h1>
{/block}
如何将“priceValidUntil”丰富片段添加到我的产品中?
解决方案
Shopware 没有允许您配置时间控制价格的功能。因此,只有一个模板块,提供此功能的插件可以在其中添加丰富的片段。由于仅在价格将在一定时间后停止的情况下才推荐使用该代码段。
您可以像这样添加自己的数据:
{extends file="parent:frontend/detail/content/buy_container.tpl"}
{block name="frontend_detail_index_data_price_valid_until"}
{$smarty.block.parent}
<meta itemprop="priceValidUntil" content="your-time" />
{/block}
这些是商店用品模板教程中描述的简单模板调整。不建议按正常价格使用,因为它们不会在特定时间结束。
//编辑:
在产品详细信息页面上,shopware 将自动使用产品的第一张图片。不需要调整 - 如果您想更改此行为,您可以使用之前的语法并更改您想要覆盖的块。
与 ean 相同。Shopware 将使用 Ean 字段作为 gtin 并检查输入的长度。您可以使用简单的模板调整来覆盖此逻辑。
评级也是如此。
推荐阅读
- python - Keras / Tensorflow:带减法的损失函数 -
- r - dplyr 基于多重过滤为列赋值
- reactjs - 无法在 React 中映射数组
- string - 如何计算 bash 变量中的行数,尊重空虚?
- reactjs - Moxios 不使用存根请求
- c - 分段错误(核心转储) C
- html - 图片左侧的图片说明
- ios - SwiftUI - 添加阴影会扰乱 TextField 的交互性吗?
- julia - 如何测试标准输入是否在 Julia 中有可用的输入?
- crashlytics - 在 iOS 中使用 FirebaseCrashlytics(FIRCrashlytics) 框架时出现链接器错误