Magento

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



1
Magento 2结帐索引xml未覆盖
我正在使用空白主题为基础创建Magento 2主题。现在的问题是Magento 2空白主题删除了http://www.yourdomain/checkout 页面上的顶部标题,搜索栏和迷你购物车 vendor\magento\theme-frontend-blank\Magento_Checkout\layoutcheckout_cart_index.xml 他们已经使用删除了 <?xml version="1.0"?> <!-- /** * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ --> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="minicart" remove="true"/> <referenceContainer name="header.panel" remove="true"/> <referenceBlock name="top.search" remove="true"/> <referenceBlock name="catalog.compare.link" remove="true"/> <referenceBlock name="catalog.topnav" remove="true"/> <referenceContainer name="footer-container" remove="true"/> </body> …
11 magento2  checkout  xml 

2
已经为此InvoiceID(#10412:重复的发票)付款了。
已关闭。这个问题需要更加集中。它当前不接受答案。 想改善这个问题吗?更新问题,使其仅通过编辑此帖子来关注一个问题。 2年前关闭。 我创建了一个重复的个人资料产品,并使用Paypal作为支付网关。点击付款后,我得到了错误 “ PayPal网关已拒绝请求。已经为此发票ID(#10412:发票重复)付款。” 我已经在我的贝宝帐户中完成了必要的设置。PayPal帐户(标准)>配置文件>付款接收首选项>在阻止意外付款下:选择否,允许每个发票ID进行多次付款。 但这仍然给了我同样的错误。 任何建议都会有很大帮助。

1
Requirejs垫片选项不起作用
我正在为Magento2开发一个模块,并且正在使用requirejs加载依赖于jquery的自定义javascript。我在requirejs-config.js中使用shim选项在自定义脚本和jquery之间设置此依赖关系。问题是未(始终)设置此依赖项。有时jQuery确实会在脚本之前加载,并且一切都很好,但有时会在脚本之后加载,从而导致脚本错误: Uncaught ReferenceError: jQuery is not defined(anonymous function) @ jquery.easing.1.3.js:39 Uncaught ReferenceError: jQuery is not defined(anonymous function) @ jquery.flexslider-min.js:5 Uncaught TypeError: $(...).flexslider is not a function 参见下面我的requirejs-config.js的示例: var config = { map: { '*': { 'flexslider': 'Vendor_Modulejs/jquery.flexslider-min', 'picturefill': 'Vendor_Modulejs/picturefill.min', 'easing': 'Vendor_Modulejs/jquery.easing.1.3', 'hoverintent': 'Vendor_Modulejs/jquery.hoverIntent', 'fitvids': 'Vendor_Modulejs/jquery.fitvids', 'vimeo': 'Vendor_Modulejs/jquery.vimeo.api.min' } }, shim: …


2
如何在一页结帐中的以下送货方式中添加自定义阻止?
我想在运输方法下面添加自定义块,并且此自定义块应在运输方法表单内。我认为下面的代码行对添加此内容很有帮助。但是不知道如何进行。 <div id="onepage-checkout-shipping-method-additional-load"> <!-- ko foreach: getRegion('shippingAdditional') --> <!-- ko template: getTemplate() --><!-- /ko --> <!-- /ko --> </div>
11 magento2 

3
无效的块类型:[名称空间] \ [模块] \块\时间轴
我一直在尝试向页脚添加一个块,但到目前为止,它一直在返回 Invalid block type: [Namespace]\[Module]\Block\Timeline 我到目前为止所拥有的资源也可以在这里找到:https : //github.com/sandermangel/magento2-twitterfeed 我的 layout/default.xml <?xml version="1.0"?> <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd"> <body> <referenceBlock name="footer"> <block class="[Namespace]\[Module]\Block\Timeline" name="twitterfeed-timeline" template="footer/timeline.phtml"></block> </referenceBlock> </body> </page> 和我的积木课 vendor/[namespace]/[module]/Block/Timeline.php namespace [Namespace]\[Module]\Block; use Magento\Framework\View\Element\Template; class Timeline extends Template { /** * Timeline constructor. * @param Template\Context $context * @param array $data */ public …
11 blocks  magento2 

3
Magento 2:对产品集合应用可见性和状态过滤器
我想在产品集合上应用可见性和状态过滤器。像在Magento 1中一样,我们这样做: Mage::getSingleton('catalog/product_status')->addVisibleFilterToCollection($collection); Mage::getSingleton('catalog/product_visibility')->addVisibleInCatalogFilterToCollection($collection); 我在Magento 2中获得了产品集合,但是找不到适用于上述过滤器的功能。

1
如何正确配置Magento以支持2种货币
目前,我有一个网站/商店浏览使用丹麦克朗作为货币。现在,我想扩展一个使用欧元作为货币的新网站。当我尝试实现以下目标时,这会导致一些问题: 我只想输入产品+等级价格。然后,产品价格应自动转换为其他货币。当前问题:等级价格已正确从DKK转换为EUR,但产品价格未转换。 运输成本不应使用货币换算(系统->配置->运输方式)。例如,如果我有一个使用EURO的网站,我想输入fx。运费为5欧元。在使用DKK的网站上,我想输入fx。15丹麦克朗的运费。这适用于当前配置 客户认为他要支付的金额与实际从客户的银行帐户中扣除的金额之间没有区别。因此,我假设我需要DKK的基本货币和欧元的基本货币?这适用于当前配置 我当前的配置如下: 货币设置默认配置(基本货币:丹麦克朗,默认显示货币:丹麦克朗,允许的货币:丹麦克朗) websitedk(基本货币:丹麦克朗,默认显示货币:丹麦克朗,允许的货币:丹麦克朗)-storedk--storeviewdk(默认显示货币:丹麦克朗,允许的货币:丹麦克朗) websiteeu(基本货币:欧元,默认显示货币:欧元,允许的货币:欧元)-storeeu--storevieweu(默认显示货币:欧元,允许的货币:欧元) 目录->价格->目录价格范围:网站 所以我的问题是,我该如何解决第1点中列出的问题:“一级价格已从DKK正确转换为EUR,但产品价格未转换。” ? 链接:DKK产品:http ://www.dk.DELETETHISbrisingi.com/neodym-skivemagnet-6x6-mm-magp10011a EUR产品:http : //www.eu.DELETETHISbrisingi.com/neodym-disc-magnet-6x6-mm


1
magento 2.3中不推荐使用\ Magento \ Framework \ Registry,如何使用注册表创建实例?
/** * Registry model. Used to manage values in registry * * Registry usage as a shared service introduces temporal, hard to detect coupling into system. * It's usage should be avoid. Use service classes or data providers instead. * * @api * @deprecated * @since 100.0.2 */ https://www.mageplaza.com/devdocs/magento-2-registry-register.html 谁可以给我演示使用服务类或数据提供者的演示。 …


5
Magento 2.2.2:已用完允许的内存大小为792723456字节(尝试分配184320字节)
我在magento 2.2.2中工作,当我保存产品时,它将显示此错误。 致命错误:在第153行的/var/www/html/Demo/vendor/magento/framework/Profiler.php中,耗尽了允许的内存大小为792723456字节(尝试分配184320字节) Php version : 7.0 Magento : 2.2.2 我也改变适用于memory_limit = 16G在php.ini文件并重新启动Apache服务器。仍然,这个问题没有解决。 <?php namespace Abc\Xyz\Observer; use Magento\Framework\Event\ObserverInterface; use \Magento\Store\Model\StoreManagerInterface; class ProductSaveAfter implements ObserverInterface { protected $_objectManager; protected $messageManager; protected $_productmFactory; protected $_productdFactory; protected $_productsFactory; protected $_eavConfig; protected $sStore; protected $scopeConfig; protected $_helper; protected $storeManager; public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, …

2
Magento 2结帐自定义字段验证
Magento2结帐-为我的自定义结帐字段添加验证的最佳方法是什么(取决于所选的送货方式)? 例如,我要在LayoutProcessor中的地址表单中添加字段,可以在其中指定验证规则。如果选择了我的自定义载体,则需要将此字段设为必填字段。 我的目标是在未填写我的自定义字段的情况下防止用户进入下一步。我知道我可以在下订单(“查看和付款”步骤)之前添加自定义验证,但是我需要在之前进行验证。

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.