PHP
Eason.Wang
人生就是一场修行,一念成佛,一念成魔。
展开
-
Windows 7中安装SQL2005提示IIS未安装 解决办法 .
在Windows 7系统中安装SQL Server 2005时,可能会收到一个警告:提示IIS未安装或者未启用。在通过“控制面板”的“打开或关闭Windows功能”按默认设置安装IIS后,发现仍有这个提示,其原因在于IIS的默认安装设置未安装某些组件,因此只需要在默认安装时再选中以下组件(必须都安全才可以):组件所属列表静态内容常见H转载 2013-09-09 22:24:37 · 880 阅读 · 0 评论 -
magento 开发 -- 用户自定义发送邮件
以退货之后发送邮件给客服,原创 2014-05-14 15:13:00 · 836 阅读 · 0 评论 -
magento 开发 -- 新增一个简单的退货流程
1.1.1 功能描述1.1.1 功能描述原创 2014-05-14 14:56:52 · 1068 阅读 · 0 评论 -
Magento Admin Module – Part-3
这篇文件,将要介绍如何创建admin formsadmin forms翻译 2014-05-29 16:44:54 · 885 阅读 · 0 评论 -
Magento Admin Module – Part2
这篇文字,我将会介绍一写admin grid里面翻译 2014-05-29 10:44:39 · 1013 阅读 · 0 评论 -
magento admin module -- part-1
首先在你自定义的Bloc创建Adminhtml翻译 2014-05-22 15:02:59 · 883 阅读 · 0 评论 -
Magento Observer for order state is complete events
当订单的状态为complete 的时候,我们想去处理一些事情,可以通过observer来实现,使用"sales_order_save_commit_after" or "sales_order_invoice_pay" observer然后我们可以获取订单的状态(order status),根据订单的状态去实现你的需求,例子如下:config.xml中配置// for event sa原创 2013-12-26 17:50:42 · 1404 阅读 · 0 评论 -
Magento shows blank/empty page. How do I solve this?
SymptomsBlank page or white screen is shown in Magento Frontend, Backend or Magento Connect Manager. CauseIf you see a blank page / white screen opening your Store in browser, it indicatesthat转载 2013-12-26 10:17:33 · 1736 阅读 · 0 评论 -
How to create Magento invoice from order
Maybe you want to create an invoice from some custom script or through cron script. Here is one very useful example of code.First of all, we have to load some order over model “sales/order”, this is翻译 2013-12-25 11:39:58 · 782 阅读 · 0 评论 -
magento 安装错误server not found 的解决方法
当我在安装magento的时候,在地址栏输入localhost/magento,出现 'server not found'.的错误,其他的项目都是OK的,在网上找了很多的资料,终于发现了一个正确的解决方法:在你项目的文件夹下,例如我的 C:\wamp\www\magento\app\code\core\Mage\Core\Controller\Varien\Router文件夹下找到Admin.ph原创 2013-10-21 21:28:55 · 1311 阅读 · 0 评论 -
Magento 500 错误 How to Solve Magento 500 Internal Server Errors
Many users encounter some weird Magento 500 Internal Server Errors (Error type 500). I will try to list the most common solutions. These errors are not always caused by the same reason. You should try转载 2013-09-03 21:30:14 · 1060 阅读 · 0 评论 -
简单教你修改magento topLink
一般会在local.xml下:1、新增链接 My AccountMy Account10 Log InLog In100 Log OutLog Out100 wishlist_link 2、自定义链接 <!-- Add custom links. Pre翻译 2013-08-26 15:29:23 · 1217 阅读 · 0 评论 -
get the tax rate of a product的几种方法搜集
1、获取产品加上税之后的价格:$_finalPriceInclTax = Mage::helper(’tax’)->getPrice($_product, $_product->getFinalPrice(), true); 2、获取产品的税率方法一:// Get the product's tax class' ID $taxClassId = $_product原创 2013-08-26 15:20:28 · 873 阅读 · 0 评论 -
magento How to get all associated children product of a configurable product
get associated productIds(获取configurable product关联的simple product id):$childIds = Mage::getModel('catalog/product_type_configurable')->getChildrenIds($_product->getId());get associated products(获取co翻译 2013-08-26 15:14:09 · 639 阅读 · 0 评论 -
magento格式化价格 获取stockqty get media agllery images
1、magento格式化价格$formattedPrice = Mage::helper('core')->currency($finalPrice, true, false);2、magento 获取stockqtyMage::getModel('cataloginventory/stock_item')->loadByProduct($simple)->getQty();3、get原创 2013-08-26 15:10:37 · 1455 阅读 · 0 评论 -
magento获取 category
1、magento获取root category$_rootCateId=Mage::App()->getStore()->getRootCategoryId();$cate=Mage::getModel('catalog/category')->load($_rootcatID);2、获取父分类集合$parentCategorys=$cate->getParentCategories(原创 2013-08-26 15:05:26 · 805 阅读 · 0 评论 -
magento中打印运行的SQL语句
使用colleciton->getSelectSql()输出运行的SQL语句$collection = Mage::getModel('catalog/category')->getCollection(); echo $collection->getSelectSql(true); $collection->getSelectSql()->__toString();magento获取翻译 2013-08-26 15:03:00 · 833 阅读 · 0 评论 -
magento中使用group,order by,limit
magento中使用分组group$collection->getSelect()->group('entity_id'); $collection->groupByAttribute('entity_id');对模型对应的表集合进行排序$collection = Mage::getModel('module/model_name')->getCollection(); $collec原创 2013-08-26 15:01:03 · 1621 阅读 · 0 评论 -
magento获取指定attribute collection
获取产品的指定属性集合$attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'color');获取产品属性当前的值(用于获取前台)$type=$attribute->getFrontend()->getValue($_product);翻译 2013-08-26 14:57:19 · 892 阅读 · 0 评论 -
如何改变magento中货币符号的位置
Magento 1.7 use the currency format of Zend Framework. To change currency format, you have edit the locale xml file located into the directory lib/Zend/Locale/DataFor example, to pot the currency sy翻译 2013-08-26 14:51:48 · 1019 阅读 · 0 评论 -
magento 各种获取URL总结
1、Get Base URL Mage::getBaseUrl() => Get base url path e.g. http://yourwebsite.com/ Mage::getBaseUrl('media') => Get MEDIA folder path e.g. http://yourwebsite.com/media/ Mage::getBaseUrl('js') => Ge原创 2013-08-26 14:44:47 · 1605 阅读 · 0 评论 -
遍历目录将目录中以.php为后缀名的文件改为.txt
最近想研究一个cms的代码,想把代码转换成文本格式放到手机中看,太多文件不想去改后缀,所以自己就写了一个脚本,很简单,贴出来分享一下function php2txt($dir){ $items = scandir($dir) ; foreach ($items as $item){ if ($item=='.' || $item=='..'){ continue;原创 2013-09-08 22:37:43 · 1067 阅读 · 0 评论