<?xml version="1.0" encoding="UTF-8"?><rss version="0.92">
<channel>
	<title>Magento及Web前端开发</title>
	<link>http://www.magentofront-end.com</link>
	<description>magento相关内容及对前端开发的一些心得</description>
	<lastBuildDate>Tue, 31 Jan 2012 09:00:52 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	<!-- generator="WordPress/3.1.4" -->

	<item>
		<title>Magento与wordpress整合插件-WordPress Integration</title>
		<description><![CDATA[最近在折腾Magento与wordpress的整合。在朋友的推荐下今天装了WordPress Integration这个插件。安装方法很简单，首先在Magento根目录下安装wordpress。数据库可以新建一个，也可以使用Magento的。然后安装这个插件就好。如果你使用的是独立数据库，需要在后台设置下，否则无法连接到数据库。Magento 后台wordpress-&#62;Settings-&#62;Database/Integration，中设置下。 看了下插件的官方文档，常用的一些wordpress插件都是支持的，具体的使用方法和效果，以后再分享。刚装上插件，还没玩……]]></description>
		<link>http://www.magentofront-end.com/magentomuban/318</link>
			</item>
	<item>
		<title>Magento seo优化——让产品链接唯一</title>
		<description><![CDATA[在Magento后台会默认开启Use Categories Path for Product URLs。 这时候产品链接就会变成两个http://127.0.0.1/magentoyouhua/index.php/furniture/living-room/ottoman.html，http://127.0.0.1/magentoyouhua/index.php/ottoman.html。两个链接同时链向一个页面时，这样对seo是不好的。解决方法： 一、在后台关闭这个功能。 二、修改php文件去除分类url路径，因为在关闭这个功能后，一些插件还是会自带分类url路径。打开app/code/core/Mage/Catalog/Model/url.php 找到 1 2 3 4 5 6 7 8 9 10 11 12 13 if &#40;null === $parentPath&#41; &#123; $parentPath = $this-&#62;getResource&#40;&#41;-&#62;getCategoryParentPath&#40;$category&#41;; &#125; elseif &#40;$parentPath == '/'&#41; &#123; $parentPath= ''; &#125; 修改成 //if (null === $parentPath) { //$parentPath = $this-&#62;getResource()-&#62;getCategoryParentPath($category); //} //elseif ($parentPath == '/') { [...]]]></description>
		<link>http://www.magentofront-end.com/magentomuban/313</link>
			</item>
	<item>
		<title>可筛选下拉框在Magento商城中的应用</title>
		<description><![CDATA[在Magento添加可配置产品的时候，某一属性如果选项很多，我们就要盯着下拉框一个一个扫描下去了，这样会崩溃的。我用jQuery写了个可以对属性进行筛选的方法。实现原理就是弄了个假的select选择框覆盖在上面。先看下事例图。 未进行筛选的下拉框 筛选后的下拉框 在app/design/adminhtml/default/default/template/cagalog/product /edit/super/config.phtml加入以下代码. 其中#simple_product_huaxing是select的id，改为你的select的iD即可 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 &#60;div id=&#34;huase&#34;&#62; &#60;div id=&#34;selecthuaxin&#34;&#62;&#60;input type=&#34;text&#34; /&#62;&#60;/div&#62; &#60;/div&#62; &#60;script type=&#34;text/javascript&#34;&#62;// &#60;![CDATA[ jQuery&#40;&#34;#huase&#34;&#41;.insertBefore&#40;&#34;#simple_product_huaxing&#34;&#41;; [...]]]></description>
		<link>http://www.magentofront-end.com/magentomuban/290</link>
			</item>
	<item>
		<title>Magento注册验证加强</title>
		<description><![CDATA[Magento有自带的一个验证机制，但是用起来，用户体验不太好，Magento是在点击提交按钮以后才开始验证的。良好的用户体验是在客户提交表单前就提出错误的地方，可以去玩下淘宝的注册。 我先讲下Magento自带的验证机制的使用方法，首页看下js/prototype/validation.js，整个网站的验证相关的东西都写这里面，有能力的可以直接在这里面改，改成你想要的模式。Magento是通过class名来触发这个验证。我以注册页面为例，先看下注册页面的Email的html 1 &#60;input type=&#34;text&#34; class=&#34;input-text validate-email required-entry&#34; id=&#34;email_address&#34; name=&#34;email&#34;&#62; required-entry说明这个是必填项，validate-email说明这个是邮箱验证。如果你想在其他的地方做这些验证 只要加上这两个class就行。 我在Magento的基础上，用jQuery做了点判断，做成类似淘宝的了。 我是通过blur事件来触发的，隐藏和显示div达到这个效果，下面发一些判断的正则。 判断电话号码，手机，座机一起判断的 1 &#40;&#40;\d&#123;11&#125;&#41;&#124;^&#40;&#40;\d&#123;7,8&#125;&#41;&#124;&#40;\d&#123;4&#125;&#124;\d&#123;3&#125;&#41;-&#40;\d&#123;7,8&#125;&#41;&#124;&#40;\d&#123;4&#125;&#124;\d&#123;3&#125;&#41;-&#40;\d&#123;7,8&#125;&#41;-&#40;\d&#123;4&#125;&#124;\d&#123;3&#125;&#124;\d&#123;2&#125;&#124;\d&#123;1&#125;&#41;&#124;&#40;\d&#123;7,8&#125;&#41;-&#40;\d&#123;4&#125;&#124;\d&#123;3&#125;&#124;\d&#123;2&#125;&#124;\d&#123;1&#125;&#41;&#41;$&#41; 判断邮编 1 ^&#91;0-9&#93;&#123;6&#125;$ 判断邮箱 1 ^&#40;&#91;a-zA-Z0-9&#93;+&#91;_&#124;\_&#124;\.&#93;?&#41;*&#91;a-zA-Z0-9&#93;+@&#40;&#91;a-zA-Z0-9&#93;+&#91;_&#124;\_&#124;\.&#93;?&#41;*&#91;a-zA-Z0-9&#93;+\.&#91;a-zA-Z&#93;&#123;2,3&#125;$ 详细的js和phtml我就不说明了，js写的有点烂，放个链接，有兴趣的可以看下 JQUERY，PHTML]]></description>
		<link>http://www.magentofront-end.com/magentomuban/282</link>
			</item>
	<item>
		<title>Magento在产品页添加SKU，产品属性</title>
		<description><![CDATA[Magento产品页有时需要把SKU号调出来，方法： 1 &#60;?php echo $this-&#62;htmlEscape&#40;$_product-&#62;getSku&#40;&#41;&#41; ?&#62; Magento的产品属性，在catalog.xml中已经写进去了。你可以在product view中找到 1 2 3 &#60;block type=&#34;catalog/product_view_attributes&#34; name=&#34;product.attributes&#34; as=&#34;additional&#34; template=&#34;catalog/product/view/attributes.phtml&#34;&#62; &#60;action method=&#34;addToParentGroup&#34;&#62;&#60;group&#62;detailed_info&#60;/group&#62;&#60;/action&#62; &#60;/block&#62; 现在只要在产品详细页（view.phtml）中想要的位置插入 1 &#60;?php echo $this-&#62;getChildHtml&#40;'additional'&#41; ?&#62;]]></description>
		<link>http://www.magentofront-end.com/magentomuban/270</link>
			</item>
	<item>
		<title>Magento速度优化——异步加载</title>
		<description><![CDATA[Magento的这个速度优化，之前有讲到过了Magento加速利器——lazyload，其实就是异步加载。这次我讲的是在protype下的lazyload，效果是和淘宝的一样，不过淘宝用的是YUI的。不想加载jQUery的可以用这个protype下的lazyload，同样是减少http请求，但是他会先遍历一遍所有的预选的img类型。我就不详细解释了，我直接放js地址了http://www.bram.us/projects/js_bramus/lazierload/ Magento的加速要一点一点的坐上去， 最近为magento的速度事情纠结了很久。希望大家对于magento的速度优化有什么妙招，可以告诉我，嘿嘿]]></description>
		<link>http://www.magentofront-end.com/magentomuban/266</link>
			</item>
	<item>
		<title>Magento进入插件管理报错解决方法</title>
		<description><![CDATA[今天在安装magento插件的时候碰到的问题，报错信息是： Fatal error: require_once() [function.require]: Failed opening required &#8216;System.php&#8217;。这个是因为后台编译打开的原因，关掉即可。 另外还碰到个下载插件后无效的解决方法（仅限于转移服务器后），进入magento文件夹downloader\pearlib，里面有个pear.ini，删除就可以了。把安装无效的那个插件卸载了重新安装就可以了。 以上是水水友情协助，并强迫我给他的magento博客加链接http://blog.csdn.net/shuishui8310，强大的博客啊 ，可惜被百度惩罚了。magento开发人员去那寻宝吧。]]></description>
		<link>http://www.magentofront-end.com/magentomuban/262</link>
			</item>
	<item>
		<title>Magneto功能强大的分页</title>
		<description><![CDATA[Magento分页功能基本包含了常用的分页功能。之前没有去挖掘分页的功能，以为只有默认的一种，还在纠结默认的太简单了，准备换个。水水最近研究了下那东西，我就直接把他的劳动成果拿出来分享了，嘿嘿…… 这里只是简单的介绍下，让大家知道有这个功能，配置什么的都很简单。进入magento后台system-&#62;Configuration-&#62;Design有个Pagination栏，设置都在里面了，可以实现一般的分页功能了。有需要的可以慢慢玩了，如果有更好的，希望大家推荐下。]]></description>
		<link>http://www.magentofront-end.com/magentomuban/258</link>
			</item>
	<item>
		<title>去掉链接、按钮的虚框</title>
		<description><![CDATA[链接和按钮在点击的时候会默认出现虚框，有时候因为美观我们需要去掉，最近就被这个小折腾了下，总结了下往上发的一些方法。 1、a{outline:none} 这个是针对Firefox的，但是IE下无效。 2、jQuery(&#8220;a&#8221;).each(function(){this.onmouseup = this.blur();})如果网站中已经加入jQuery，可以用这个方法。 3、< a href="#" hidefocus="true">……，在a标签中加入hidefocus=&#8221;true&#8221;，这个在IE下可用，但是通不过W3C验证。 4、< input type="button" border=0 onFocus="this.blur()" name="……"> button按钮标签中加入onFocus=&#8221;this.blur()&#8221;，这个同样无法通过w3c验证。 5、input{blr:expression(this.onFocus=this.blur());}给按钮加入这个样式，往上评论说这个东西不能多用，会影响性能，我也没验证，我只在一个地方用到。 上面的方法都可行，在使用时须看实际情况针对使用。]]></description>
		<link>http://www.magentofront-end.com/magentomuban/255</link>
			</item>
	<item>
		<title>Magento获取分类的销售排行</title>
		<description><![CDATA[Magento有个热门商品的插件，但是那个插件不显示产品的销售数量，现在分享下能够指定分类，显示销售数量的方法。 新建一个block，内容： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 $totalPerPage = &#40;$this-&#62;show_total&#41; ? $this-&#62;show_total : 8; $counter = [...]]]></description>
		<link>http://www.magentofront-end.com/magentomuban/247</link>
			</item>
</channel>
</rss>

