Questions tagged «edit»

1
什么是getBlockHtml('formkey')?
我正在尝试在Magento中编辑产品编辑页面(第一个标签),并希望将数量(以及其他一些东西)从它们各自的标签移动到第一页。我知道了 <form action="<?php echo $this->getSaveUrl() ?>" method="post" id="product_edit_form" enctype="multipart/form-data"> <?php echo $this->getBlockHtml('formkey')?> <div style="display:none"></div> </form> 并且知道数量文本框的代码是 <tr> <td class="label"><label for="inventory_qty"><?php echo Mage::helper('catalog')->__('Qty') ?><span class="required">*</span></label></td> <td class="value"> <?php if (!$_readonly):?> <input type="hidden" id="original_inventory_qty" name="<?php echo $this->getFieldSuffix() ?>[stock_data][original_inventory_qty]" value="<?php echo $this->getFieldValue('qty')*1 ?>"/> <?php endif;?> <input type="text" class="input-text required-entry validate-number" id="inventory_qty" name="<?php echo …

4
Magento 2:所选类别在编辑表单中不可见
使用ui组件以管理形式添加了类别选择器。类别ID作为逗号分隔的值保存到数据库中。现在,我想在我的编辑表单中显示该类别。 这是我的example_example_edit.xml文件: <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceContainer name="content"> <uiComponent name="example_form"/> </referenceContainer> </body> </page> 这是我的example_form.xml <?xml version="1.0" encoding="UTF-8"?> <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd"> <argument name="data" xsi:type="array"> <item name="js_config" xsi:type="array"> <item name="provider" xsi:type="string">example_form.example_form_data_source</item> <item name="deps" xsi:type="string">example_form.example_form_data_source</item> </item> <item name="label" xsi:type="string" translate="true">example Information</item> <item name="config" xsi:type="array"> <item name="dataScope" xsi:type="string">data</item> <item name="namespace" xsi:type="string">example_form</item> </item> …
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.