Month: April 2016

Magento: 判断是否为手机浏览 Optimise Web’s Mobile Detect Class for Magento

项目地址:Optimise Web’s Mobile Detect Class for Magento Optimise Web’s Mobile Detect Class for Magento MobileDetect.net is a lightweight PHP class for detecting mobile devices. Optimise Web’s Magento extension allows using Mobile Detect’s functions from within Magento. Usage Mage::helper(‘mobiledetect’)->isMobile() You can… Read More

HTML转义字符对照表, HTML特殊字符编码对照表, HTML 字符集, HTML Character Codes – ASCII Entity and Unicode Symbols

HTML 字符集 如需正确地显示 HTML 页面,浏览器必须知道使用何种字符集。 万维网早期使用的字符集是 ASCII。ASCII 支持 0-9 的数字,大写和小写英文字母表,以及一些特殊字符。 由于很多国家使用的字符并不属于 ASCII,现代浏览器的默认字符集是 ISO-8859-1。 如果网页使用不同于 ISO-8859-1 的字符集,就应该在 <meta> 标签进行指定。   ISO 字符集 ISO 字符集是国际标准组织 (ISO) 针对不同的字母表/语言定义的标准字符集。 下面列出了世界各地使用的不同字符集: 字符集 描述 使用范围 ISO-8859-1 Latin alphabet part 1 北美、西欧、拉丁美洲、加勒比海、加拿大、非洲 ISO-8859-2 Latin alphabet part 2… Read More

Magento: addAttributeToFilter 和 addFieldToFilter 的区别 Difference between addAttributeToFilter and addFieldToFilter

addAttributeToFilter is used to filter EAV collections and will filter the products based on the attributes that you’ve included in your collection. EAV-models: product, customer, sales, etc. addFieldToFilter is used to filter Non-EAV collections and will filter the products based… Read More

Magento: 后台获取menu链接 Getting the admin panel urls

The url for customer page in the admin panel. index.php/admin/customer/edit/id/7 echo Mage::helper('adminhtml')->getUrl('adminhtml/customer/edit/index/id',array('id'=>7)); The url for catalog product page in the admin panel. index.php/admin/catalog_product/edit/id/166 echo Mage::helper('adminhtml')->getUrl('adminhtml/catalog_product/edit/index/id',array('id'=>166)); The url for sales order in the admin panel. index.php/admin/sales_order/view/order_id/8 echo Mage::helper('adminhtml')->getUrl('adminhtml/sales_order/view/order_id/',array('order_id'=>8)); The url for… Read More

JavaScript 语言基础知识点总结(思维导图)

目录[-] (1)javascript 数组 (2)函数基础 (3)运算符 (4)流程语句 (5)正则表达式 (6)字符串函数 (7)数据类型 (8)变量 (9)window 对象 (10)DOM基本操作 (11)一图知晓整个Javascript ES5语法 推荐阅读:   (1)javascript 数组   (2)函数基础   (3)运算符   (4)流程语句   (5)正则表达式   (6)字符串函数   (7)数据类型   (8)变量   (9)window 对象   (10)DOM基本操作   (11)一图知晓整个Javascript … Read More

Bootstrap 3 : 图片上传预览 image upload preview

头部均为: <link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet"> <script type='text/javascript' src="//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script> <script type='text/javascript' src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script>   方法一: Input File – Popover Preview Image  DEMO HTML <div class="container"> <div class="row"> <div class="col-xs-12 col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2"> <!-- image-preview-filename input [CUT FROM