Questions tagged «fieldsets»

3
将订单放置在magento2中后,将自定义数据从报价复制到订单和订单项目
我正在magento 2中构建具有自定义折扣的自定义模块。我正在尝试将折扣从报价,报价项目复制到订单和订单项目。在magento 1中,我这样声明config.xml: <fieldsets> <sales_convert_quote_address> <custom_discount_amount><to_order>*</to_order></custome_discount_amount> <base_custom_discount_amount><to_order>*</to_order></base_custome_discount_amount> </sales_convert_quote_address> <sales_convert_quote_item> <custome_discount_amount><to_order_item>*</to_order_item></custome_discount_amount> <base_custom_discount_amount><to_order_item>*</to_order_item></base_custom_discount_amount> </sales_convert_quote_item> </fieldsets> 并且我的自定义折扣金额已复制到表格中:sales_flat_order并按sales_flat_order_item预期进行。 在Magento 2中,我fieldset.xml使用以下代码创建了一个文件名: <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Object/etc/fieldset.xsd"> <scope id="global"> <fieldset id="sales_convert_quote_item"> <field name="custom_discount_amount"> <aspect name="to_order_item" /> </field> <field name="base_custom_discount_amount"> <aspect name="to_order_item" /> </field> </fieldset> <fieldset id="sales_convert_quote_address"> <field name="custom_discount_amount"> <aspect name="to_order" /> </field> <field name="base_custom_discount_amount"> <aspect name="to_order" /> </field> …

2
Magento 2 fieldset.xml; 将字段从报价复制到订单
我创建了一个自定义模型以根据报价创建订单;我正在使用fieldset.xml将报价定制代码复制到订单中。我已经创建了具有匹配字段的引号和顺序自定义列。下订单时,值存储在报价定制字段中,但不复制到订单中。以下是我的fieldset.xml <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:DataObject/etc/fieldset.xsd"> <scope id="global"> <!--quote convert to order--> <fieldset id="sales_convert_quote"> <field name="preorder_number"> <aspect name="to_order" /> </field> <field name="purchase_order_number"> <aspect name="to_order" /> </field> <field name="reference_number"> <aspect name="to_order" /> </field> </fieldset> <!--quote item convert to order item--> <fieldset id="quote_convert_item"> <field name="preorder_number"> <aspect name="to_order_item" /> </field> <field name="purchase_order_number"> <aspect name="to_order_item" /> …

2
Magento 2表单字段切换类型
我想在magento 2中创建一个切换输入选项,如下所示: 但我不知道这是什么类型的字段,现在我正在使用选择下拉列表,如下所示: $fieldset->addField( 'featured', 'select', [ 'label' => __('Featured'), 'title' => __('Featured'), 'required' => true, 'options' => ['1' => __('Yes'), '0' => __('No')], 'value' => $partner['featured'] ] );
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.