Câu hỏi được gắn thẻ «magento2»

Các câu hỏi chung về Magento 2, không dành riêng cho phiên bản nhỏ. Sử dụng thẻ này để phân biệt với Magento 1. Nếu bạn gặp sự cố với một phiên bản cụ thể, vui lòng sử dụng thẻ 'Magento-2.x' thích hợp thay thế. Các chức năng giữa Magento 2 phiên bản nhỏ có thể khác nhau.




2
Di chuyển các khối sang container khác làm thế nào để
Là người mới, tôi tìm cách giải quyết để di chuyển Đăng nhập và chuyển đổi cửa hàng từ header.panelsang header.container. Tôi mới thử mã này nhưng không hoạt động <referenceContainer name="header.container"> <referenceBlock class="Magento\Store\Block\Switcher" name="store.settings.language" template="switch/languages.phtml"> </referenceBlock> </referenceContainer>

2
Magento 2: tệp catalog_attribut.xml là gì?
Tôi nhận thấy rằng Magento 2 chứa một số catalog_attributes.xmltệp trong các thư mục sau: app/code/Magento/Bundle/etc app/code/Magento/Catalog/etc app/code/Magento/CatalogSearch/etc app/code/Magento/CatalogUrlRewrite/etc app/code/Magento/Downloadable/etc app/code/Magento/GiftMessage/etc app/code/Magento/Msrp/etc app/code/Magento/Sales/etc app/code/Magento/Tax/etc app/code/Magento/Wishlist/etc Những tệp đó trông như thế này (ví dụ cho Salestệp): <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Catalog:etc/catalog_attributes.xsd"> <group name="quote_item"> <attribute name="sku"/> <attribute name="type_id"/> <attribute name="name"/> <attribute name="status"/> <attribute …

3
Lỗi API API Magento2 'Lớp không tồn tại'
Tôi đã tạo thử nghiệm dịch vụ web Magento 2.0.2 REST dựa trên blog của Alan: http://alankent.me/2015/07/24/creating-a-new-rest-web-service-in-magento-2/ Tôi đang sử dụng Postman để gọi dịch vụ web tùy chỉnh và gặp lỗi sau: "message": "Class does not exist", "code": -1, "trace": "#0 P:\\wwwroot\\Magento202_com_loc\\Web\\vendor\\magento\\framework\\Webapi\\ServiceInputProcessor.php(128): ReflectionClass->__construct('')\n#1 P:\\wwwroot\\Magento202_com_loc\\Web\\vendor\\magento\\framework\\Webapi\\ServiceInputProcessor.php(262): Magento\\Framework\\Webapi\\ServiceInputProcessor->_createFromArray(NULL, '30')\n#2 P:\\wwwroot\\Magento202_com_loc\\Web\\vendor\\magento\\framework\\Webapi\\ServiceInputProcessor.php(99): Magento\\Framework\\Webapi\\ServiceInputProcessor->convertValue('30', NULL)\n#3 …







2
Làm cách nào tôi có thể đặt giá trị trong core_config_data với Magento 2 theo chương trình?
Tôi biết bạn có thể đặt dữ liệu cấu hình trong Magento 1 với: Mage::getModel('core/config')->saveConfig('my/path/whatever', $value); và bạn có thể nhận dữ liệu cấu hình trong Magento 2 với: protected $_scopeConfig public function __construct(\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig) { $this->_scopeConfig = $scopeConfig; } + $this->_scopeConfig->getValue( 'path/of/config', \Magento\Store\Model\ScopeInterface::SCOPE_STORE ); Nhưng tôi không thể hiểu, …


2
Làm cách nào tôi có thể đặt giá trị cấu hình trong Magento 2?
Trước đây (trong Magento 1, nghĩa là) chúng tôi đã tạo ra một mô-đun có tên là Setup chứa cài đặt cho trang web. Các kịch bản nâng cấp trông giống như thế này: $installer = $this; $installer->startSetup(); $installer->setConfigData("fastsimpleimport/general/partial_indexing", 1); $installer->setConfigData("fastsimpleimport/product/disable_preprocess_images", 1); $installer->setConfigData('general/country/default', 'GB'); $installer->setConfigData('general/locale/firstday', 1); $installer->setConfigData('general/locale/timezone', 'Europe/London'); $installer->setConfigData('general/store_information/merchant_country', 'GB'); …

Khi sử dụng trang web của chúng tôi, bạn xác nhận rằng bạn đã đọc và hiểu Chính sách cookieChính sách bảo mật của chúng tôi.
Licensed under cc by-sa 3.0 with attribution required.