Magento

Magento电子商务平台用户的问答

4
我应该为Magento开发哪些有趣的模块进行学习?
现在有一段时间我一直在研究Magento。我做了很多模块,但是我仍然认为我需要更多的培训,但是我想不出一个有趣的模块来严格地处理尽可能多的事情。 这是我制作的一些模块:博客,管理员电子邮件通知,相关产品,产品视图弹出窗口。 因此,有人可以建议一个模块来要求我学习我尚未接触的东西或有趣的思维方式吗? 该问题可能没有此站点所需的100%Q / A答案表格,但我希望我能得到一些建议 谢谢。 PS:一切都严格出于教育目的,我想学习Magento的所有内容。

1
http动词接口的目的
在Magento 2.3中,所有http动词都有一些接口 Magento\Framework\App\Action\HttpPostActionInterface Magento\Framework\App\Action\HttpGetActionInterface, ... 所有的人都是空的并且执行Magento\Framework\App\ActionInterface。 我还发现它们全部都映射app/etc/di.xml到的参数中,Magento\Framework\App\Request\HttpMethodMap并且许多控制器都实现了这些接口。 但并非所有控制器。 这就是我能找到的所有信息。 他们的目的是什么?

5
SodiumChachaIetf :: decrypt()必须为字符串类型,布尔值
我确实将Magento 1迁移到Magento 2.3.0一切都很好,但是当我创建客户双方(前台和管理员)的表单时,我都遇到了与解密相关的错误,即使单击保存时我也无法编辑客户,但发生了同样的错误。 下面的错误是: 致命错误:未捕获的TypeError:Magento \ Framework \ Encryption \ Adapter \ SodiumChachaIetf :: decrypt()的返回值必须为字符串类型,在public_html / vendor / magento / framework / Encryption / Adapter / SodiumChachaIetf.php:68中返回的布尔值堆栈跟踪:#0 public_html / vendor / magento / framework / Encryption / Encryptor.php(358):Magento \ Framework \ Encryption \ Adapter \ SodiumChachaIetf-> decrypt('“ \ x10 \ …


1
Magento 2 rest API-如何在移动设备应用程序上管理API身份验证生命周期?
在Magento [2.2.4] Web API中,当我传递用户名和密码时,它将为该特定客户生成令牌(仅有效1小时-可从Magento管理员配置) http://magento.host/index.php/rest/V1/integration/customer/token?username=test.user@test.com&password=test@123 返回令牌。 生成令牌后,当我们在标头中传递该令牌时。 授权::承载*令牌值* http://magento.host/index.php/rest/V1/customers/me 返回客户详细信息。 我说明上述情况下运作良好为的WebAPI其中我在测试magento2 邮差。 现在的情况是 每小时重新生成令牌,然后每小时重新登录一次, 对于Mobile Application而言是不合逻辑的。 然后,如果根据服务合同开发了API,Magento如何在移动应用程序中管理用户登录数据和身份验证 多久我应该让我的访问令牌来存在它在移动应用到期前? 我不想强迫我的用户每小时在Mobile Application中重新进行身份验证。 如何为移动应用程序正确管理OAuth2 API令牌生命周期。 更改访问令牌的生存时间不是逻辑上的解决方案,因为应用程序和Web应具有不同的令牌生存时间


2
条款和条件的验证(自定义模块)
我制作了一个自定义模块,使我可以将T&C复选框移动到摘要div中的付款方式和下订单按钮下方,如下所示: 现在,每当我选择一种付款方式时,请选中“条款和条件”中的复选框并按“下订单”,将弹出以下内容: 我已经尝试了以下方法,但不幸的是没有运气: Magento 2-在结帐中移动条款和条件的位置 提交订单后的Ajax有效负载: 在不使用模块的情况下使用结帐时,有效负载的内容(付款信息)具有: extension_attributes: {agreement_ids: ["1"]} agreement_ids: ["1"] 当使用我的自定义模块时,它如下: extension_attributes: {agreement_ids: [""]} agreement_ids: [""] 因此它是空的...这可能是问题所在。我该如何解决? 码 module.xml <?xml version="1.0" ?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> <module name="Vendor_Checkout" setup_version="1.0.0"> <sequence> <module name="Magento_Checkout"/> </sequence> </module> </config> checkout_index_index.xml <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <head> <css src="Vendor_Checkout::css/checkout.css"/> </head> <body> <!-- Disabling the T&C checkbox …

2
UI组件-以“ Ymd H:i:s”格式(ISO时间格式)显示时间
我通过UI组件创建了一些管理列表页面,其时间列中的默认时间格式如下所示 UI组件代码如下 <column name="created_at" class="Magento\Ui\Component\Listing\Columns\Date"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> <item name="filter" xsi:type="string">dateRange</item> <item name="component" xsi:type="string">Magento_Ui/js/grid/columns/date</item> <item name="dataType" xsi:type="string">date</item> <item name="label" xsi:type="string" translate="true">Created At</item> </item> </argument> </column> 数据库中的时间格式正确(ISO时间格式),这就是我要显示的格式。 那么,如何在UI组件中以“ Ymd H:i:s ”格式(ISO时间格式)显示时间?感谢您的任何建议:)

14
Magento迁移产品错误:UiComponentFactory-> argumentsResolver('created_by',NULL)
我正在尝试使用data-migration-tool将我的Magento 1.9.3.4迁移到Magento 2.2.2。 我做到了,商店在本地主机上工作了;我有客户,销售,静态页面和产品。 当我尝试编辑一种产品时,我收到此致命错误: 致命错误:未捕获的TypeError:传递给Magento \ Framework \ View \ Element \ UiComponentFactory :: argumentsResolver()的参数2必须为数组类型,给定为null,在D:\ xampp \ htdocs \ magento2 \ vendor \ magento \ framework中调用212行上的\ View \ Element \ UiComponentFactory.php,并在D:\ xampp \ htdocs \ magento2 \ vendor \ magento \ framework \ View \ Element \ UiComponentFactory.php:164中定义:堆栈跟踪: 0 …



3
Magento 2如何与CSS grunt-autoprefixer一起使用
通过查看全新安装的Magento 2(v2.1.8),我从他们的Gruntfile.js和package.json文件中看到Magento正在使用grunt-autoprefixer 太好了,CSS自动前缀确实很有用。但是我看不到如何在Magento的Gruntfile中使用它,有人知道它是如何工作的吗? 此外,这在实际环境中的生产模式下将如何工作?Magento2不在生产模式下使用PHP LESS编译器,而Grunt仅用于进行开发。 Gruntfile.js /** * Production preparation task. */ prod: function (component) { var tasks = [ 'less', 'autoprefixer', 'cssmin', 'usebanner' ] package.json "devDependencies": { "glob": "^5.0.14", "grunt": "^0.4.5", "grunt-autoprefixer": "^2.0.0", 我跑了grunt autoprefixer,它似乎也不起作用。 $ grunt autoprefixer Running "autoprefixer:setup" (autoprefixer) task Autoprefixer's process() method is deprecated and will …

2
Magento 2:如何使自定义费用征税
我想对自定义费用加税。税收计算是完美的,可以获取税收金额,但未在数据库中quote_address的TAX文件中设置。 public function collect( \Magento\Quote\Model\Quote $quote, \Magento\Quote\Api\Data\ShippingAssignmentInterface $shippingAssignment, \Magento\Quote\Model\Quote\Address\Total $total ){ $total->setTaxAmount($total->getTaxAmount()+$taxAmount); $total->setBaseTaxAmount($total->getBaseTaxAmount()+$taxAmount); } 我尝试在collect方法中设置tax Amount,但未设置。 我想像这个代码一样。它是Magento1,但我想要Magento 2

2
如何将数据传递到另一个ui组件DataProvider
我有一个网格UI组件,它位于某些已编辑表单的字段集中。我需要将一个entity_id从编辑表单传递到网格,在网格中我可以按某个值过滤某些项的集合,并且网格将显示适当的结果。我使用insertListing组件创建了网格组件。 <insertListing name="slide_grid"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> <item name="autoRender" xsi:type="boolean">true</item> <item name="source" xsi:type="string">slide</item> <item name="loading" xsi:type="boolean">true</item> <item name="dataScope" xsi:type="string">some_slider_slide_listing</item> <item name="externalProvider" xsi:type="string">${ $.ns }.some_slider_slide_listing_data_source</item> <item name="ns" xsi:type="string">some_slider_slide_listing</item> <item name="externalData" xsi:type="string">id</item> <item name="imports" xsi:type="array"> <item name="slider_id" xsi:type="string">${ $.provider }:data.entity_id</item> </item> <item name="exports" xsi:type="array"> <item name="slider_id" xsi:type="string">${ $.externalProvider }:params.slider_id</item> </item> …

3
Magento 2产品编辑/添加管理表单自定义部分
我正在学习UI组件。 我想在产品编辑/添加后端表单中添加自定义部分,因此 我创建了以下文件。 供应商/模块/视图/adminhtml/ui_component/product_form.xml <?xml version="1.0" encoding="UTF-8"?> <form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd"> <fieldset name="mobile"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> <item name="label" xsi:type="string" translate="true">Time</item> <item name="provider" xsi:type="string">product</item> <item name="dataScope" xsi:type="string">data.product</item> <item name="sortOrder" xsi:type="number">2</item> <item name="collapsible" xsi:type="boolean">true</item> <item name="opened" xsi:type="boolean">false</item> <item name="ns" xsi:type="string">product_form</item> </item> </argument> <container name="monday_time_group"> <argument name="data" xsi:type="array"> <item name="type" xsi:type="string">group</item> …

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.