Magento

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

3
是否可以部分退款来退税?
在发出贷项通知单(也称为退款)时,Magento会自动退还运输和产品税,但不退还在“调整退款”字段中输入的值(也称为部分退款)。 是否可以配置Magento,使其对调整退款字段中输入的值自动退税? 参考:


4
Magento 2-如何将自定义CSS文件添加到头部?
在Magento 1.x中,我可以使用如下代码的帮助器将CSS文件添加到头部。 <reference name="head"> <action method="addCss"><stylesheet helper="module/helperclass/helperfunction"/></action> </reference> 有人知道如何在Magento 2中执行此操作吗?
8 magento2  layout  xml 

1
Magento 2自定义XML模式验证
这是Magento 2 xml验证的后续步骤: 我了解如何xsi:noNamespaceSchemaLocation在IDE中进行映射,因此可以实时验证xml。 但是,如果我必须使用自己的验证架构来创建自己的配置文件,该怎么办? 我应该为什么值xsi:noNamespaceSchemaLocation呢? 现在我在class.xml: <?xml version="1.0"?> <classes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="class.xsd"> .... </classes> 效果很好,因为class.xsd与my处于同一文件夹中class.xml。 但是我计划使我的模块可扩展,并实际上由多个模块组成。 现在,我在附加模块中使用了class.xsd文件的相对路径,这似乎有点错误。 <?xml version="1.0"?> <classes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../Base/etc/umc/class.xsd"> .... </classes> 显然我不能使用,urn:magento:framework...因为我的模块不在框架中,我也不能使用,urn:magento:module...因为我的模块不是核心模块。或者我可以使用后者? 还是应该使用自定义urn? 并且(最后一个)如果我使用自定义urn,命令会自动将其拾取,bin/magento dev:urn-catalog:generate还是应该做一些特别的事情?

6
SUPEE-6788(可能)缓存问题
自从我们在客户的站点上应用SUPEE-6788补丁以来,该站点每天约有一次宕机,而且似乎唯一可以恢复的就是清除缓存。我们查看了日志,其中许多日志似乎包含“前端控制器达到了100个路由器匹配迭代”。在应用补丁之前,不会发生此问题。任何人都不知道是什么原因造成的吗?有人说这可能是magento问题中的缓存错误,但我无法确定。任何输入都会有所帮助! 一些附加说明: 发生故障时,服务器上没有任何繁重的负载,因此这不是一个因素。 是的,以前的所有补丁均已成功应用。 我们正在使用内存缓存来存储缓存。

2
如何使用块类型=“ core / template”在Magento2中包含phtml文件?
我已经完成以下工作: Magento 2 EE Admin > Content > Pages > Add New 页面称为Hello World 内容是: {{block type="core/template" template="/Modules/About.phtml"}} 我去创造了。 App/design/frontend/Magento/Blank/Modules/About.phtml 当我访问localhost / m2 / hello时 该页面加载了预期的内容,但没有加载about.phtml,其中包含纯文本调用 <p>Hello this file is correct</p>

3
从Magento Downloader升级到Magento 1.9.2.2,返回冲突错误
通过Magento Connect Manager升级时,出现以下错误的原因可能是什么?我正在从1.9.2.1升级到1.9.2.2 Package community/Interface_Adminhtml_Default 1.9.2.2 conflicts with: community/Mage_All_Latest 1.9.2.1 Package community/Interface_Frontend_Default 1.9.2.2 conflicts with: community/Mage_All_Latest 1.9.2.1 Package community/Interface_Install_Default 1.9.2.2 conflicts with: community/Mage_All_Latest 1.9.2.1 等等。 我已经通过ssh尝试过了 chmod +x mage ./mage mage-setup . ./mage config-set preferred_state stable ./mage sync ./mage install http://connect20.magentocommerce.com/community Mage_All_Latest --force php shell/indexer.php reindexall 它返回了一些错误,例如 scandir(): (errorno 2) …


1
来宾用户的REST API调用
使用书写器库开发android本机应用程序,并使用现有基于Magento的电子商务平台中基于Rest的Web服务。 我已经从基于Magento的Oauth Consumer获得了诸如'Key'和'Secret'之类的先决条件。 由于在现有方案中有三个用户,例如注册用户,管理员和来宾用户。 对于注册客户和管理员,Iam可以在完成授权URL链接并允许该应用访问我的帐户后,获取outh令牌和秘密令牌。 但是最初,我想访问其余服务,并以访客用户身份(未在应用程序中注册)显示产品列表,但是每次它要求授权URL时。 我正在共享部分代码,请仔细阅读。 OAuthService service = new ServiceBuilder() .provider(MagentoThreeLeggedOAuth.class) .apiKey(MAGENTO_API_KEY) .apiSecret(MAGENTO_API_SECRET) .debug() .build(); Token requestToken = service.getRequestToken(); String authorizationUrl = service.getAuthorizationUrl(requestToken); /*popup window which displays authorization from the user*/ startActivity(new Intent("android.intent.action.VIEW", Uri.parse(authorizationUrl))); 如何获得来宾用户的秘密令牌? 提前致谢。

3
如何使用Magento SOAP将文件附件上传到自定义产品属性
这与我的问题有关;如何获得产品文件附件 我想制作一个可以Intellimage_Attachs在其他问题中使用该模块的脚本(不在服务器上)。 如果可能的话,我将使用Magento SOAP。 我目前遇到的问题是我无法获取/放置/更新/我们的产品“样本/文件”。 return $this->handle->call($this->session,'product_custom_option.list', "productnamehere "); 带回一个产品,我有:(附件的空白阵!显然用错了SOAP调用,其中一个是正确的?(如product_custom_option.list不正确,我的功能正常工作与其他呼叫。) 更新 尝试过: return $this->handle->call($this->session, 'product_downloadable_link.list', array( $sku . " ")); 但是,即使这些产品使用,它们也不是可下载的产品,因此无法使用samples。


4
单页(结帐)非常慢
我的网站使用不同的AJAX和Caching扩展程序,运行速度很快(加载时间不到1秒),但结帐时所有搜索工作都完全停止了。加载时间最多可以跳到10秒左右,有时甚至更长。甚至刷新/ checkout / onepage /也可能需要花费很长时间。 我知道这个问题可能取决于很多事情,但让我首先问一下如何缩小问题的起因。是否有可用的调试模式可以告诉我在等待时正在加载什么?

3
购物车的送货方式不可用
我必须将送货方式设置为购物车,并且能够显示所有可用的送货方式,并且我已经将有效的送货方式作为SOAP Web服务方法“ shoppingCartShippingMethod”的输入参数,因此,是否需要更改Magento管理面板上的配置? <?php $proxy = new SoapClient('http://127.0.0.1/magento/index.php/api/v2_soap/?wsdl'); $sessionId = $proxy->login('cats', 'sudhir123'); echo "\nSession Id = "; var_dump($sessionId); $cartId = $proxy->shoppingCartCreate($sessionId, '3'); echo "\nCart Id = "; var_dump($cartId); $customerData = array( "firstname" => "testFirstname", "lastname" => "testLastName", "email" => "testEmail@mail.com", "mode" => "guest", "website_id" => "0" ); $resultCustomerSet = $proxy->shoppingCartCustomerSet($sessionId, …

1
如果CMS页面中的语句
这就是我想要做的: {{if var data.request_quote=="on"}} Yes {{else}} No {{/if}} var data.request_quote形式变量在哪里。它让出来的No,就算data.request_quote是on。
8 cms  if 

2
Magento 2-保持产品图像长宽比
我正在使用Magento 2类别页面。 但是我不知道如何保持产品图像的宽高比。 在magento 1.x中,我可以获取图像src以使用以下代码。 <?php echo $this->helper('catalog/image') ->init($_product, 'small_image') ->constrainOnly(FALSE) ->keepAspectRatio(TRUE) ->keepFrame(FALSE) ->resize(300); ?> 但是在magento 2中,我可以在/app/design/frontend/Magento/luma/etc/view.xml文件中设置图像大小。 <image id="category_page_grid" type="small_image"> <width>240</width> <height>300</height> </image> <image id="category_page_list" type="small_image"> <width>240</width> <height>300</height> </image> 我试图用“自动”输入高度,但是没有用。 我也尝试只输入宽度,但是它也没有用。 而且我在Magento_Catalog / templates / product / list.phtml文件中找到了以下用于显示产品图片的代码。 <?php $productImage = $block->getImage($_product, $image); ?> <a href="<?php echo $_product->getProductUrl() ?>" class="product …
8 magento2 

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.