简体   繁体   English

如何扩展 Shopware 5 中没有 _attributes 表的模型?

[英]How to extends the model which do not have _attributes tables in Shopware 5?

I want to extends the Premium Items module with some fields like( max_order_value , visible_above_and_visible_below ) but it do not have its _attributes .我想用一些字段(如max_order_valuevisible_above_and_visible_below )扩展高级项目模块,但它没有它的_attributes

According to the documentation we should not modify Shopware 5 core tables.根据文档,我们不应该修改 Shopware 5 核心表。

Please guide what is the correct way请指导什么是正确的方法

In this case you need to write your own entity with a foreign key to the premium items table, and need to load the data on your own.在这种情况下,您需要使用高级项目表的外键编写自己的实体,并且需要自己加载数据。 Here you find some information about it https://developers.shopware.com/developers-guide/models/在这里你可以找到一些关于它的信息https://developers.shopware.com/developers-guide/models/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM