Invoice, proforma vs receipt

在中国发票是由税务机关控制的,所以在中国人眼里,发票就是正规收条。无论先收货后付钱还是先付钱后收货,发票始终是发票。 西方的税务制度完全不同,税务机关不印发票,于是各公司的发票五花八门,但都算是正规发票。在西方人眼里,如果收到一张 invoice,那意味着有人在向他催钱;如果付了钱,那么应该有一张 receipt。我以前不懂其中奥妙,别人付过钱,我对他说:“We’ll send you an invoice.” “我们会寄发票给你”?这话中国人听了觉得很正常,西方人听了,肯定觉得我拎不灵清,怎么付过钱了还在向他讨钱! 简言之,invoice 就是 proforma / proforma invoice,使用 proforma 一词只是为了加重语气,或者为了避免二义;receipt 不可与 invoice 等同使用。

Magento defect in running multi-stores

First I want to declare – I love Magento very much! 但再完美的东西也是有缺陷的。正是因为 Magento 接近完美,所以改正它缺陷的愿望也强烈些。Magento website – store – storeview 3-tier 的模型逻辑分明,可是 Magento 在解释模型时用词不一致,造成最终用户和开发者如果是同一人的话思维混乱: 最终用户:website – store – storeview These terms are used in documentation, and designer’s guide. 开发者:website – group – store These terms are used in php code, and database table/field names. 这还是小毛病,关键是根据访问域名(或别的条件)加载不同的 website,… Continue reading Magento defect in running multi-stores

Make a future proof theme for Magento

很久以前做 Magento theme,直接把 default theme 所在目录复制到另一个目录。后来才知道定制 theme 不是这么干的,正确的做法是新建一个目录,要改什么文件就拷贝什么文件过来修改。这样既能个性化,又能向后兼容(如果修改部分跟新版本的 default 不冲突的话)。 Magento 在我做完 theme 后的某个版本开始支持 flat category 和 flat product,我一直无法垂涎这个功能,但一启用页面就是空白。知道今天才定下心来修改我的 theme 下的文件,把我没修改过的文件都删了。其实修改过的文件不多,十个左右,然后比较了新老文件(我修改的文件和对应的新版 default 文件)的差异,添加了一些 default theme 新增的语句,终于可以启用 flat category 和 flat product 啦。 因为产品不多,只有 200 个,感觉快了 3-5%,request per second 从 11 以下跃成 11 以上,Pingdom 测试也得到一个创记录的 2.23 秒(其中 index.php 的完成时间 0.6 秒,但 Pingdom 多次测试结果之间变化较大,大概跟 Pingdom 服务器当时状态有很大关系)。虽然没有体会到 Magento… Continue reading Make a future proof theme for Magento