前提是在OpenCart后台开始SEO Url,并设置好相关目录和产品的SEO keywords.
apache中,OpenCart已经提供了默认的.htaccess
而在nginx中应该使用一下规则
if (!-f $request_filename){
set $rule_0 1$rule_0;
}
if (!-d $request_f…
前提是在OpenCart后台开始SEO Url,并设置好相关目录和产品的SEO keywords.
apache中,OpenCart已经提供了默认的.htaccess
而在nginx中应该使用一下规则
if (!-f $request_filename){
set $rule_0 1$rule_0;
}
if (!-d $request_f…
OpenCart系统发新不能像Magento那样方便的在后台修改e-mail的内容模板 但是能够通过修改语言文件修改发信内容. 注册用户成功邮件的模板在语言文件夹的mail/account_create.php中修改. 例如,默认的英文邮件就在catalog/language/english/mail/ccount_create.php文件中.内容如下 // Text $_['text_subject'] = ‘%s – Thank you for registering’; $_['text_welcome'] = ‘Welcome and thank you for registering at %s!’; $_['text_login'] = ‘Your account has now been created and you can log in by using your email address and password by visiting our website or at the following URL:’; $_['text_approval']…
magento获得全部的菜单分类,这段代码的好处就是可以放在任意的phtml文件中,并且做了诸多的条件判断。我们可以参考灵活运用,供初学者参考。 此段代码来自互联网:http://www.magentocommerce.com/boards/viewthread/24947/P15/ function nodeToArray(Varien_Data_Tree_Node $node) { $result = array(); $result['category_id'] = $node->getId(); $result['parent_id'] = $node->getParentId(); $result['name'] = $node->getName(); $result['is_active'] = $node->getIsActive(); $result['position'] = $node->getPosition(); $result['level'] = $node->getLevel(); $result['children'] = array(); foreach ($node->getChildren() as $child) { $result['children'][] = nodeToArray($child); } return $result; } function load_tree() { $tree = Mage::getResourceSingleton(‘catalog/category_tree’) ->load(); $store = 1; $parentId = 1;…
LiveZilla的安装方法这里也不说了.如果需要,请看 livezilla在线客服系统安装教程 其实将LiveZilla与OpenCart整合 跟 LiveZilla与Magento整合 方法相同,相对于系统庞大复杂的Magento,与OpenCart整合更加的简单.不过每次换模板,升级模板之类的,都要重新添加一次代码,挺麻烦的.这两天就自己写了个OpenCart添加LiveZilla的插件. 注意事项 本插件仅适用于LiveZilla的Float Button方法,也就是漂浮图标的显示方式.漂浮的位置由LiveZilla生成的代码控制. 安装方法: 下载并解压缩插件包. 将admin,catalog两个文件夹上传至OpenCart的根目录 后台Extensions->Module 安装LiveZilla插件,并编辑 Status这个就不说了.肯定是Enable.LiveZilla CODE请填入LiveZilla的Float Button的Script/Code, 显示位置由LiveZilla 的Scrip/Code控制,如图 保存以后,到首页刷新一下看效果吧 Module页面LiveZilla插件显示的Position不用理会,默认Left的.呵呵 LiveZilla插件下载 :
此文章仅讲述如何将安装好的LiveZilla与Magento整合,LiveZilla的安装方法这里不再叙述,如果你不知道如何安装LiveZilla请看LiveZIlla在线客服系统安装教程这篇文章. 其实将LiveZilla添加入Magento有很多方法,这里就介绍三个比较普遍的方法. 如果你只想在某个或几个固定页面的显示LiveZilla的图标,那么你可在magento后台创建一个static block,在其中粘贴上LiveZilla提供给你的Script/Code代码 <!– LiveZilla Chat Button Link Code (ALWAYS PLACE IN BODY ELEMENT) –><div style=”text-align: center; width: 145px;”><a href=”javascript:void(window.open(‘http://jidda.name/livezilla/chat.php’,”,’width=590,height=610,left=0,top=0,resizable=yes,menubar=no,location=no,status=yes,scrollbars=yes’))”><img src=”http://jidda.name/livezilla/image.php?id=01&type=inlay” width=”145″ height=”69″ border=”0″ alt=”LiveZilla Live Help” /></a><div style=”margin-top: 2px;”><a href=”http://www.livezilla.net” target=”_blank” title=”LiveZilla Live Help” style=”font-size: 10px; color: #bfbfbf; text-decoration: none; font-family: verdana, arial, tahoma;”>LiveZillaLive Help</a></div></div><!– http://www.LiveZilla.net Chat Button Link Code –><!– LiveZilla Tracking…
LiveZilla是功能强大且免费开源的在线客服系统.LiveZilla以强大的功能,卓越的品质,稳定的系统迅速成为最好的网站网店免费开源在线客服解决方案. LiveZilla官方网站:http://www.livezilla.net LiveZilla官方下载地址:http://www.livezilla.net/downloads/en/ LiveZilla的优点: 真正完全免费开源的没有任何功能限制的在线客服软件,没有网站、用户数量限制,亦可用于商业网站. 安装简单,可用于任何网站.(与网站的结合需要一点HTML知识) 支持网络视频对话,让您提供更有特色的服务. 可以清晰的跟踪客户所在地理位置. 不借助第三方平台,在您的网站主机和本地计算机即可安装使用,能够完全自主掌控所有数据. 可定制化程度极高.可自由定制图标、文字、界面、网站上的显示方式. 实时聊天帮助,能提供更人性化的客户服务.提高网站的用户体验.并可以设置多部门的客服,以及能对客服进行评分. 提供访客监控功能.能够监控访客所在的国家地区、浏览器、操作系统、浏览器语言、浏览器分辨率、来自哪个网站、页面关键词和IP. LiveZilla的缺点: 需要在自己的电脑上安装软件. 对网站服务器资源占用较高 LiveZilla安装教程: 下载LiveZIlla安装包,并一直下一步安装LiveZilla(不多说了) 运行LiveZilla Client,点击Edit Server 点击Server Admin创建配置 如果你有一个新网站并未安装Livezilla Server就选择第一个Create New LiveZilla Server,如果此网站以前安装过LiveZilla Server要在本机导入,就选第二个,测试,选择第三个- -这里我们选择第一个Create New LiveZilla Server 填写该网站客服的ID,姓名,邮箱及设置密码 填写此账户的部门,第一次所创建的也有管理权限 上传你的LiveZilla Server至网站服务器,一般来说都选择第一项FTP Upload上传,如果你的网站服务器是在本机,就选择第二项 FTP上传LiveZilla Server设置,见图 点击下一步后,就会出现上传LiveZilla Server的窗口,见图 传输完成后会提示设置文件及文件夹的权限(类UNIX服务器中),直接下一步设置. 填写网站的域名及LiveZilla Server的路径 配置数据库,点击Create Tables创建LiveZilla Server相关的表,跟着提示,LiveZilla Server就算安装完成了 剩下的就是配置LiveZilla的在线图标等,跟着一步一步做,很简单的 选择才建的LiveZilla Server,下一步 输入登录信息,下一步 剩下最后一步,配置LiveZilla在网站显示的代码了~这里不详细解释了,看图 最后一步,在你网站合适的位置加入 Scripts…
首先先找到 <block type=”catalog/product_view_tabs” name=”product.info.tabs” as=”info_tabs” template=”catalog/product/view/tabs.phtml” > <action method=”addTab” translate=”title” module=”catalog”><alias>description</alias><title>Product Description</title><block>catalog/product_view_description</block><template>catalog/product/view/description.phtml</template></action> <action method=”addTab” translate=”title” module=”catalog”><alias>additional</alias><title>Additional Information</title><block>catalog/product_view_attributes</block><template>catalog/product/view/attributes.phtml</template></action> <block type=”review/form” name=”product.review.form” as=”review_form”> <block type=”page/html_wrapper” name=”product.review.form.fields.before” as=”form_fields_before”> <action method=”setMayBeInvisible”><value>1</value></action> </block> </block></block> 替换为 <block type=”catalog/product_view_tabs” name=”product.info.tabs” as=”info_tabs” template=”catalog/product/view/tabs.phtml” ><action method=”addTab” translate=”title” module=”catalog”><alias>description</alias><title>Product Description</title><block>catalog/product_view_description</block><template>catalog/product/view/description.phtml</template></action><action method=”addTab” translate=”title” module=”catalog”><alias>additional</alias><title>Additional Information</title><block>catalog/product_view_attributes</block><template>catalog/product/view/attributes.phtml</template></action><block type=”review/product_view_list” name=”product.info.product_additional_data” as=”product_review” template=”review/product/view/list.phtml”> <block type=”review/form” name=”product.review.form” as=”review_form”> <block type=”page/html_wrapper” name=”product.review.form.fields.before”…
function getContents() { var request_url = “test1.html”; // 需要获取内容的url var request_pars = ”;//请求参数 var myAjax = new Ajax.Updater(‘result’, request_url,{ // 将request_url返回内容绑定到id为result的容器中 method : ‘get’, //HTTP请求的方法,get or post parameters : request_pars, //请求参数 onFailure : reportError, //失败的时候调用 reportError 函数 onLoading : loading, //正在获得内容的时候 onComplete : done //内容获取完毕的时候 }); } function loading() { $(‘loading’).style.display = ‘block’; } function…
在写插件时,有的用户安装magento时设置了表的前缀,而有的用户没有,如果直接把表名写死在那,是不正确的。 magento提供了获取表名的的一个方法: $tableName = Mage::getSingleton(‘core/resource’)->getTableName(‘默认表名’);
鉴于现在的VPS越来越便宜,很多人想自己用VPS搭建LNMP环境.现在网上也有LNMP一键安装包,有利有弊吧. 安装好基本的VPS环境后,root登陆centos
# vim /etc/yum.repos.d/jidda.name.repo
加入以下内容
[CentALT] name=CentALT Packages for Enterprise Linux 5 –… more »