Questions tagged «magento-2.1.1»

2
如何使用mixins Magento 2.1.1重写小部件功能
我们有 swatch-renderer.js 此文件中有一些小部件。 .... $.widget('mage.SwatchRenderer', { .... /** * @private */ _init: function () { if (this.options.jsonConfig !== '' && this.options.jsonSwatchConfig !== '') { this._sortAttributes(); this._RenderControls(); } else { console.log('SwatchRenderer: No input data received'); } }, /** * @private */ _sortAttributes: function () { this.options.jsonConfig.attributes = _.sortBy(this.options.jsonConfig.attributes, function (attribute) { …

1
在magento 2.1.1中为类别添加新的图像属性
我正在尝试创建一个新的属性作为类别的图像,我能够创建该属性,但是当我尝试上传图像时,无法保存。 这是我的代码: 工资/类别列表/安​​装/InstallData.php namespace Wage\Categorylist\Setup; use Magento\Framework\Module\Setup\Migration; use Magento\Framework\Setup\InstallDataInterface; use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\ModuleDataSetupInterface; use Magento\Catalog\Setup\CategorySetupFactory; class InstallData implements InstallDataInterface { public function __construct(CategorySetupFactory $categorySetupFactory) { $this->categorySetupFactory = $categorySetupFactory; } public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context) { $installer = $setup; $installer->startSetup(); $categorySetup = $this->categorySetupFactory->create(['setup' => $setup]); $entityTypeId = $categorySetup->getEntityTypeId(\Magento\Catalog\Model\Category::ENTITY); $attributeSetId = …

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.