thelia / google-shopping-xml-module
3.0.0
2023-03-23 11:10 UTC
Requires
- thelia/installer: ~1.1
README
此模块允许您通过XML格式将您的目录导出到Google Shopping。
安装
手动
- 将模块复制到
<thelia_root>/local/modules/
目录,并确保模块名称为GoogleShoppingXml。 - 在thelia管理面板中激活它
Composer
在您的thelia composer.json主文件中添加它
composer require thelia/google-shopping-xml-module ~1.2.0
使用
有关如何使用该模块的解释,请参阅后台管理中的模块配置。
事件
NEW ! (>1.2.0)
现在,您可以通过类似以下方式的事件添加自己的字段:
class GoogleShoppingXmlListener extends BaseAction implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{
return array(
AdditionalFieldEvent::ADD_FIELD_EVENT => ['addMyField', 64]
);
}
public function addMyField(AdditionalFieldEvent $event)
{
$pseId = $event->getProductSaleElementsId();
$event->addField('custom_label_0', "MY VALUE");
}
}