从有这个博客开始,我的博客迁移了最少有7次之久,从自有服务器在上海机房,迁到江苏机房(只换IP,还好)
膘叔的简单人生
从有这个博客开始,我的博客迁移了最少有7次之久,从自有服务器在上海机房,迁到江苏机房(只换IP,还好)
A) to add tags directly when entering/editing a product, you will need an extension, such as this one. This method is most useful to let people with less magento experience create tags (such as data entry people).
B) To add tags without leaving the administrator (not going to the frontend). This is useful for applying the same tag to multiple products:
Create tags through Catalog->All Tags-> Add New Tag button.
After creating the tags, click on each tag. You’ll see a detailed set of options to “Edit Tag”.
Go to the “Products tagged as administrator” tab, click on ‘Reset Filter” . You see all your products getting listed.
Select the products to which you want to assign the tag & click on “Save Tag”.
C) To add tags via the frontend & the backend, which is useful when you want to add a lot of tags to each single product:
Just create your products as normal. When you are ready to add tags to your products just create yourself a customer account for your store and go to each product and add them as a customer would. I wrote out all of my tags in a text editor. Now since I am using phrases, and not just words, my tags will be entered as:
‘Stylus C64’ ‘Stylus C66’ ‘Stylus C84’ ‘Stylus C84N’ ‘Stylus C84WN’ ‘Stylus C86’ ‘Stylus CX3600’ ‘Stylus CX3650’ ‘Stylus CX4600’ ‘Stylus CX6400’ ‘Stylus CX6600’
Take note that you need the single quote (’) to bracket your phrases… or just spaces between each word if your tags are single words. Very easy to write out and then copy/paste into the Add Your Tags section of each product.
Once you copy/paste your tags in the front-end you will be prompted with a message that they must be approved from the admin/moderator. Now log into the back-end and go to the tags section (Catalog > Tags > Pending Tags). There you will see the list of tags you just submitted from the front-end of the site. Now just click “Select All”, then from the Actions drop-down menu choose “Change Status”, and then from the status drop-down choose “Approved” and then “Submit”.
Now you can pick a method most appropriate for each type of use!
http://stackoverflow.com/questions/9261935/add-tags-when-creating-product-in-magento
最近在做magento二次开发,遇到个问题,即,我要针对商品的数据中的某些数据做二次处理。看了一下代码,发现在initProduct前有一个event事件:catalog_product_prepare_save,所以我想我只要覆盖这个方法就OK了。网上找了些资料,发现如果再绑定一个event则多个Event都会执行。于是,我就按照这个思路在config.xml里加入了events事件。
然后在Model下面加了Observer.php来监听事件。为了测试系统自有的event能够工作,我在系统默认的event里做了一下输出,发现确实有变化 了。所以证明我的思路还是正确的。当然,这也借鉴了网上的一些资料
config.xml里加入:
<adminhtml>
<events>
<catalog_product_prepare_save>
<observers>
<xxx_web_observer>
<type>singleton</type>
<class>Xxx_Web_Model_Observer</class>
<method>prepareProductAuthor</method>
</xxx_web_observer>
</observers>
</catalog_product_prepare_save>
</events>
</adminhtml>
本来我class想写成xxxx/observer的,但死活通不过,我不知道是我写错了。还是。。最后写成详细的类名才OK。(也可能是因为不在系统目录下,而在local目录下的原因吧?)
Observer就不写了。参考core/mage/bundle/model/observer.php即可(本来有大小写的,我忽略了)
起因来自,有人说我打包的phonegap的APP没有ituneArtwork,于是网上找了下,发现了一篇文章,来自:http://bbs.weiphone.com/read-htm-tid-144479.html
作者说的很简单,3步走即可
1、下载附件里的rar,解压
找到你想要做ipa的*.app,把*.app放入Payload里
用xp自带的记事本编辑Info.plist,找到<string> </string> 把中间的空格填入程序的名字 有4处要改
CFBundleDisplayName下面可以随便填,中文也行,这个是在iphone里显示的名字
CFBundleExecutable下面不能随便填,这是执行名字,也就是*.app下的执行文件名是123,那么这里必须填123
CFBundleIconFile这是iphone里显示的图标,一般*.app文件夹里是icon.png,如果是12b.png,请把CFBundleIconFile下面的icon.png改为12b.png
否则图标显示不正确,但是可以程序运行
CFBundleIdentifier和CFBundleName这个随便填,最好用程序名,比如12b.app 你就在那两个下面改为12b
保存并退出后,把Info.plist放入*.app里
2、把Payload和iTunesArtwork用标准zip格式压缩 在winrar里选择标准zip
iTunesArtwork是一个标准的jpg文件,你给他加个jpg扩展名后就可以打开看了。随便用什么jpg图片都可以,这个是显示在itunes里的图片,与iphone程序的图标无关。iphone程序图标只与*。app里的icon,png有关
iTunesArtwork像素一般要求是512X512.,你要是有兴趣也可以设别的试试
在这里我用的是itunes默认的黑色图标
3、把zip扩展名改为ipa扩展名
ok,ipa程序做好
-----
附件就是那个info.plist和payload的打包
为什么我的vps在重启后mysql都不能启动?带着这个问题,我看了很多信息,比如rc0.d/~rc6.d这些目录。一个个里面都有mysql的启动脚本。那为什么还是不能启动呢?
在vampire的提示下。看了:dmesg | grep mysql,结果返回空。
然后又运行了:cat /var/log/daemon.log,仔细翻了一下,居然发现了一条这个:
Nov 7 21:53:36 vpsname /etc/init.d/mysql[988]: ERROR: The partition with /var/lib/mysql is too full!
咦。这是什么??怎么会满了?然后我ls -la /var/lib/mysql
我靠:
lrwxrwxrwx 1 mysql mysql 29 Dec 10 2012 mysql -> /server/???/mysql/mysql/
得,原来我mysql的存储是放在/server/盘下面,/server盘是什么?df -h看了一下:
/dev/xvdb 30G 3.7G 25G 14% /server
原来是我挂载的硬盘啊。
于是我一下子心里就明白了。我在rc.local里写了一句:mount xxx xxxx,但是启动mysql在mount前面,所以。。。。
到这里我就明白了,要么。我在mount后面主动启动一下,要么我将/server的信息写到/etc/fastab里面。二选一。
我最终还是偷懒了。怎么做,我不告诉你们
由于buyvm的内存其实很少,所以我如果跑apache+php,担心会卡。所以我想是不是可以跑个go呢?
话外页,这是一篇好文章,深入浅出的写出了很多东西,所以,值得一看,有时候,写文章就是这样,你写的越学术,别人越不鸟你,毕竟不是每个人的知识点都象你那么丰富。所以一篇好的文章,能够很直白的表达出来才是最OK的。说起来,当年白居易就是写诗给90岁的老太太听,她能听得懂,这就是好诗(这是老师当年说的,我没有认证过。)
上菜:http://www.zhihu.com/question/21518760
有人提问:
之前有人在博客里回复,怎么反向代理不能用了。
Javascript的一个组件zepto恐怕现在很多人都在用了。毕竟它几乎完全兼容jquery的语法。而且压缩后只有9K。所以大部分人在做移动端的时候就开始选择了zepto。它足够轻量。
毕竟你想一个jquery几十K,再加上一个jquery-mobile。得。。。等死吧。啥也没做200K没了。
但它毕竟和jquery不太一样。有点小坑
1、jquery的$('aaa :eq') ,这种伪类的选择符。它不支持。但可以用$('xxx').eq()这种函数式来代替
2、新版默认不支持touch事件了。这点要注意
不过大部分情况下,都够你使用了:http://zeptojs.com/
PD是我第一个mac上的正版软件。最近刚升到10.9,发现我原来的7不能用了。而我事实上用pd的时间已经没有原来多了。所以我就很纠结。所幸,网上有人提供了一些Beta版,我就下载来测试了一下
本站不提供下载,请围观此贴:http://mac.pcbeta.com/thread-144172-1-1.html
下载好后,如果你没有软件查看sha1的话,你可以直接php -r "echo sha1_file('/Users/???/Downloads/Parallels_Desktop_9.0.23136.932290_%5BHIOb%5D_Fix.dmg');"
可以看一下sha1是否正确。当然你还是有可能会出现1个CPU,0M内存的BUG,翻到第13页,有人回复:
If anyone faced with the problem of failing to start a virtual machine, because she has "more than 1 MB of memory and can not be started", then try this solution (I helped)
1) Close the Parallels Desktop
2) Remove the Parallels folder from / Library / Preferences (namely from the system Library, and not from the user!)
3) Start Parallels Desktop and select "Add existing virtual machine", then enter the path to your virtual machine
OK,就这么愉快的解决了