聚合

magento首页显示产品

1.首先现在magento后台创建一个新的分类,记下这个分类的 ID 号码。使用这个新建的分类来管理你的首页产品,这个分类设置为前台不可见。这样就不会显示在你的分类菜单中了,但使用代码调用的时候却会显示出来。 2.在cms–>manage page–>home 适当位置添加如下代码(例如代码的最后) (注意编码,你直接复制黏贴可能不行,要是英文的标点符号,不行就切换到英文输入法,然后自己手动的敲下。关闭你的所见即所得编辑器,再在如下图中的“内容”中黏贴此代码) {{block type=”catalog/product_list” category_id=”3” template=”catalog/product/list.phtml“}} 使用xml来显示的话,在如下图中的“设计”中,添加XML代码如下 <reference name=”content”> <block type=”catalog/product_list” name=”featured” template=”catalog/product/list.phtml”> <action method=”setCategoryId”><category_id>[category id here]</category_id></action> </block> </reference> 代码解释如下: 我们在magento后台新建一个分类,向这个分类中添加的产品会在首页显示。在magneto成功添加一个分类后,会给这个分类分配一个ID。红色部分“category_id”的值“3”既是此分类ID。“list.phtml”既是此产品列表的模板样式文件。 XML中的template是指模板路径,[category id here],包括中括号都删掉换成你的分类的ID号。如果想在首页显示产品,这段xml加在 后台CMS homepage这个page的layout update中。如下图 补充文章地址:http://www.hellokeykey.com/magento-change-product-list-display/ 请查比较全面的英文教程:http://www.magentocommerce.com/wiki/groups/248/display_products_on_home_page 转载表明出处: hellokeykey.com [category id here]

magento 页面中加入CMS static block

在magento的模版中有些内容想通过后台来控制,那么你可以将这些html css js 放在CMS的static blocks中,然后用下面的代码来在前台输出。此分为两类,一个是在magento模板文件.phtml中输出这些block,一个是在后台的CMS中输出这个block。 1.写到phtml文件里的的PHP代码如下: <?php echo $this->getLayout()->createBlock(‘cms/block’)->setBlockId(‘your_block_Identifier’)->toHtml() ?> 其中setBlockId(‘your_block_Identifier’)的参数your_block_Identifier,为你在后台创建static block时填的Identifier值,如下图 2.在magento后台的CMS中如果要在一个block或page中调用另一个static block,代码如下 {{block type=”cms/block” block_id=”your_block_identifier” template=”cms/content.phtml”}} block_id的值就是你需要调用的block的Identifier。 注:因为magento版本关系,可能稍有不同,但是差不太多的。 转载标明出处: hellokeykey.com

magento模板主题安装

注意区分“主题包”和“主题文件”这两个概念。我们所使用的主题在“主题文件”中,“主题包”中可以含有多个主题文件 ###### 认识magento主题第一步 首先我们来看下magento主题文件的存放规则 主题文件路径一般为 app/design/frontend/主题包所在文件夹/主题文件所在文件夹/layout+locael+template skin/frontend/主题包所在文件夹/主题文件所在文件夹/css+images+js ###### 认识magento主题第二步 当我们新安装好一个magento的时候,magento使用default主题包中的default主题文件路径如下 app/design/frontend/default/default skin/frontend/default/default 红色部分为主题包的名字“default” 蓝色部分为主题文件夹的名字“default” 因为default主题是magento的默认设置,所以在后台的设置中留空就是设置为default ###### 认识magento主题第三步 我们来看后台 system—>configration—->general—>design 若要使用的主题文件路径如下,后台的设置便如下图所示 app/design/frontend/default/blank skin/frontend/default/blank ###### 认识magento主题第四步 当你购买到一个新的magento主题的时候,他的主题包的名字可能是blank,他的文件路径可能是如下的样子 app/design/frontend/blank/theme039 skin/frontend/blank/theme039 则后台的设置的时候,主题文件包的名字是“blank”,主题文件夹的名字是“theme039” ##注意 若你的主题包中有如下的文件 app/design/frontend/blank/default skin/frontend/blank/default 后台的 design—>theme 的 设置的最后一项”Default”出,最好填写“default”这个主题文件的名字 此文章的补充内容地址:http://www.hellokeykey.com/magento-easy-way-to-set-template/ 转载标明出处:hellokeykey.com 右兜钥匙

magento使用google analytics

magento与google的很多功能是无缝集成的,这个展现了magento在seo方面的强大。 用了magento就不用傻到在页面里添加google analytic的跟踪代码了,激活google analytic的的电子商务跟踪服务,网站的各种转化率也尽收眼底。 5.经过上一步的操作,回到第三步的页面点击页面下面的“保存并完成操作”,magento与google analytic的关联就做好了。务必在第四步的时候刷新magento的缓存,是magento自动生成google analytic的跟踪代码。 6.下面介绍如何开启google的电子商务跟踪服务,次服务的开启是在google analytic上进行的

apache 301重定向

apache 301跳转对seo是友好的,所以用apache的配置文件进行301跳转时很有用的。 修改 apache配置文件 例如,我现在服务器上的网站域名是 www.mytwo.com ,我又想让www.myone.com也打开www.mytwo.com,代码如下 <VirtualHost *:80> ServerName www.myone.com RedirectMatch Permanent ^/(.*) http://www.mytwo.com/$1 </VirtualHost> 另一个示例,apache虚拟主机配置示例: <VirtualHost 213.5.65.230:80> ServerAdmin cc@cc.com ServerName www.hellokey.com ServerAlias hellokey.com RedirectMatch Permanent ^/(.*) http://www.hellokeykey.com/$1 </VirtualHost> 将www.hellokey.com 301 跳转到 www.hellokeykey.com 如果使用.htaccess 来实现,直接到网址:http://www.htaccesseditor.com/sc.shtml 来设置就好了,这个是在线的傻瓜编辑器,将生成的.htaccess贴到我们的.htaccess文件就好了。 转载标明出处:hellokeykey.com 右兜钥匙

apache .htaccess no-www to www

参考:http://www.askitexpert.com/question/redirect-nonwww-to-www-in-apache/10
有两种办法
1.在.htaccess的适当位置加入如下代码 yourdomain改成你的域名
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com [NC]
RewriteR…

magento img 标签 使用

在magento的phtml文件中参考如下代码 <img src=”<?php echo $this->getSkinUrl(‘images/myImage.png’) ?>” alt=”" /> 在后台的CMS中使用 ,参考如下代码 <img src=”{{skin url=’images/media/myImage.jpg’}}” alt=”" /> 其中(‘images/myImage.png’)中的images是主题文件夹中的images文件夹 转载标明出处:hellokeykey.com 右兜钥匙

linux 安装 magento 文件权限

进入magento根目录
执行如下设置权限的命令,magento即可以正常安装
# chmod o+w var var/.htaccess app/etc
# chmod -R o+w media

若在使用magento connect的时候提示权限报警,进入magento根目录执行如下命令
#find …

magento 添加省 市 地址

范例如下 在mysql中 执行下列sql语句 INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, ‘CN’, ‘BJ’, ‘北京’); 红色部分,应该是你的maento数据库名字,本例中使用 “magento” 绿色部分,应该是你magento数据库中的表的名字,注意你的表有没有添加前缀,本例中使用“directory_country_region” INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, ‘CN’, ‘BJ’, ‘北京’); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, ‘CN’, ‘GD’, ‘广东’); INSERT INTO `magento`.`directory_country_region` (`region_id`, `country_id`, `code`, `default_name`) VALUES (NULL, ‘CN’, ‘SH’, ‘上海’); INSERT [...]

apache 多ip 多域名 虚拟主机配置

#由于是多 ip 监听同一个端口所以这样写 Listen 80 #若是多ip 多端口 则是 #Listen 192.170.2.1:80 #Listen 192.170.2.5:8000 #由于使用多ip NameVirtualHost这样设置了下,没查到详细的资料 NameVirtualHost 1.2.3.4:80 NameVirtualHost 5.6.7.8:80 #第一个ip给域名www.hellokeykey.com <VirtualHost 1.2.3.4:80> ServerAdmin key@hellokeykey.com DocumentRoot /var/www/html/hellokeykey.com ServerName www.hellokeykey.com ServerAlias hellokeykey.com </VirtualHost> #第二个ip给域名www.magentokey.com <VirtualHost 5.6.7.8:80> ServerAdmin key@hellokeykey.com DocumentRoot /var/www/html/magentokey.com ServerName www.magentokey.com ServerAlias magentokey.com </VirtualHost> 转载标明出处:hellokeykey.com 右兜钥匙

TOP Online Store
1.Girls' Generation, a Fantasy Jewelry online Store. Nobody Can Keep Away From the Beauty:tiffany ca 2.China Wholesale Electronics:China Wholesale Electronics 3.The android phone is best:Android sale.The Android Ice cream sandwich well be best Android OS. 4.R4 3DS for sale:R4 ds shops,and support Japanese R4:R4 販売. 5.fashion bag:armani watches and MBT shoes.
R4 V1.4.2 and your R4i Gold 1.4.2 and R4i GOLD 3DS card V1.4.2 can not work on it.
Please update your R4i Gold 1.4.2 and R4i GOLD 3DS card V1.4.2 card with this patch. Please read readme.txt attached firstly.Just do as the procedures listed in readme.