Magento

Hỏi và đáp cho người dùng nền tảng thương mại điện tử Magento

3
Magento 2 Rest Api lấy hình ảnh thu nhỏ url
Làm cách nào để chúng tôi có được url để thu nhỏ hình ảnh của sản phẩm thông qua API còn lại. /V1/products/{sku}/media sẽ cho chúng tôi các url tương đối như "/m/b/mb01-blue-0.jpg" và url hình ảnh sẽ là baseurl/catalog/product/m/b/mb01-blue-0.jpg Điều này hoạt động tốt. Nhưng làm thế nào để …

8
Gói fabpot / php-cs-fixer là tin nhắn bị bỏ rơi trong Magento 2
Tôi đang sử dụng Magento 2.0.5. Khi tôi chạy composer updatehoặc ra composer installlệnh, nó sẽ hiển thị cảnh báo sau. Gói fabpot / php-cs-fixer bị bỏ, bạn nên tránh sử dụng nó. Thay vào đó, hãy sử dụng friendsofphp / php-cs-fixer. Tôi đã đọc https://github.com/paliarush/magento2-vagrant-for-developers/issues/46 nhưng không nhận được …

1
Thêm tab mới trong trang chỉnh sửa sản phẩm và gọi phtml tùy chỉnh trong Magento 2.1
Tôi muốn thêm tab mới trong trang chỉnh sửa sản phẩm và tôi đã làm theo các bước sau: Tạo di.xmlvà thêm mã dưới đây: <virtualType name="Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Pool"> <arguments> <argument name="modifiers" xsi:type="array"> <item name="custommodule" xsi:type="array"> <item name="class" xsi:type="string">Namespace\Custommodule\Ui\DataProvider\Product\Modifier\Customtab</item> <item name="sortOrder" xsi:type="number">200</item> </item> </argument> </arguments> </virtualType> Tạo Customtab.phpvà theo modifyMeta()chức năng, tab …

1
Magento 2: Các tệp `resource.xml` được sử dụng để làm gì?
Trong Magento 2, một trong các tệp cấu hình XML mà mô-đun có thể có là resources.xmltệp. Ví dụ: mô-đun bán hàng có một #File: vendor/magento/module-sales/etc/resources.xml <?xml version="1.0" encoding="UTF-8"?> <!-- /** * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ --> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/resources.xsd"> …





4
Nhận số lượng sản phẩm chứng khoán trong magento
Tôi cần lấy số lượng sản phẩm chứng khoán cho sản phẩm, làm thế nào để có được điều đó $products = Mage::getModel('catalog/product')->getCollection(); $products->addAttributeToSelect(array('name', 'thumbnail', 'weight' ,'price','description')); foreach ($products as $product) { $p['products'][] = array( 'id' => $product->getId(), 'sku' => $product->getSku(), 'name' => $product->getName(), 'description' => $product->getDescription(), 'weight' => $product->getWeight(), …




5
Tại sao tôi không thể tiêm ProductRep repositoryInterface trong Magento 2?
Tôi có một hành động điều khiển mà tôi muốn tiêm kho lưu trữ sản phẩm namespace Nosto\Tagging\Controller\Export; use Magento\Catalog\Api\ProductRepositoryInterface; use Magento\Store\Model\StoreManagerInterface; use Magento\Backend\App\Action; use Magento\Framework\App\Action\Context; class Test extends Action { private $_productRepository; public function __construct( Context $context, StoreManagerInterface $storeManager, ProductRepositoryInterface $productRepository ) { parent::__construct($context); $this->_storeManager = $storeManager; $this->_productRepository = …



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.