คำถามติดแท็ก magento2

คำถามทั่วไปเกี่ยวกับ Magento 2 ไม่ใช่เฉพาะรุ่นรอง ใช้แท็กนี้เพื่อแยกความแตกต่างจาก Magento 1. หากคุณมีปัญหากับรุ่นที่เฉพาะเจาะจงโปรดใช้แท็ก 'Magento-2.x' ที่เหมาะสมแทน ฟังก์ชันการทำงานระหว่าง Magento 2 รุ่นรองอาจแตกต่างกัน

1
Magento 2 - วิธีเพิ่มขั้นตอนการชำระเงินแบบพิเศษหลังจากส่วนการตรวจสอบและการชำระเงินด้วยปุ่มสั่งซื้อ
ฉันกำลังพยายามเพิ่มขั้นตอนการชำระเงินเพิ่มเติมหลังจากส่วน "ตรวจสอบและชำระเงิน" ข้อกำหนดคือการแยกการชำระเงินและการตรวจสอบเป็นขั้นตอนแยกต่างหาก เมื่อเลือกวิธีการชำระเงินหลังจากนั้นแล้วควรไปยังขั้นตอนสุดท้าย "ตรวจสอบ" ซึ่งจะต้องแสดงข้อมูลการสั่งซื้อทั้งหมดด้วยปุ่ม "สั่งซื้อ" จนถึงตอนนี้ฉันได้เพิ่มขั้นตอนที่กำหนดเองหลังจากขั้นตอนการชำระเงินโดยไปที่ลิงก์ด้านล่าง http://devdocs.magento.com/guides/v2.0/howdoi/checkout/checkout_new_step.html แต่ปัญหาที่นี่คือปุ่ม "สั่งซื้อสถานที่" ถูกผูกไว้กับขั้นตอนการชำระเงินฉันจำเป็นต้องย้ายปุ่มคำสั่งซื้อไปที่ขั้นตอนสุดท้าย ความช่วยเหลือใด ๆ ที่นิยมมากที่สุด !!

4
การยืนยันเมลสั่งซื้อสร้างข้อผิดพลาด DOMXPath :: query ()
ในการสั่งซื้ออีเมลมีข้อผิดพลาดต่อไปนี้และแสดงผลไม่ถูกต้อง CSS Inline Error: Warning: DOMXPath::query(): Invalid expression in .../vendor/pelago/emogrifier/Classes/Emogrifier.php on line 269 ฉันจะแก้ไขสิ่งนี้ได้อย่างไร


3
ข้อผิดพลาด Magento2 REST API 'ไม่มีคลาส'
ฉันได้สร้าง Magento 2.0.2 REST web service ตามบล็อกของ Alan: http://alankent.me/2015/07/24/creating-a-new-rest-web-service-in-magento-2/ ฉันใช้บุรุษไปรษณีย์เพื่อโทรหาบริการเว็บที่กำหนดเองและได้รับข้อผิดพลาดต่อไปนี้: "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 P:\\wwwroot\\Magento202_com_loc\\Web\\vendor\\magento\\module-webapi\\Controller\\Rest.php(262): Magento\\Framework\\Webapi\\ServiceInputProcessor->process('Test\\\\Calculator...', 'add', Array)\n#4 P:\\wwwroot\\Magento202_com_loc\\Web\\vendor\\magento\\module-webapi\\Controller\\Rest.php(160): Magento\\Webapi\\Controller\\Rest->processApiRequest()\n#5 P:\\wwwroot\\Magento202_com_loc\\Web\\var\\generation\\Magento\\Webapi\\Controller\\Rest\\Interceptor.php(24): Magento\\Webapi\\Controller\\Rest->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#6 P:\\wwwroot\\Magento202_com_loc\\Web\\vendor\\magento\\framework\\App\\Http.php(115): Magento\\Webapi\\Controller\\Rest\\Interceptor->dispatch(Object(Magento\\Framework\\App\\Request\\Http))\n#7 P:\\wwwroot\\Magento202_com_loc\\Web\\vendor\\magento\\framework\\App\\Bootstrap.php(258): Magento\\Framework\\App\\Http->launch()\n#8 P:\\wwwroot\\Magento202_com_loc\\Web\\index.php(39): Magento\\Framework\\App\\Bootstrap->run(Object(Magento\\Framework\\App\\Http))\n#9 {main}" ฉันสามารถโทรหาบริการเว็บ REST ของ Magento ได้อย่างประสบความสำเร็จ app / รหัส …



4
หากต้องการเพิ่มตัวกรองเริ่มต้นในกริดใน Magento2
ฉันได้สร้างโมดูลที่กำหนดเองหนึ่งรายการโดยมีแอตทริบิวต์ชื่อฟิลด์ & สถานะในตารางผู้ดูแลระบบ กริดคอลเลกชันในmodule_test_grid_block.xml <arguments> <argument name="id" xsi:type="string">testGrid</argument> <argument name="dataSource" xsi:type="object">Namespace\Module\Model\ResourceModel\test\Collection</argument> <argument name="default_sort" xsi:type="string">id</argument> <argument name="default_dir" xsi:type="string">desc</argument> <argument name="grid_url" xsi:type="url" path="*/*/grid"><param name="_current">1</param></argument> </arguments> ฉันต้องการแสดงข้อมูลที่เปิดใช้งาน มีตัวเลือกใด ๆเพื่อเพิ่มตัวกรองเริ่มต้นในคอลเลกชันกริดของผู้ดูแลระบบหรือไม่ แก้ไข <block class="Namespace\Module\Block\Adminhtml\Test\Grid" name="namespace_module_test.grid" as="grid"> <arguments> <argument name="id" xsi:type="string">testGrid</argument> <argument name="dataSource" xsi:type="object">Namespace\Module\Model\ResourceModel\test\Collection</argument> <argument name="default_sort" xsi:type="string">id</argument> <argument name="default_dir" xsi:type="string">desc</argument> <argument name="grid_url" xsi:type="url" path="*/*/grid"><param name="_current">1</param></argument> <argument …

2
จะเพิ่มหรือลบ header.links ใน magento2 ได้อย่างไร?
ฉันกำลังค้นหาheader.linksบล็อกจะลบหนึ่งการเชื่อมโยงและเพิ่มการเชื่อมโยงบาง แต่ฉันไม่ได้รับการที่จะทำให้เกิดการเปลี่ยนแปลง แนะนำวิธีแก้ปัญหาให้ฉัน

2
ฉันต้องการปรับแต่ง minicart ของฉันใน Magento 2 ฉันต้องเพิ่ม 3 คุณสมบัติ
ฉันต้องการปรับแต่ง minicart ของฉันใน Magento 2 ฉันต้องเพิ่ม 3 คุณลักษณะ: SKU, ผู้ผลิตและหมายเลขผู้ผลิต เหล่านี้เป็นคุณสมบัติที่มีอยู่ ฉันเห็นตำแหน่งที่จะเพิ่มค่าเอาต์พุต แต่จะไม่เรียกจากที่ใด

6
ฉันจะถอดรหัสค่าการกำหนดค่าที่เข้ารหัสได้อย่างไร
protected $_paymentData; protected $_scopeConfig; protected $logger; public function __construct( \Magento\Framework\Model\Context $context, \Magento\Framework\Registry $registry, \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory, \Magento\Framework\Api\AttributeValueFactory $customAttributeFactory, \Magento\Payment\Helper\Data $paymentData, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Payment\Model\Method\Logger $logger, \Magento\Framework\Module\ModuleListInterface $moduleList, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate, \Magento\Directory\Model\CountryFactory $countryFactory, \Stripe\Stripe $stripe, \Inchoo\Stripe\Model\StripeFactory $stripeFactory, array $data = array() ) { parent::__construct( $context, $registry, $extensionFactory, $customAttributeFactory, $paymentData, $scopeConfig, $logger, $moduleList, $localeDate, null, …

2
ฉันจะตั้งค่าการกำหนดค่าใน Magento 2 ได้อย่างไร
ก่อนหน้านี้ (ใน Magento 1 นั่นคือ) เราได้สร้างโมดูลที่ชื่อว่า Setup ซึ่งมีการตั้งค่าสำหรับไซต์ สคริปต์อัปเกรดมีลักษณะดังนี้: $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'); $installer->setConfigData('design/header/welcome', 'Enter your value'); $installer->setConfigData('design/head/title_suffix', 'Enter your value'); $installer->setConfigData('currency/options/base', 'GBP'); $installer->setConfigData('currency/options/default', 'GBP'); // ... ฉันคิดไม่ออกว่าจะทำอย่างไรใน M2 กล่าวอีกนัยหนึ่ง: ฉันจะไปเกี่ยวกับการตั้งค่าข้อมูลการกำหนดค่าใน M2 ได้อย่างไร

2
วิธีใช้ Knockout JS ภายใน Magento 2
ปัญหาของฉัน: ฉันกำลังพยายามเขียนแอป Knockout JS ขนาดเล็กภายใน Magento 2 ฉันพยายามที่จะเริ่มต้นแอปเนื่องจากเมื่อฉันใช้งานko.applyBindings(AppViewModel, document.getElementById("koTest"));มันจะทำให้ Knockout ที่ใช้โดย Magento ล้มเหลวและพ่นข้อผิดพลาดนี้: Uncaught Error: You cannot apply bindings multiple times to the same element. ฉันสงสัยว่าเป็นเพราะ: ฉันสงสัยว่านี้เป็นเพราะวีโอไอพี 2 แล้วใช้ภายในko.applyBindings() app/code/Magento/Ui/view/base/web/js/lib/knockout/bootstrap.jsและนั่นไม่ได้ระบุโหนดที่ฉันไม่สามารถใช้ko.applyBindingsอีกครั้ง หากฉันไม่ได้ใช้ko.applyBindings(AppViewModel, document.getElementById("koTest"))ในรหัสของฉันแอพของฉันจะไม่เริ่มต้น นี่ทำให้ฉันคิดว่าฉันจำเป็นต้องใช้ko.applyBindings()ในสิ่งที่น่าพิศวง / bootstrap.js แต่ฉันไม่รู้ว่าจะมีใครช่วยได้บ้าง ฉันมีประสบการณ์เล็กน้อยเกี่ยวกับสิ่งที่น่าพิศวง รหัสของฉัน <script type="text/javascript"> require([ 'ko' ], function(ko) { // This is a simple …

8
รีเฟรชแคชโดยทางโปรแกรมใน Magento 2 ที่ระบบหน้าต่าง
ฉันกำลังมองหารหัสที่สามารถรีเฟรชหรือล้างแคช Magento2 ผ่านสคริปต์ได้ มันง่ายมากใน Magento 1.x ฉันใช้ Magento2 บนเซิร์ฟเวอร์ WAMP (หน้าต่าง)

5
วิธีเข้าร่วมการรวบรวมตารางการสั่งซื้อไปยังตารางที่กำหนดเองใน Magento2?
ฉันกำลังพยายามเพิ่มคอลัมน์ใหม่เพื่อสั่งซื้อกริดใน Magento 2.0 ดังนั้นฉันต้องทำการเข้าร่วมเพื่อสั่งซื้อชุดรวมตาราง ฉันจะบรรลุสิ่งนี้ได้อย่างไร เพราะใน magento2 กริดใช้องค์ประกอบ UI

2
วิธีแก้สถานะตัวทำดัชนี“ ถูกระงับ” (n in backlog)
หนึ่งในตัวจัดทำดัชนีที่กำหนดค่าให้อัพเดตตามกำหนดเวลาจะถูกล็อคในสถานะ "หยุดชั่วคราว" และไม่ได้รับการอัปเดตอีกต่อไป ผลผลิตของ bin/magento indexer:status +----------------------------+------------------+-----------+-------------------------------+---------------------+ | Title | Status | Update On | Schedule Status | Schedule Updated | +----------------------------+------------------+-----------+-------------------------------+---------------------+ | ... | | | | | | IntegerNet_Solr | Reindex required | Schedule | suspended (101028 in backlog) | 2018-09-24 15:28:44 | | ... | | | …

โดยการใช้ไซต์ของเรา หมายความว่าคุณได้อ่านและทำความเข้าใจนโยบายคุกกี้และนโยบายความเป็นส่วนตัวของเราแล้ว
Licensed under cc by-sa 3.0 with attribution required.