随笔分类 -  magento

1.9and2.0
摘要:需求:创建一个上传图片以及填写图片信息的widget 1、widget也相当于一个module,所以首先创建module必要的文件目录 2、创建registration.php 3、创建etc\module.xml 4、创建etc\widget.xml 5、创建Block\Widget\Demo 6 阅读全文
posted @ 2017-03-31 10:13 你的左耳耳钉 阅读(442) 评论(0) 推荐(0)
摘要:1、根据获取attribute_code来获取attribute id 注释:catalog_product代表属性实体类型,brand代表属性code 2、实例化eav Model类型 3、构建option数组 4、添加option 5、应该就ok了! 阅读全文
posted @ 2017-03-07 18:01 你的左耳耳钉 阅读(660) 评论(0) 推荐(0)
摘要:在php7.1.2环境下安装magento2.1.4遇见的几个问题 1、php版本不对 (magento2.1.x默认是不支持7.1.x的) 打开setup / src / Magento / Setup / Model / PhpRedinessCheck.php并更改79行 从:$normali 阅读全文
posted @ 2017-03-01 17:47 你的左耳耳钉 阅读(1839) 评论(0) 推荐(1)
摘要:1、Redis是一个可选的后端缓存解决方案,不过magento2默认使用的是Zend_Cache_Backend_File 2、Zend_Cache_Backend_File的问题 core_cache_tag表不断增长。 如果Magento实例具有多个网站和具有大型目录的网络商店,则该表可在不到一 阅读全文
posted @ 2017-02-19 10:28 你的左耳耳钉 阅读(2041) 评论(1) 推荐(0)
摘要:在magento1.9中想要新建一个模块需要在app/code文件中新建一个local文件夹,但是Magento2.x的app目录下是没有code文件的 所以我们需要先创建一个code文件下面放我们的项目目录,大致的目录结构和1.9差不多,不过新增了 1、registration.php(注册文件) 阅读全文
posted @ 2017-02-10 15:18 你的左耳耳钉 阅读(1194) 评论(0) 推荐(1)
摘要:在magento2中我们经常会用到php bin\magento 命令:参数 来完成一些操作,所以就对命令做了一个总结 常见的命令如下: php bin/magento list 查看所有命令列表 moudule相关的参数 1、moudule:status 查看所有module的状态 2、moudu 阅读全文
posted @ 2017-02-08 11:13 你的左耳耳钉 阅读(4307) 评论(0) 推荐(0)
摘要:语言包下载路径:链接:http://pan.baidu.com/s/1jIwEkb8 密码:4b7p 1、把下载下来的三个文件复制到项目的根目录 2、执行如下代码 ①、如果php不是全局变量就先进入php环境目录(格式如下) ②、如果可以全局使用就进入项目根目录下 php bin\magento s 阅读全文
posted @ 2017-02-07 15:20 你的左耳耳钉 阅读(6578) 评论(0) 推荐(0)
摘要:官方下载路径:https://magento.com/tech-resources/downloads/magento; github下载路径:github:https://github.com/magento/magento2 2、可以直接下载zip包或者用git下载 3、下载下来以后把它放在开发 阅读全文
posted @ 2017-02-07 10:39 你的左耳耳钉 阅读(3655) 评论(0) 推荐(0)
摘要:1、在对应的layout上添加一个breadcurmb的block 2、在对应module下的blcok页面的_prepareLayout()方法中添加如下信息 注释:lable就是你要显示的文字(首页、个人中心、我的订单等) 3、在phtml模板中获取breadcrumb 实现的效果图 阅读全文
posted @ 2016-12-14 19:10 你的左耳耳钉 阅读(182) 评论(0) 推荐(0)
摘要:1、Loading current Layout $this->loadLayout(); 2、Create a new block $block = $this->getLayout->createBlock('block_template_type','test_block_name')->se 阅读全文
posted @ 2016-12-02 10:49 你的左耳耳钉 阅读(188) 评论(0) 推荐(0)
摘要:平常的model重写方式 阅读全文
posted @ 2016-11-18 17:29 你的左耳耳钉 阅读(371) 评论(0) 推荐(0)
摘要:From: /admin/cms_wysiwyg/directive/___directive/e3ttZWRpYSB1cmw9Ind5c2l3eWcvd2lkZ2V0cy9iYW5uZXIvaG9tZXBhZ2UvZm9yZWdyb3VuZC9maXNoLXRhbmsucG5nIn19/key/e 阅读全文
posted @ 2016-09-14 09:52 你的左耳耳钉 阅读(1174) 评论(0) 推荐(0)
摘要:增 $write = Mage::getSingleton("core/resource")->getConnection('core_write'); $table = Mage::getSingleton('core/resource')->getTableName('abc'); $write 阅读全文
posted @ 2016-09-08 11:32 你的左耳耳钉 阅读(739) 评论(0) 推荐(0)
摘要:Go to System -> Configuration, find General section on left hand side, click on Content Management and set 'Enable WYSIWYG Edito'r to 'Disable by defa 阅读全文
posted @ 2016-09-06 17:08 你的左耳耳钉 阅读(144) 评论(0) 推荐(0)
摘要:参考文章:http://stackoverflow.com/questions/5077755/images-in-magento-widgets 在创建widget时如果上传文件会发现文件无法上传,因为本页面默认的form不带 enctype= "multipart/form-data"; 我的解 阅读全文
posted @ 2016-09-02 15:43 你的左耳耳钉 阅读(407) 评论(0) 推荐(0)