![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
死磕Magento
木子耗2009
PHP开发工程师->系统架构
展开
-
google统计产品
原创 2020-03-19 16:56:56 · 118 阅读 · 0 评论 -
magento优惠规则
优惠规则:直接应用规则非(coupon)当设置Stop Further Rules Processing=No ,只要满足规则 ,满足的规则都会使用,如 满20减5元,满50减8元,此时购物车产品你90元,则会优惠5+8=13元当设置Stop Further Rules Processing=YES 只会应用一个非(coupon)规则。此时关键看Priority,当Priority都相同...原创 2019-11-26 11:48:39 · 325 阅读 · 0 评论 -
magento前台通过代码编辑产品
$product = Mage::getModel('catalog/product')->setStoreId(0); $product->load(5875); //Mage::app()->setCurrentStore(0); echo $storeId = Mage::app()->getStore()->getStoreId(); $produc...原创 2019-10-26 15:49:00 · 130 阅读 · 0 评论 -
magento 日常
1. 更新索引 ssh切换到magento shell目录,执行操作 php -f indexer.php -- -reindex catalog_urlcatalog_product_attribute Product Attributescatalog_product_price Product Pricescatalog_url原创 2016-12-19 15:41:19 · 256 阅读 · 0 评论 -
Warning: fopen(/var/www/costway.com/var/locks/index_process_3.lock): failed to open stream: Permissi
magento Warning: fopen(/var/www/costway.com/var/locks/index_process_3.lock): failed to open stream: Permission denied in /var/www/costway.com/app/code/core/Mage/Index/Model/Process.php on line 423原创 2016-12-21 10:47:03 · 908 阅读 · 0 评论 -
Magento 程序架构与流程图解
http://www.zhixing123.cn/php/magento-structure-workflow.html转载 2016-07-20 18:22:14 · 541 阅读 · 0 评论 -
magento 消息机制和错误信息传递
http://blog.csdn.net/clh604/article/details/8264619转载 2016-07-15 16:30:32 · 273 阅读 · 0 评论 -
magento 获得产品所属分类
$categoryIds = $_product->getCategoryIds(); if(count($categoryIds) ){ $firstCategoryId = $categoryIds[0]; $_category = Mage::getModel('catalog/category')->load($firstC原创 2016-04-11 11:02:40 · 388 阅读 · 0 评论 -
magento 给customer添加属性 给order添加属性
//给 customer加$installer->addAttribute('customer', 'cpsfrom', array( 'label' => 'Cpsfrom', 'type' => 'varchar', 'input' => 'text', 'visible' => true, 'requ原创 2016-04-08 16:26:03 · 765 阅读 · 0 评论 -
magento 计划任务
http://blog.csdn.net/shuishui8310/article/details/5570926http://blog.chinaunix.net/uid-26559452-id-3093157.html原创 2016-04-07 15:34:30 · 389 阅读 · 0 评论 -
magento connect
https://www.magentocommerce.com/magento-connect/原创 2016-12-27 17:01:01 · 246 阅读 · 0 评论 -
Product images do not show on Category pages and do show on product view pages
There is a lot written about this kind of issues. but all do not seem to be the same as what we are experiencing.We have a big portion of products (so not all) that has product images not shown in转载 2017-01-05 14:22:03 · 448 阅读 · 0 评论 -
magento 时区,对Magento的时间/时区的几点见解
Magento整个系统中使用UTC时间,即通用协调时(UTC, Universal Time Coordinated)。这样保证在不同的视图或者Store里使用的时间与本地时间一致,在系统配置中可以看到,每个视图或者店铺可以单独设置时区 。Magento在数据库中存贮的都是UTC时间,在渲染视图的时候会显示当前时间。如果想在视图中获取当前时间,可以使用如下函数:Mage::原创 2015-05-28 10:09:39 · 1632 阅读 · 0 评论 -
magento 通过数据库修改design 和 design/theme/locale
修改design 在design_change表修改design/theme/locale在core_config_data表可以这样查询 SELECT * FROM `core_config_data` WHERE value LIKE '%你当前的theme%'LIMIT 0 , 30原创 2017-02-16 09:25:50 · 482 阅读 · 0 评论 -
Magento编译模式 - Magento Compiler Mode
提高Magento性能的一个很重要的方法是开启Magento的编译模式,可以在后台System>Tools>Compilation,点击Run Compilation Process按钮,一段时间后,我们发现Compiler Status由Disabled变为Enabled,已经编译成功了,打开/includes/src目录,会发现生成了很多文件。因为在Magento中,我们模转载 2017-02-25 14:53:33 · 370 阅读 · 0 评论 -
很不错的外贸站测速工具
https://gtmetrix.com/原创 2017-11-27 09:59:19 · 595 阅读 · 0 评论 -
MANAGE MAGENTO STORE - MAGENTO ORDER STATUS AND MAGENTO ORDER STATE
https://www.magestore.com/manage-magento-online-store/magento-order-status-and-magento-order-statehttp://blog.csdn.net/enlyhua/article/details/52060311转载 2018-01-15 09:50:11 · 220 阅读 · 0 评论 -
magento 1.8 产品索引更新报错问题 修复
把更新失败的索引 ,加$e->getMessage() ,看看具体报什么错误exception ‘PDOException’ with message ‘SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (...原创 2018-05-17 17:32:03 · 315 阅读 · 0 评论 -
Magento中getData和getOrigData的区别
先举个例子:$product = Mage::getModel('catalog/product')->load(any product id);$product->getData('something'); // returns "foo"$product->setData('something', 'bar');$product->getData('somethi...转载 2018-06-21 10:07:26 · 320 阅读 · 0 评论 -
Magento 用了 php 中 ArrayAccess,IteratorAggregate,Countable
1. ArrayAccess : 可以向访问数组一样来访问对象 比如给对象属性赋值2. IteratorAggregate: 便利对象属性3. Coutable : 获得对象属性Count 自己重写该方法原创 2016-03-23 14:19:43 · 482 阅读 · 0 评论 -
magento 通过layout文件 实现 block之间通信
可以参考 搜索模块 Quick Search Form page/2columns-left.phtml catalogsearch/result" name="search.result" template="c原创 2016-03-23 12:19:00 · 442 阅读 · 0 评论 -
magento 获取自定义产品属性和属性值
在magento系统中经常要自定义自己的产品属性,在后台自定义的产品属性如何获取呢,下面根据属性类型的不同分别说明产品属性要想在前台获取到需要设置属性的Used in Product Listing 为true1、下拉列表的产品属性如定义了一个表示产品的硬件支持类型的下拉列表属性support_hardware就可以这样获取[php] vie原创 2015-06-02 17:29:40 · 650 阅读 · 0 评论 -
magento 派发事件
Mage::dispatchEvent('controller_action_layout_render_before'); 触发XML中定义的 singleton ajaxcartpr原创 2015-06-01 18:57:18 · 286 阅读 · 0 评论 -
magento 布局
原创 2015-06-01 18:39:42 · 304 阅读 · 0 评论 -
Magento调试 - 页面空白,打开错误报告的方法
问题:Magento页面一片空白 没显示什么东西,无法判断是否程序错误,所以要把错误显示打开使之能调试解决:1. 在网站根目录的.htaccess文件里加上php_flag display_errors onphp_value error_reporting 2039详情看另外一篇文章:(用.htaccess设置 PHP错误显示 )2. 然后找到/error原创 2015-06-01 16:10:13 · 496 阅读 · 0 评论 -
Magento报错 解决思路
1. Service Temporarily Unavailable : 此服务暂时无法使用 造成的原因:版本升级或者插件安装失败所致 解决方法:1). 删除 maintenance.flag文件;2).var/cache清空 做了上面两步应该可以显示了,建议找到该插件卸载该插件,并手动安装2. magento 日志 1.原创 2015-06-01 14:28:40 · 726 阅读 · 0 评论 -
magento Compilation 预编译 开启后可以大幅提高 Magento 系统的运行速度
magento Compilation 预编译 开启后可以大幅提高 Magento 系统的运行速度原创 2015-06-01 12:01:30 · 707 阅读 · 0 评论 -
Magento 在 Onepage Checkout 页面添加自定义 Fields
http://www.sunzhenghua.com/magento-add-custom-fields-checkout-page原创 2015-06-18 11:35:32 · 765 阅读 · 0 评论 -
Magento输出查询SQL语句
lib\Zend\Db\Adapter\Pdo\Abstract.php236行加上try {// echo "";// var_dump($sql);// echo $sql; return parent::query($sql, $bind); } catch (P原创 2015-05-14 18:32:31 · 565 阅读 · 0 评论 -
magento 核心
1. 计划任务 crontab2. 事件 events原创 2015-06-01 16:03:16 · 283 阅读 · 0 评论 -
magento 获得 module,action,method
Mage::app()->getRequest()->getModuleName().'-'.Mage::app()->getRequest()->getControllerName().'-' .Mage::app()->getRequest()->getActionName();原创 2015-06-03 16:43:12 · 447 阅读 · 0 评论 -
magento 设置全局变量 (Session 和 Registry)
1. Magento: Get and set variables in session To set a Magento session variable:$myValue = 'Hello World';Mage::getSingleton('core/session')->setMyValue($myValue); To Retrieve:$myValu原创 2016-03-09 14:31:22 · 884 阅读 · 0 评论 -
Magento使用手机号注册登录开发过程
http://www.zuimoban.com/php/magento/2305.html转载 2016-03-09 14:24:11 · 475 阅读 · 0 评论 -
magento 流程 手稿
原创 2016-03-30 16:12:03 · 363 阅读 · 0 评论 -
magento如何实施正确的缓存策略以达到最佳性能
理解magento的Two-Level Cachingmagento默认使用zend framework的二层缓存存储方式。就是说它使用两层结构对cache进行配合管理,一个快的,但大小有限制的结构是一层比如APC或者Memcached ,一个比较慢的结构作为第二层比如file system.每一种存储结构各有利弊,要不同情况不同分析使用,APC 和 Memcached 是使用 key/v转载 2015-09-22 15:17:37 · 416 阅读 · 0 评论 -
Magento Block的缓存机制
aheadworks公司的Blog插件可以算是Magento所有免费插件中最有名也是使用最广泛的一个插件了,就我自己来说,也是每个项目的必备插件(我一般用来做为新闻插件使用)。今天拿它做例子演示下给Block添加缓存(Cache)。 这个截图是我某个项目使用aw_blog插件的实例,使用AW_Blog_Block_Blog这个block文件在首页输出某个新原创 2015-07-20 17:11:10 · 458 阅读 · 0 评论 -
遮罩层
getSku()=='futu123456789' && strpos($_SERVER['HTTP_USER_AGENT'],"MicroMessenger")):?>if(stristr($_SERVER['HTTP_USER_AGENT'],'Android') || 1)://安装系统 ?> left:0;原创 2015-07-13 18:25:52 · 852 阅读 · 0 评论 -
magento中修改和自定义邮件模板
1. Magento Transactional Emails常规设置 http://blog.csdn.net/shangxiaoxue/article/details/77559252. magento email:发送自定义邮件 http://blog.csdn.net/shangxiaoxue/article/details/7759591原创 2015-06-10 18:57:04 · 536 阅读 · 0 评论 -
magento session
1 . Mage::getSingleton(‘core/session’)2. Mage::getSingleton(‘customer/session’)3. Mage::getSingleton(‘admin/session’)4. Mage::getSingleton('checkout/session')原创 2015-06-10 14:54:03 · 743 阅读 · 0 评论 -
Magento performance testing guidelines
https://info.magento.com/rs/magentocommerce/images/Magento-Performance-Testing-Guidelines.pdf原创 2015-05-14 14:43:08 · 373 阅读 · 0 评论