magento

magento2开发Api接口实例

醉酒当歌 提交于 2020-02-26 01:15:35
Vue项目所用的Magento2 Api文档 Api模块文件结构: magento2 接口流程: 1、访问接口地址:http://m2.olightstore.us/rest/default/V1/olightApi/abtest 2、指向/OlightApi/Api/AbtestInterface.php接口文件 3、由于di.xml和webapi.xml配置,所以会转向/OlightApi/Model/Abtest.php文件 一、模块配置-etc/ module.xml 模块配置 – etc/module.xml <?xml version="1.0" encoding="UTF-8"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> <module name="Silk_OlightApi" setup_version="0.0.1"> </module> </config> 二、注册模块r egistration .php <?php \Magento\Framework\Component\ComponentRegistrar:

Magento observer goes in endless loop

醉酒当歌 提交于 2020-02-25 05:52:11
问题 Thanks in advance I have created one observer i need to set the attribute values on fly using the observer please check the following config and the observer files when i click on the save button the observer goes into the endless . i just want to set the attribute value using this observer <catalog_product_save_after> <observers> <zaptech_save_product_data> <type>singleton</type> <class>upload/observer_product</class> <method>saveTabData</method> </zaptech_save_product_data> </observers> <

Fatal error: Class 'Mage_Enterprise_Giftwrapping_Block_Adminhtml_Product_Helper_Form_Config' not found in …\..\Abstract.php on line 146

那年仲夏 提交于 2020-02-24 11:51:10
问题 Im migrating magento Enterprise edition to community edition. Im almost done. But having few problem in backend.If I go to Manage Products and click on any products im getting this error. Fatal error: Class 'Mage_Enterprise_Giftwrapping_Block_Adminhtml_Product_Helper_Form_Config' not found in ...\lib\Varien\Data\Form\Abstract.php on line 146 回答1: I found solution for this problem. Search for this keyword in your catalog_eav_attribute table "enterprise_giftwrapping/adminhtml_product_helper

Magento订单创建和管理

懵懂的女人 提交于 2020-02-10 14:52:27
如何配置Magento订单选项 要修改Magento订单选项(结账设置,邮寄设置,支付方式等等)你需要进入后台->System->Configuration。我们要设置的选项在左侧菜单栏的Sales区域。让我们简短地看下这些选项: Sales(销售) -通过这个选项你可以配置支付总额的排序,是否允许再次下单,为PDF和HTML打印输出(发票和装箱单的设计)设置logo,设置最小订单金额和礼物信息。 Sales Email(销售电子邮件) -在这里你可以为订单,发票,运输和信用备忘录配置不同的邮箱。更多相关信息你可以在下面的Magento订单邮件部分中到。 PDF Print-outs(PDF打印) -这个选项允许你设置是否在发票,装运和信用备忘录的头部显示订单ID。 Tax(税) -这里你可以设置不同的税选项-税类,计算设置,税务显示设置和固定产品税。 Checkout(结账) -这个重要的选线允许你配置你的结账设置,购物车和侧边栏,支付失败的邮件。 Shipping Settings(运输设置) -这里你可以设置你的运输来源和选项。 Shipping Method(运输方式) -顾名思义,在这里你可以配置你的运输方式;可用的运输方式有:扁平率,表率,免费送货,UPS,USPS,联邦快递。 Google API(谷歌API) -这里你可以为Magento配置谷歌服务

magento订单状态修改

不想你离开。 提交于 2020-02-10 14:51:47
最近在做magento的订单时,发现magento配置的订单状态太少了,而且不能自由控制订单的状态,查了很多资料,费尽周折,终于发现了一外国哥们写的文章,翻译出来和大家分享一下。 文章如下: 在你magento网店中的每一条订单的每一个流程,都会有相应的order status与之相对应,你可以在后台的sales=>orders中看到每一个订单的状态。 在magento后台中已经预定义了很多order status和order state,order state描述了订单每一步的状态。 除了预定义的订单状态,你可以设置属于你自己的订单状态,并将order status和order state关联起来。 Here is how: 1、从后台进入system=>order status 2、点击order status页面右上角的创建新订单状态 3、对于一个新订单,你需要做如下步骤: a、填入一个status code值,让后台识别 b、输入一个status label值,在后台和前台显示 c、你可以在下面的选项中为每一个网店,没一种语言设置不同的值 4、保存 关联order status和order state 1、点击order status页面右上角的assign status to state 2、然后根据要求进行填写 注:一个state可以对应多个status

Magento Hide other shipping methods if shipping price is 0.00 without module

守給你的承諾、 提交于 2020-02-07 13:16:28
问题 I am trying to hide other shipping methods if the shipping price is 0.00 without using or creating a custom module. The desired algorithm is: If shipping price is 0.00 hide all other shipping methods This is the Abstract.php I've tried: <?php public function getShippingRates() { $groups = parent::getShippingRates(); $free = array(); foreach($groups as $code => $_rates) { foreach($_rates as $_rate) { if (!$_rate->getPrice() > 0) { $free[$code] = $_rates; } } } if (!empty($free)) { return $this

Magento Hide other shipping methods if shipping price is 0.00 without module

坚强是说给别人听的谎言 提交于 2020-02-07 13:13:41
问题 I am trying to hide other shipping methods if the shipping price is 0.00 without using or creating a custom module. The desired algorithm is: If shipping price is 0.00 hide all other shipping methods This is the Abstract.php I've tried: <?php public function getShippingRates() { $groups = parent::getShippingRates(); $free = array(); foreach($groups as $code => $_rates) { foreach($_rates as $_rate) { if (!$_rate->getPrice() > 0) { $free[$code] = $_rates; } } } if (!empty($free)) { return $this

How can I move breadcrumb before main title on Magento 2

守給你的承諾、 提交于 2020-02-06 09:27:07
问题 I would like please your help. I am newbie on Magento 2 and still searching things. I would like to move breadcrumb before title (on category pages, product everywhere). I tried to change it on default.xml <move element="page.main.title" destination="page.top" after="breadcrumbs"/> but with no luck. Also i tried to do it from catalog_category_view.xml on vendor/magento/module-catalog/view/frontend/layout but no luck. Can anyone please guide me where can I find the order that is loading? Can

Mage::getModel is returning false

元气小坏坏 提交于 2020-02-06 01:58:33
问题 I am trying to get to grips with calling and using models in magento. My current task is to simply display a string held in a model by calling it from a controller. When trying to call SimpleOutput.php I get an error message saying that a non object has been called. I have var_dumped it as you will see and it return false. I have looked at my code and with my limited understanding of what I need to do in Magento I have everything correct. Obviously i'm missing something. Could someone please

How to copy a product's attributes value to another attribute in Magento?

老子叫甜甜 提交于 2020-02-05 09:05:09
问题 Is there a way in Magento where I can assign Attribute X's value to Attribute Y programmatically ? So far I have tried this. I created the Y attribute with following settings: $setup->addAttribute('catalog_product','myAttribute',array( 'group'=>'General', 'input'=>'label', 'type'=>'varchar', 'label'=>'Value of Attribute X', 'visible'=>1, 'backend'=>'beta/entity_attribute_backend_myattribute', 'global'=>Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_STORE )); In my backend model, I have done