opencart 手机模板怎么区分手机,pc

电脑本地OpenCart1.5.6安装教程 - 开源中国社区
当前访客身份:游客 [
当前位置:
建议大家加入qq群:讨论opencart的使用和技术问题。
如本论坛中另一篇帖子&&
&&所述已经建立了本地运行opencart的服务器环境,现在进行OpenCart的本地安装及运行教程。
1. Opencart下载。有两个地方可供您下载Opencart系统源代码(其它的下载链接不保证是否系统源代码被植入了木马程序等):
a. 英文官网
b. 中国网站
2. 点击你需要的OpenCart版本的下载链接,下载源代码。建议使用最新版本的OpenCart源代码。在本教程制作时,OpenCart的最新版本是V1.5.6,如果您想获取最新版本 《OpenCart中文使用手册》 ,请访问关注此网页:/download.html
本教程以OpenCart V1.5.6版本为例。
3. 文件下载后,是一个名为opencart-1.5.6的压缩包,使用解压缩软件winrar或360解压缩软件将该文件解压缩,此时会解压为一个opencart-1.5.6的目录,目录内结构如下所示:
opencart_1.jpg (40.11 KiB) 被浏览 207 次
里面的install文本文件是安装说明等;
License是版权说明;
Upgrade是升级说明;
Upload文件夹包含了所有的opencart 源代码.
4. 打开目录F:/wamp/www(注意,这个目录要根据你安装wampserver时的选择来定,如果你不使用wampserver,当然是在你喜欢使用的本地测试环境下建立相关目录了),在其中创建文件夹opencart(随你喜欢的任何英文字符目录吧,包含数字也可,但建议别用中文)。如下图所示:
opencart_2.jpg (65.68 KiB) 被浏览 207 次
5. 将刚才解压缩后的目录opencart-1.5.6下的文件夹 upload 下的所有文件复制到F:/wamp/www/opencart目录下。注意不是复制upload文件夹本身,而是其下的文件及子文件夹等。复制后如下图所示:
opencart_3.jpg (139.4 KiB) 被浏览 207 次
6. 创建数据库。在保证wampserver正常运行的情况下下(标志是您的屏幕右下角的wampserver的图标是绿色的),打开浏览器(强烈建议你使用Firefox,IE7+,Chrome, Opera等国际流行浏览器,国内诸如360浏览器,百度浏览器等的功能确实不敢恭维)输入http://localhost/phpmyadmin/ ,出现如下图所示界面:
opencart_4.jpg (61.85 KiB) 被浏览 207 次
上述页面的出现,是默认的数据库管理界面需要你输入用户名密码。在我们安装wampserver时,默认的用户名username是root,因此username部分输入root即可,password部分无需输入任何内容。点击Go按钮继续。
此时会出现如下界面:
opencart_5.jpg (457.19 KiB) 被浏览 207 次
上图中左侧是wampserver系统默认的几个数据库文件,尽量不要动它。当然了,如果你觉得自己的水平蛮牛叉的,尽管动它呗。
点击途中箭头所示Database部分,会出现下图所示:
opencart_6.jpg (211.7 KiB) 被浏览 207 次
如下图所示输入我们要创建的测试用的数据库名testbyme,后面的Collation选择utf8-general_ci,
opencart_7.jpg (82.34 KiB) 被浏览 207 次
点击Create按钮创建该数据库。此时右侧会出现你所创建的数据库testbyme。如下图箭头所示:
opencart_8.jpg (182.8 KiB) 被浏览 207 次
7. 运行OpenCart安装程序。在浏览器地址栏输入
此时OpenCart安装程序将会自动转向到安装地址
如下图所示:
opencart_9.jpg (507.3 KiB) 被浏览 207 次
选中复选框I agree to the license,然后点击Continue,出现如下界面:
opencart_10.jpg (277.24 KiB) 被浏览 207 次
上图中三个红色的标记部分,说明有些地方没有设定好。
a. 2,和3的错误,指的是找不到相关文件,此时你需要将f:/wamp/www/opencart/config_dist.php文件名字改为config.php
再将f:/wamp/www/opencart/admin/config_dist.php文件名字改为config.php
b. 此时在浏览器此界面情况下按下键盘上的F5刷新页面,会看到2和3的红色错误提示没有了,但1的错误仍然存在。
c. 1的错误之所以出现,是因为OpenCart电子商务系统需要用到cURL这个PHP扩展,详细的资料,您可以参看文章:
d. 现在来解决1的错误。用鼠标点击你的桌面右下角的wampserver图标,会出现菜单,逐渐移动鼠标位置PHP –& PHP extentions -& php_curl,用鼠标点击选中php_curl,此时wampserver会自动重新启动,标志是图标变为暗黄色,最后转为绿色,成为绿色时表明重启动结束,此时curl扩展也加载成功了。
e. 如果在没有启动curl的情况下点击Continue按钮,会出现如下错误提示:
opencart_11.jpg (337.06 KiB) 被浏览 207 次
f. 现在curl的问题排除了,点击按钮Continue,会出现如下界面:
opencart_12.jpg (459.06 KiB) 被浏览 207 次
在相关区域输入如下信息
User 部分填写root,这是一个默认的用户名,也是具有超级权限的用户名;
Password部分不填写任何内容;
Database 填写我们刚才建立的数据库
Database Prefix部分保持默认的oc_即可,当然你可以什么也不填写,也可以改为其他的前缀英文名字。
Username部分是要你在这里设置网站后台的访问用户名,你可以在此设定你喜欢的用户名,当然建议用英文字符;
Password 部分填写访问网站后台的密码;
Email 部分填写你才电子邮箱,便于系统运行时收取相关的邮件,如客户注册时给你发送邮件等。
如下图所示:
opencart_13.jpg (437.71 KiB) 被浏览 207 次
此时点击按钮Continue,得到下图所示界面:
opencart_14.jpg (390.19 KiB) 被浏览 207 次
该界面的出现,表明OpenCart安装已经成功了。红色提示部分,是让你别忘了删除目录Install,此时去删除目录F:/wamp/www/opencart/install这个目录吧。
你可以点击上图中所示的访问网站前台和后台的链接,也可以输入如下链接访问网站的前台和后台:
网站前台:
网站后台:
共有2个评论
<span class="a_vote_num" id="a_vote_num_
这系统改起来也颇费力
<span class="a_vote_num" id="a_vote_num_
更多开发者职位上
有什么技术问题吗?
OpenCar...的其它问题Shine OpenCart 自适应 多用途模板 ABC-0021
多用途主题模板
SHINE OPENCART 自适应 多用途主题模板 ABC-0021AUTOMATIC SCREEN SIZE ADJUSTMENT
SHINE OPENCART 自适应 多用途主题模板 ABC-0021
Shine is a responsive multipurpose OpenCart theme which is fully customizable and suitable for any kind of OpenCart store on any device. This responsive theme is a general purpose responsive theme which can be highly customized and tailored for any heavy OpenCart store.
This OpenCart theme is designed and tested to be 100% responsive so it works & displays flawlesslyon all types of devices including smart phones and tablets.
AUTOMATIC SCREEN SIZE ADJUSTMENT
This OpenCart theme is structured so that it automatically adapts to the screen size of a device beingused without any distortion of any of the theme elements.
This OpenCart theme comes with a comprehensive layout that is complete with all possible elements youmay want in your OpenCart store site.
This OpenCart theme has a simple way to configure how your product product detail pagelook and what they have on them. You have to try it to believe it.
This OpenCart theme has a instant color configuration that you can use to change the color of your theme.
This OpenCart theme has a powerful and fully customizable logo sliderthat you can enable if you?¢a??a?¢d like.
Quickly create the New and Bestsellers lists that attract and engage your visitors and drive transactions.
Grow your list and drive social media marketing via inbuilt functionality within this OpenCart theme.
This OpenCart theme comes equipped with a Multi Level horizontal Menuu that allows you to display allthe major categories for your visitors. A custom block is also available if you need it..
A beautiful and easy to browse list and grid views are pre-designed in this OpenCart theme.
This powerful functionality enables you to show multiple product images with an easy to use slider.
This powerful functionality enables your buyers to see the products zoomed in and see the detailand texture of your products.
A simple up and down arrow based quantity changer for your product detail pages.
This is a smart feature that shows your buyers the cart details by simply doing a mouse overon the cart icon on the header.
This OpenCart theme comes with a custom block that you can flexibility use to show additional products, details and any other relevant information.
Font Awesome gives you scalable vector icons that can instantly be costomized size, color, drop shadow, and anything that can be done with the power of CSS.
This OpenCart theme comes with a powerful admin
and control panel that allows quick and easycustomization options for everything in the theme.
Clean Responsive design
Unlimited color with admin setting
fonts available to choose from admin setting
Easy custom home page
Slide show banner
Best Seller & New products tabs on home page
Upsell products & related product slider on product details page
Brand logo slider in footer
Header dropdown shopping cart
Multiple Language support
Back to top button
Scroller Thumbnail images in product page
Cloud zoom or lightbox option for product Images
Powerful Admin Module
Easy to customize OpenCart template.
Template is fully compatible with OpenCart CE OpenCart 1.6.x,1.5.5.x,1.5.4.x
Valid XHTML and CSS markup
Cross Browser Support (IE 9+, Safari, Mozilla , , Opera 9+)
User Guide Documentation .pdf, html file
Responsive Design with HTML5 + CSS3&Go with the times! Your store will be adjusted in smart phones, tablets, desktops & many new devices.
Unlimited colorsControl almost every color of your theme from powerful admin panel.
Powerful admin module to manage the theme easily.
Integrated Google FontsYou can easily change the fonts for buttons, titles and page heading.
Custom SlideshowYou can now have a slideshow for your promotions on homepage.
Drop-down shopping cartIn header shopping cart will be shown as a drop down on mouseover.
Best sellers & New Products&On home page you will get readymade tabs for best seller & new products.
Product detail pageTheme will show tabbed product data, reviews on product page.
More view imagesScroller Thumbnail images in product page.
Integration with Cloud Zoom or lightbox&This option selection will allow you to enlarge product images.
Brand logo sliderGet ready with brands logo slider in footer.
Theme StructureOptimized, well-structured and commented CSS , HTML.
What?¢a??a?¢s IncludedTheme PSD files, .pdf & .html documentation files for theme install is included.
Social bookmarksSocial bookmark block is added in footer. You can add your social links fromadmin panel.
Slider for Up-sell & related Products&Now you can show as much up-sell or related products as you want.
Custom Tab2 Custom tab for product page, ready to display product details like info about shipping, returns, sales, etc.
Custom block for drop-down menu.Now you can display your custom content as a drop-down block in navigation.
Static block for Logo image.No need to upload your logo using ftp client anymore, now you can change logo from admin panel.
Previous & Next functionality for the product view page.Now you can navigate to next and previous products without going back to listing page.
HOME link in menuYou can now add home page button in the main navigation menu.
Product labelsMark your products with eye-catching labels. New????? and Sale????? labels on product page, in categories and on other product listings (editable from admin panel).
Back to top button
SEO FriendlyOur theme is using SEO Friendly Design and Layout Structure. It fully support all OpenCart SEO features.
OpenCart CompatibilityTheme is fully compatible with OpenCart CE OpenCart 1.6.x,1.5.5.x,1.5.4.x
Browser Compatibility(IE9+, Firefox, Opera, Safari, Chrome).
Support and sWe provide fanatic support & keep our themes up to date.解决opencart搜索产品时结果过多不精确
opencart用产品关键字搜索产品时,搜索出的结果有很多不是自己想要的跟搜索词不匹配,另外当搜索词前面或后面有空格时 会将所有产品搜索出来。这个原因是opencart搜索时构造sql语句造
opencart用产品关键字搜索产品时,搜索出的结果有很多不是自己想要的跟搜索词不匹配,另外当搜索词前面或后面有空格时
会将所有产品搜索出来。这个原因是opencart搜索时构造sql语句造成的,估计作者时想展现跟多的跟搜索词相关的内容,但这样往往
对用户不够友好,结果就是搜索不到自己想要的东西。
当搜索词前面后面有空格时会搜索出所有产品,这是因为opencart在搜索的时候会将搜索的词拆分为几个单独的词,比如说用户搜&opencart 模板&这个词时,它会将这个词拆分为&opencart&和&模板&这两个词在产品表中搜索,如果某个产品名中含有其中一个词就会将这个产品给搜索出来。这个也就解释了为什么当搜索词开头或后面有空格时会将所有产品搜索出来了,它会将空格当成一个字符在产品表中搜索,往往产品名字是一串英文单词中间存在空格所以会将所有产品搜索出来。解决出现空格搜索出所有产品只要过滤下搜索词的前后空格就可以了 在
\catalog\controller\product\search.php 这个文件将
1 $filter_name = $this-&request-&get[&#39;filter_name&#39;];
1 $filter_name = trim($this-&request-&get[&#39;filter_name&#39;]);
就可以解决搜索词前后出现空格会搜索出所有产品问题。
搜索出的产品和搜索词相关度很低,只要有其中一个搜索的单词出现就会显示出来,当我们搜索&tablets pc&这个词时他的搜索sql语句是这样的
1 SELECT p.product_id, (SELECT AVG(rating) AS total FROM review r1 WHERE r1.product_id = p.product_id AND r1.status = &#39;1&#39; GROUP BY r1.product_id) AS rating FROM product p LEFT JOIN product_description pd ON (p.product_id = pd.product_id)
2 LEFT JOIN product_to_store p2s ON (p.product_id = p2s.product_id) LEFT JOIN product_tag pt ON (p.product_id = pt.product_id) WHERE pd.language_id = &#39;1&#39; AND p.status = &#39;1&#39; AND p.date_available &= NOW() AND p2s.store_id = &#39;0&#39; AND ( LCASE(pd.name) LIKE &#39;%tablets%&#39; OR LCASE(pd.name) LIKE &#39;%pc%&#39; OR LCASE(pt.tag) LIKE&#39;%tablets pc%&#39; AND pt.language_id = &#39;1&#39; OR LCASE(pt.tag) LIKE &#39;%tablets pc%&#39; AND pt.language_id = &#39;1&#39;) GROUP BY p.product_id
我们需要的结果的sql语句是这样的
1 SELECT p.product_id, (SELECT AVG(rating) AS total FROM review r1 WHERE r1.product_id = p.product_id AND r1.status = &#39;1&#39; GROUP BY r1.product_id) AS rating FROM product p LEFT JOIN product_description pd ON
2 (p.product_id = pd.product_id) LEFT JOIN product_to_store p2s ON (p.product_id = p2s.product_id) LEFT JOIN product_tag pt ON (p.product_id = pt.product_id) WHERE pd.language_id = &#39;1&#39; AND p.status = &#39;1&#39; AND p.date_available &= NOW() AND p2s.store_id = &#39;0&#39; AND &LCASE(pd.name) LIKE &#39;%tablets pc%&#39; AND pt.language_id = &#39;1&#39; OR LCASE(pt.tag) LIKE &#39;%tablets pc%&#39; AND pt.language_id = &#39;1&#39;) GROUP BY p.product_id
由于相关代码比较多就不贴出来了,具体的在\catalog\model\catalog\product.php文件的getProducts()函数和getTotalProducts()函数中修改相关sql构造语句即可。
(责任编辑:最模板)
------分隔线----------------------------
Opencart后台没有提供设置显示方式的功能,所以各位要修改代码...
有个客户要求修改去掉opencart验证码,最模板把方法写给大家!...
opencart默认的黑色导航栏只显示分类目录下的一级分类,这块整...
登录到您的Opencart最初的管理面板。 在浏览器的地址栏中键入...
大家都支持opencart有个导入导出的插件对吧?就是:Export/Import...
CopyRight (C)
最模板 , All Rights Reserved.OpenCart中文专业版2.1
QQ在线客服
微信二维码
您的购物车内没有商品!
¥12.00¥1,200.00
剩余数量:999984
¥109.00¥109.00
剩余数量:0
¥258.00¥258.00
剩余数量:0
¥1.00¥2,223.00
剩余数量:0
¥2,031.00
加入购物车
加入购物车
加入购物车
The 30-inch Apple Cinema HD Display delivers an amazing 2560 x 1600 pixel resolution. Designed spe..
加入购物车
加入购物车
¥1,200.00
加入购物车
加入购物车
加入购物车
iPhone is a revolutionary new mobile phone that allows you to make a call by simply tapping a name..
加入购物车
The 30-inch Apple Cinema HD Display delivers an amazing 2560 x 1600 pixel resolution. Designed spe..
加入购物车
Canon's press material for the EOS 5D states that it 'defines (a) new D-SLR category', while we're..
加入购物车
¥2,223.00
加入购物车
加入购物车
Canon's press material for the EOS 5D states that it 'defines (a) new D-SLR category', while we're..
加入购物车
加入购物车
加入购物车
&成都市高新西区天目路77号保利香槟国际
成都光大网络科技有限公司
OpenCart中文专业版2.1 & 2016OpenCart本地测试环境搭建WampServer教程_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
OpenCart本地测试环境搭建WampServer教程
上传于||暂无简介
阅读已结束,如果下载本文需要使用0下载券
想免费下载更多文档?
定制HR最喜欢的简历
下载文档到电脑,查找使用更方便
还剩4页未读,继续阅读
定制HR最喜欢的简历
你可能喜欢

我要回帖

更多关于 js如何区分pc和移动端 的文章

 

随机推荐