Update index after moving category in Magento

这介于 bug 与 usability issue 之间: Moving category 使 category url 发生变化后,该 category 所属产品无法 add to compare,Compare, Compared, Viewed sidebars 统统不正常。 我在 Magento 1.4.2.0 上发现这个问题,或许早先版本一直存在这个问题。我认为它象 bug,是因为 moving category 后 Magento 不提示 reindex index。 解决办法也很简单,就是 moving category 后,用 System >> Index Management reindex 一下。

Magento sitewatch module

在 ebuyer 上关注 OCZ 120GB RevoDrive SSD 很久了,它的价格一直在 £245 左右,比第二选择 OCZ 120GB Vertex 2E SSD 贵出近 £70。RevoDrive 比其他 SSD 的 data transfer rate 要快一倍左右,但我吃不准这一倍的快速能否在我的电脑上体现,所以一直犹豫着。 今天中午无意中上 ebuyer 又看了一下,发现 RevoDrive 突然降到 £230,这降价让我觉得多时的观望得到回报,刺激我立马就买了它。 下午,收到 dabs 的 newsletter,其中提示 DrayTek Vigor 2820 从 £155.78 降为 £134.99。我三天前刚从 broadbandbuyer 买过 Vigor 2820n,当时还上 dabs 比较过价格,所以对 Vigor 2820 系列比较敏感。幸好当时买的不是 Vigor 2820,否则现在有遗憾了,broadbandbuyer 目前 Vigor 2820… Continue reading Magento sitewatch module

Magento layout handle name is misleading

在 Magento app/design/frontend/base/default/layout/catalog.xml 文件里有一段让我费解的配置: catalog_category_layered_nochildren,从字面上看,应该是只对 is_anchor == 1 并没有子目录的目录有效;但事实上,它对所有没有子目录的目录有效,所以我想,handle 应该取名 catalog_category_nochildren 更合适。Mage_Catalog_CategoryController::viewAction() 里有一段 由此可见这里仅检验 hasChildren,未检验 getIsAnchor。 catalog.xml 里把 right.reports.product.viewed 移除又添加,重新添加后 block 叫 left.reports.product.viewed,但实际位置仍在右边。这么做有什么意义?我费神地看了半天,得出的结论是: 没有意义。大概 Magento 是借此演示一下 layout syntax。 虽然没有意义,但是影响还是有的,有这一段,nochildren 的 category page sidebar 排序为 Compare, Compared, Viewed;否则排序为 Compare, Viewed, Compared。

I am on KDE

两年前开始使用 Fedora desktop 时,我盯着 Gnome 和 KDE 看了半天,想不好到底用哪个。我决定用 Gnome,仅是因为 Gnome 在 Fedora 众多 spin 中排第一个,在我不熟悉 Fedora desktop 时,使用 Fedora “推荐” 的 Gnome 更容易度过难关。 我想我的决定没有错。只是,最近要更新 Fedora 到 Feora 14(我一直用最初的 Fedora 11 没跟上来),我又想起 KDE,不敢说我已摸透了 Fedora 的习性,但是不是可以换换口味?看了几个 KDE 的视频,非常的 tempting,于是决定一试。 试过几天,我直想说——真应该早点试上 KDE。 KDE 很华丽,但决不是 apple 产品徒有其表。默认状态任务栏(在 KDE 中叫 panel)在下方,跟我的使用习惯一样,在 Gnome 中我要调整老半天才能出一个顺我手的桌面。 KDE 也很稳定,我一直担心很眩的东西不稳定,这下看来担心是多余的。或许 KDE 消耗的资源比 Gnome 更多一些(这是我的猜想,我没研究怎么去 benchmark… Continue reading I am on KDE

Published
Categorized as 杂草 Tagged

Ajax Layer Navigation module for Magento

有人要我对 Magento layer navigation 做些小修改,我觉得修修补补没有意义,要做就做一系列的修改,于是按我觉得可以改进的方向,列了以下几点。 Add ajax load/change products on page loads or filter changes (TODO) Add option to show/hide category filter Add option to show price filter as slidebar (TODO) Add option to control price accuracy Add up to 3 sort by’s (TODO) (Someone already asked for a second sort by) Add option to… Continue reading Ajax Layer Navigation module for Magento

Keep pace with Magento

I tried Magento 1.4.2.0 RC1 today, and noticed it had added “Include in Navigation Menu” option in Manage Category. I am very happy seeing this because I made it happen before Magento did. I call it “Exclude in Top Navigation”. I also have added an option “Exclude in Sitemap” which is not available in newest… Continue reading Keep pace with Magento

Install / uninstall Adobe Reader on Fedora

在 Fedora 上安装 Adobe Reader (最新版本 9.4) 本来是非常简单的一件事,很久以前我装过一次,今天在新系统上第二次装,竟然花了两个小时。 最主要的原因是我下载了错误的文件,我以为老马识途,没仔细看下载了一个 bin 文件,安装后尝试着执行被 SELinux 阻止。 Summary: SELinux is preventing /opt/Adobe/Reader9/Reader/intellinux/bin/acroread from making the program stack executable. Detailed Description: The acroread application attempted to make its stack executable. This is a potential security problem. This should never ever be necessary. Stack memory is not executable on most OSes… Continue reading Install / uninstall Adobe Reader on Fedora

How is customer_logged_in/out handle added to Magento layout?

I was wondering how Magento merge or handle into handle in layout. I was expecting something like Obviously, there is not such codes in layouts. I searched within Magento folder for keyword “customer_logged_in”, but only occurrences I could find in layout/customer.xml. So, how is customer_logged_in/out handle added to Magento layout? At last, I found by… Continue reading How is customer_logged_in/out handle added to Magento layout?

Never use dotless domain for Magento installation

Magento 说不要使用 localhost 安装,我也就不用,也没深究原因。 我为了在本地调试一个网站,先拿了生产网站 euro-bags.eu 的一个子域名。后来该子域名被挪作他用,那时我想,如果换个子域名再被挪作他用,我干脆用一个用于域名保护而未建站的域名,于是开始用 euro-bags.com 来调试。 没过很久,Euro Bags 要在生产网站上实施一条网站提速实践:静态文件使用单独的 cookieless domain。因为 euro-bags.eu 使用了顶级域名,顶级域名上使用了 cookie,那么子域名上无法实现 cookieless。Euro Bags 也不想依赖第三方服务 cookieless domain,于是启用 euro-bags.com 专门为生产网站提供静态文件。 我的调试域名再次被挪作他用。为了防止此类不可预测的事情发生,我想到干脆用一个不可能用于生产网站的域名来完成调试,于是想到用 euro-bags。 一开始没发现问题,用了几天后想登录 euro-bags admin area 发现登录不了,输入密码后总是弹回到登录页。 百思后才得其解,原来在 Magento 里使用任何 dotless hostname 都犯了跟使用 localhost 同样的禁忌。Magento 基于安全考虑在 cookie 里打上 domain 烙印,而大部分浏览器用拒绝接受含 dotless hostname 的domain 烙印。虽然可以 comment out app/code/core/Mage/Core/Model/Session/Abstract/Varien.php 某些行让 Magento 在 cookie… Continue reading Never use dotless domain for Magento installation