基于规则的节点创建:商业产品+产品展示节点集
我正在尝试将 Commerce 产品类型绑定到我自己的自定义类型节点(用作显示节点)。目标是在尽可能少的位置输入新数据。因此,我正在探索在创建另一种类型时基于规则创建一种类型。似乎两个方向都有效。不过,在这两者中,我更喜欢在用户创建自定义类型节点时自动创建商业产品,然后该节点将用作产品显示。
我想知道是否有人经历过这个选择并可以推荐这个。另外,commerce_product_display_manager 模块是否必要?
I'm trying to bind a Commerce product type to my own custom type node (serving as a display node). The goal is to enter new data in as few places as possible. I'm therefore exploring a rule-based creation of one type upon creation of the other. Seems like both directions are working. Of the two though, I prefer automatic creation of a Commerce Product upon user creation of Custom Type node, which will then serve as a product display.
I was wondering if anyone has been through this choice and could recommend this. Also, is the commerce_product_display_manager module necessary?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
商业产品显示管理器不是必需的,我已经让它工作了,但我从未使用过该模块。
我选择了保存产品后自动创建节点的路线。
以下是我为此导出的规则:
您需要替换自己的值:
抱歉,我现在无法投入更多时间来提供更好的答案,如果您希望我详细说明使用以下内容创建上述产品的过程,请告诉我图形用户界面
Commerce Product Display Manager is not necessary, I've gotten this to work and I've never used that module.
I went for the route of automatically creating a Node after saving the Product.
Below is my Rules export for this:
You'll need to substitute your own values for:
Sorry I can't dedicate more time to a better answer now, let me know if you'd like me to elaborate on the process of creating the above using the GUI
上面的例子很有用,但这里是一个更具体的例子:
我遇到的唯一问题是第二个操作(“data_set”) - 选择“entity-created:field-product:0”,而不是“entity”很重要-created:field-product" 使其工作,因为我们想要分配特定产品而不是产品列表。
此示例使用标准产品显示节点类型 (product_display),但您可以将其更改为您正在使用的节点类型。另请记住,这仅适用于一种产品类型 - 对于每种产品类型,应创建单独的规则。您还可以创建一个规则,用于在删除产品时删除产品显示节点。
仅当您连接一产品一产品显示时,此规则才有用。如果您需要为每个产品显示添加更多产品(颜色、具有不同价格的图像),那么您必须使用 Commerce 批量产品创建 模块。
The above example was useful but here is a more specific one:
The only problem I had was with the second action ("data_set")- it was important to select "entity-created:field-product:0", not the "entity-created:field-product" to make it work because we want to assign specific product and not a list of products.
This example is using the standard product display node type (product_display) but you can change it with the one you are using. Also have in mind that this is working only for one product type - for every product type a separated rule should be created. You may create also a rule for deleting the product display node when deleting the product.
This rule is useful only when you have connection one product-one product display. If you need to add more products per product display (colors, images with different prices) then you have to use Commerce Bulk Product Creation module.