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
Đăng nhập theo chương trình trong Magento 2
Tôi đang tìm kiếm trong Magento Lớp đăng nhập một Khách hàng và tôi không tìm thấy vị trí của nó. Tôi cần có thể đăng nhập người dùng bên ngoài một Magento. Bất kỳ ý tưởng?
8 magento2 


5
Magento2: Cách ghi đè mẫu widget
Có widget.xml trong mô-đun CatalogWidget. Bên trong widget.xml có <parameter name="template" xsi:type="select" required="true" visible="true"> <label translate="true">Template</label> <options> <option name="default" value="product/widget/content/grid.phtml" selected="true"> <label translate="true">Products Grid Template</label> </option> </options> </parameter> Một cách thích hợp để thay đổi tệp mẫu cho widget là gì?

2
Magento2 Thông tư phụ thuộc khi đọc cấu hình
Tôi không thể sử dụng ScopeConfigInterface $scopeConfigkhi mở rộng một số đối tượng di.xml <preference for="Magento\Framework\Logger\Monolog" type="Foo\Log\Logger\FooLog" /> <virtualType name="helper" type="Foo\Log\Helper\Data" /> <type name="Foo\Log\Logger\FooLog"> <arguments> <argument name="helper" xsi:type="object">Foo\Log\Helper\Data</argument> </arguments> </type> FooLog.php public function __construct( \Foo\Log\Helper\Data $dataHelper ) { $this->_scopeConfig = $scopeConfig; } Dữ liệu.php public function __construct(ScopeConfigInterface $scopeConfig) { $this->_scopeConfig …


7
Ngoại lệ Magento2 trong khi cài đặt: 'LogicException' với thông báo 'Mô-đun không xác định trong danh sách được yêu cầu:' Magento_BundleSampleData '
Tôi đã gặp lỗi này khi cài đặt Magento2 [ERROR] exception 'LogicException' with message 'Unknown module in the requested list: 'Magento_BundleSampleData'' in setup\src\Magento\Setup\Model\Installer.php:403 Stack trace: #0 setup\src\Magento\Setup\Model\Installer.php(364): Magento\Setup\Model\Installer->readListOfModules(Array, Array, 'enable_modules') #1 setup\src\Magento\Setup\Model\Installer.php(323): Magento\Setup\Model\Installer->createModulesConfig(Array) #2 setup\src\Magento\Setup\Controller\Install.php(97): Magento\Setup\Model\Installer->install(Array) #3 vendor\zendframework\zend-mvc\src\Controller\AbstractActionController.php(82): Magento\Setup\Controller\Install->startAction() #4 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent)) #5 vendor\zendframework\zend-eventmanager\src\EventManager.php(444): call_user_func(Array, Object(Zend\Mvc\MvcEvent)) #6 vendor\zendframework\zend-eventmanager\src\EventManager.php(205): Zend\EventManager\EventManager->triggerListeners('dispatch', …

2
Thêm dữ liệu jQuery trong magento 2
Tôi đang cố gắng sử dụng DataTables jquery trong frontend magento-2 bằng cách sử dụng các yêu cầu. Tôi có thể thấy tệp datables.min.js trong bảng điều khiển mạng, nhưng bằng cách nào đó, nó đưa ra lỗi sau. Tôi reuirejs-config.jstrông như thế này var config = { map: { …

4
Làm thế nào để bạn gọi Blocks trong Trình điều khiển Magento2?
Tôi muốn getBlock Adb/Block/Index in controller Adb/Controller/Category/View. Vậy làm thế nào để làm điều đó? Biên tập trong bộ điều khiển. namespace Addon\Faq\Controller\Category; class View extends \Addon\Faq\Controller\Category { /** * @var \Magento\Framework\Controller\Result\ForwardFactory */ protected $_coreRegistry = null; /** * @var \Magento\Framework\View\Result\PageFactory */ protected $resultPageFactory ; /** * @param \Magento\Backend\App\Action\Context $context …

2
Mở rộng massilities.js
Tôi cần mở rộng một javascript từ mô-đun ui mới có hệ thống lưới quản trị mới. Mở rộng một thành phần Ui mặc định cho tôi một gợi ý và tôi đã có thể thiết lập một số mã: # file: app/code/My/Module/view/adminhtml/web/js/gid/massactions.js console.log('new massactions.js'); define([ 'Magento_Ui/js/grid/massactions' ], function (massactions) …





2
Cách hiển thị Danh mục trong System.xml trong magento 2
Tôi đang nhận được tất cả các loại trong System.xmlviệc sử dụng lớp Vender\Module\Model\Config\Source\Category <?php namespace Vender\Module\Model\Config\Source; use Magento\Framework\Data\OptionSourceInterface; class Category implements OptionSourceInterface{ protected $_categoryFactory; protected $_categoryCollectionFactory; public function __construct( \Magento\Catalog\Model\ResourceModel\Category\CollectionFactory $categoryCollectionFactory, \Magento\Catalog\Model\CategoryFactory $categoryFactory ) { $this->_categoryCollectionFactory = $categoryCollectionFactory; $this->_categoryFactory = $categoryFactory; } /** * Get category collection * * …


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.