Questions tagged «magento2.1.0»


1
Magento2 Rest API订单流程
我正在对magento网站进行REST API调用以下订单。以下是我的通话顺序。 创建购物车 rest/V1/guest-carts/ 取得购物车 rest/V1/guest-carts/bae0af147b83f1561f66cc4e3c97916e 将产品添加到购物车 rest/V1/guest-carts/24/items 添加帐单信息,设置付款方式和下订单 rest/V1/guest-carts/24/payment-information 在此序列中,订单的订单状态为“待处理”。我想知道如果涉及任何付款网关(例如PayPal)来处理付款和生成发票,如何通过api捕获付款。 上面的流程中是否缺少用于捕获付款的任何api。

1
在产品编辑页面中添加新标签并在Magento 2.1中调用自定义phtml
我想在产品编辑页面中添加新标签,为此,我按照以下步骤操作: 创建di.xml并添加以下代码: <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> 创建Customtab.php并按modifyMeta()功能创建新选项卡。 现在,我想调用自定义phtml文件来呈现html。如何调用自定义phtml文件?

1
如何在Magento 2.1.0中进行简单的Ajax调用
我在一个phtml文件中添加了一个简单的按钮。 <input type='button' name='emq_zip_btn' class='emq_zip_btn' value='Go'> 我从自定义模块(Ved_Mymodule)添加了一个自定义js文件(“ emq.js”): require([ "jquery", "jquery/ui" ], function($v){ //<![CDATA[ $v = jQuery.noConflict(); $v(document).ready(function() { console.log('jquery loaded from emq.js'); $v(".emq_zip_btn").on('click',function(e) { console.log('clicked'); }); }); //]]> }); 当我单击以上按钮时,控制台中将打印“ clicked”,即jQuery正常工作。 这是来自自定义模块Ved_Mymodule的控制器文件: Ved \ Mymodule \ Controller \ Index \ Index.php: <?php namespace Ved\Mymodule\Controller\Index; use Ved\Mymodule\Model\NewsFactory; use Magento\Framework\App\Action\Action; use …

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.