Magento 2 - 获取日期属性的值
Magento 2 - Get value of date attribute
我已经创建了一个日期属性,我如何获取该值以显示在前端?
我们已在以下文件路径中签入默认亮度主题
vendor/magento/module-catalog/view/frontend/templates/product
在产品列表页面,我们检查了产品名称下的foreach循环内部-
您可以像那样获取自定义日期属性值-
$_product->getCustomattributecode();
其中 "customattributecode" 是您的日期类型属性代码。
我已经创建了一个日期属性,我如何获取该值以显示在前端?
我们已在以下文件路径中签入默认亮度主题
vendor/magento/module-catalog/view/frontend/templates/product
在产品列表页面,我们检查了产品名称下的foreach循环内部-
您可以像那样获取自定义日期属性值-
$_product->getCustomattributecode();
其中 "customattributecode" 是您的日期类型属性代码。