<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PrestaShop &#38; PHP develop BLOG</title>
	<atom:link href="http://blog.phpskill.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.phpskill.com</link>
	<description>We are force on PrestaShop &#38; PHP develop, working to deliver only the best to our customers</description>
	<lastBuildDate>Sun, 10 Apr 2011 11:54:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>prestashop 1.4 code analysis:FrontController</title>
		<link>http://blog.phpskill.com/prestashop-1-4-code-analysisfrontcontroller/</link>
		<comments>http://blog.phpskill.com/prestashop-1-4-code-analysisfrontcontroller/#comments</comments>
		<pubDate>Sun, 10 Apr 2011 11:54:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Prestashop]]></category>
		<category><![CDATA[code analysis]]></category>

		<guid isPermaLink="false">http://blog.phpskill.com/?p=151</guid>
		<description><![CDATA[the most important stuff I will only love in prestashop 1.4 is nothing but the very important FrontController.php. Analysis At first let’s just take a look at the mode of loading files in prestashop 1.4. If you “new” a class, at first the codes would search for the class file of the same name in [...]]]></description>
			<content:encoded><![CDATA[<p>the most important stuff I will only love in prestashop 1.4 is nothing but the very important FrontController.php.</p>
<h3>Analysis</h3>
<p>At first let’s just take a look at the mode of loading files in prestashop 1.4. If you “new” a class, at first the codes would search for the class file of the same name in controller, and such a way looks pretty much the same as that in the previous version. If the file could not be found there, the codes will then carry on the search in override, this folder that allows classes to be user-defined. If the file still could not be found, the codes will use exec to create a new class of the request-typed name in turn to load the names of those classes under classes plus the core classes. So, for the real FrontController.php, you have to find and get it under classes, also the corresponding name of the class will be FrontControllerCore.</p>
<p>If it is said that the most important stuff is init.php before, then FrontController.php in prestashop 1.4 has taken over all the work previously done by init.php. Moreover it has replaced all the other three files header.php, index.php and footer.php to carry out all of their original work, even including pagination and merchandise ordering. In a few words, just somewhat like the dispatch of zend framework, FrontController.php is a signal to have all the work start off.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> run<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">preProcess</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setMedia</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">displayHeader</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">process</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">displayContent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">displayFooter</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Regarding such a style that is so similar to zend, I would doubt that if prestashop’s CTO has already been changed.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ssl</span> AND <span style="color: #339933;">!</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTPS'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> AND <span style="color: #990000;">strtolower</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'HTTPS'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'on'</span><span style="color: #009900;">&#41;</span> AND Configuration<span style="color: #339933;">::</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'PS_SSL_ENABLED'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'HTTP/1.1 301 Moved Permanently'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Location: '</span><span style="color: #339933;">.</span>Tools<span style="color: #339933;">::</span><span style="color: #004000;">getShopDomainSsl</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_URI'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #990000;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Automatic 301 in function init, the very new function added in prestashop 1.4. Now it looks like that the maindomin module I’ve written before has got totally f**ked up.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$page_name</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/^[0-9]/'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$page_name</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">'page_'</span><span style="color: #339933;">.</span><span style="color: #000088;">$page_name</span> <span style="color: #339933;">:</span> <span style="color: #000088;">$page_name</span><span style="color: #339933;">;</span></pre></div></div>

<p>The $page_name variable in function init has achieved a judgment in different pages and different modules in a very convenient way. You know in previous versions I still have to make judgments in header.tpl.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">		Tools<span style="color: #339933;">::</span><span style="color: #004000;">addCSS</span><span style="color: #009900;">&#40;</span>_THEME_CSS_DIR_<span style="color: #339933;">.</span><span style="color: #0000ff;">'global.css'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'all'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		Tools<span style="color: #339933;">::</span><span style="color: #004000;">addJS</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>_PS_JS_DIR_<span style="color: #339933;">.</span><span style="color: #0000ff;">'tools.js'</span><span style="color: #339933;">,</span> _PS_JS_DIR_<span style="color: #339933;">.</span><span style="color: #0000ff;">'jquery/jquery-1.4.4.min.js'</span><span style="color: #339933;">,</span> _PS_JS_DIR_<span style="color: #339933;">.</span><span style="color: #0000ff;">'jquery/jquery.easing.1.3.js'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>All above is from function serMedia. The advantage for doing so is achieving the unified management of both css and js, thereby it is available to do CCC (Combine, Compress and Cache) in prestashop, function productSort and pagination just take over the work previously done by sort and pagination while there is no significant change with respect to other aspects, as the main function is still copied from the past init.php, even the naming of each variable is still global rather than global class in the oriented object.</p>
<h3>Customization</h3>
<p>In folder override/classes everyone can see a file named _FrontController.php, which is actually an example of user-defined FrontController.php. Now if you delete that underscore in the file name and visit the page again, then you will see the debug information. What has to be noted here is that there are two additional files named mysql and module in the same folder. If some change were applied to FrontController.php only, it would lead to the termination problem due to some error message. Thus it is necessary to change Line 148 in _FrontController.php below:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">error_reporting</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">E_ALL</span> <span style="color: #339933;">|</span> <span style="color: #009900; font-weight: bold;">E_STRICT</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Into:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">error_reporting</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">7</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>In regard to“7” above, if someone might not understand what it means, please refer to the relevant parts in the handbook for further study.</p>
<p>In order to customize FrontController.php, just create a new file named FrontController.php under folder override/class, and then write a class named extends FrontControllerCore and then it will be fine. The method can be taken to overlay the one in core directly.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> FrontController <span style="color: #000000; font-weight: bold;">extends</span> FrontControllerCore
<span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">function</span> setMedia<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		parent<span style="color: #339933;">::</span><span style="color: #004000;">setMedia</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		Tools<span style="color: #339933;">::</span><span style="color: #004000;">addCSS</span><span style="color: #009900;">&#40;</span>_THEME_CSS_DIR_<span style="color: #339933;">.</span><span style="color: #0000ff;">'addition.css'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> displayFooter<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$cookie</span><span style="color: #339933;">,</span> <span style="color: #000088;">$smarty</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$initialized</span><span style="color: #009900;">&#41;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$smarty</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">assign</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
			<span style="color: #0000ff;">'HOOK_RIGHT_COLUMN'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$smarty</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_template_vars</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'page_name'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'category'</span><span style="color: #009900;">&#41;</span> ? <span style="color: #0000ff;">''</span> <span style="color: #339933;">:</span> Module<span style="color: #339933;">::</span><span style="color: #004000;">hookExec</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'rightColumn'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'cart'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$cart</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'HOOK_FOOTER'</span> <span style="color: #339933;">=&gt;</span> Module<span style="color: #339933;">::</span><span style="color: #004000;">hookExec</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'footer'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
			<span style="color: #0000ff;">'content_only'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#40;</span>Tools<span style="color: #339933;">::</span><span style="color: #004000;">getValue</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'content_only'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$smarty</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">display</span><span style="color: #009900;">&#40;</span>_PS_THEME_DIR_<span style="color: #339933;">.</span><span style="color: #0000ff;">'footer.tpl'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #666666; font-style: italic;">//live edit</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$cookie</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">live_edit</span> AND <span style="color: #000088;">$ad</span> <span style="color: #339933;">=</span> Tools<span style="color: #339933;">::</span><span style="color: #004000;">getValue</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'ad'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$smarty</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">assign</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'ad'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$ad</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'live_edit'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$smarty</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">display</span><span style="color: #009900;">&#40;</span>_PS_ALL_THEMES_DIR_<span style="color: #339933;">.</span><span style="color: #0000ff;">'live_edit.tpl'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #b1b100;">else</span>
			Tools<span style="color: #339933;">::</span><span style="color: #004000;">displayError</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>In the example above, both methods namely setMedia and displayFooter have been overwritten.</p>
<p>When setMedia is being rewritten, such a method of original FrontController is executed and a new css is also loaded in the original css.</p>
<p>When displayFooter is being rewritten, such a process is actually copying the original codes to here to achieve the rewriting, and the only change can be nothing but just adding a judgment. If pagename were category, then column on the right-hand side would never be outputted so as to make a bigger space for category list.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.phpskill.com/prestashop-1-4-code-analysisfrontcontroller/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Upgrade Guide for prestashop 1.4</title>
		<link>http://blog.phpskill.com/upgrade-guide-for-prestashop-1-4/</link>
		<comments>http://blog.phpskill.com/upgrade-guide-for-prestashop-1-4/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 14:58:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Prestashop]]></category>
		<category><![CDATA[Prestashop 1.4]]></category>
		<category><![CDATA[Upgrade]]></category>

		<guid isPermaLink="false">http://blog.phpskill.com/?p=148</guid>
		<description><![CDATA[Due to the real power of version 1.4, many people in b2c just wish to have their original prestashop upgraded to this new version. In fact, all upgrades above version 1.2 have been well done enough, so just following the upgrade steps as before is fair enough. However, there are lots of changes that have [...]]]></description>
			<content:encoded><![CDATA[<p>Due to the real power of version 1.4, many people in b2c just wish to have their original prestashop upgraded to this new version. In fact, all upgrades above version 1.2 have been well done enough, so just following the upgrade steps as before is fair enough. However, there are lots of changes that have been made to version 1.4, so as I see it, it is necessary to put an instruction here in order to guide everyone for their upgrades to version 1.4.</p>
<p>1.Backup  your database and hopefully your database version is 1.1-1.3, as the  upgrade program will not support any lower versions than that. Besides, I  don’t believe there could still be anybody still using the version  below 1.0, whose bugs are too many to make its clients make payments  normally.</p>
<p>2.Do  not transfer your prestashop to the server until its local upgrade is  complete. So please make sure you have created your local database in  advance.</p>
<p>3.Install a brand new prestashop 1.4, and then copy <strong>settings.php</strong> from your old website into this new version, meanwhile update all the collection information for your database.</p>
<p>4.Open prestashop 1.4 in your local drive and find out the Upgrade option in the setup program. Then click and follow the steps in it for the rest of your upgrade work.</p>
<p>5.Check if the database upgrade has been complete. (You know, I used to try 3 times to barely have mine done successfully…)</p>
<p>6.Test your module and template of old versions in the local drive, since there would be more steps to be taken for upgrading to 1.4, unlike being that simple and easy to upgrade from 1.2 to 1.3 before. What is more, even smarty has been already upgraded to v3 while jQuery has also been of version 1.4 now.</p>
<p>There is one more thing that has to be mentioned here. If your old module uses many Smarty codes, then please upgrade it to the v3 environment as soon as possible. Moreover, both smarty v2 and v3 will be supported at prestashop 1.4 whereas version 1.5 may support v3 only. Be better a little loss than a long sorrow, please think about it now.</p>
<p>Also, there is basically no need to rewrite the module as it still works for the new version. So far no old modules that do not support the new version have been found yet.</p>
<p>7.Upload your prestashop of the new version. You had better create a new database and a new folder to give it a test at first. Once the test is successful you may move on to file transfer.</p>
<p>8.In addition to the issue regarding the path configuration in settings.php, which has been mentioned in my previous articles, prestashop 1.4 has got the function of automatically directing any visit to those non-primary domains to the primary domain. By such a function, data of the primary domain are recorded in the database, and all visits to non-primary domains will be directed by 301 to the primary domain. Therefore your local installed prestashop 1.4 might contain some domain information like localhost, which can be set in Backoffice >> Preferences >> SEO.</p>
<p>9.Finally, don’t forget copy all pictures in your img folder into your new website.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.phpskill.com/upgrade-guide-for-prestashop-1-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Prestashop 1.4: New World, New Hope</title>
		<link>http://blog.phpskill.com/prestashop-1-4-new-world-new-hope/</link>
		<comments>http://blog.phpskill.com/prestashop-1-4-new-world-new-hope/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 18:03:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Prestashop]]></category>
		<category><![CDATA[Prestashop 1.4]]></category>

		<guid isPermaLink="false">http://blog.phpskill.com/?p=145</guid>
		<description><![CDATA[Prestashop 1.4 version has been released last Friday, after try the function, I have got a conclusion by one sentence: prestashop has started to keep abreast of other mature shopping systems. New additions of one step checkout and guest pay are always the most common thing in customized development. And I also have lots of [...]]]></description>
			<content:encoded><![CDATA[<p>Prestashop  1.4 version has been released last Friday, after try the function, I  have got a conclusion by one sentence: prestashop has started to keep  abreast of other mature shopping systems.</p>
<p>New  additions of one step checkout and guest pay are always the most common  thing in customized development. And I also have lots of customers who  need function in this regard. Furthermore, filtering of assortment  product on the left side is the basic function of improving user  experience in e-commerce field.</p>
<p>Do  you still remember speed problem about the previous version? Actually,  it is chaotic about js and css. It will take a long time to open the  prestashop site in abroad server, just due to the numerous static  resources, so we cannot do any optimization. The quote of js and css is  everywhere, each module can cite css and js into our own tpl, which  adverse the optimizing of speed. However, 1.4 version has totally solved  this problem. First of all, it has combined the management of js with  css, after that, it can achieve minimization, compression, etc. And it’s  much more convenient, the requirement of http can be reduced a lot. In  addition, 1.4 module has turned css into separate file, so global is not  the one to dominate the whole world.</p>
<p>Cms  is always the disadvantage of prestashop, however, 1,4 version has the  ability of cms classification management, which is more convenient.  Although it cannot beat prestashop+wordpress, compared with before, this  is really a good improvement.</p>
<p>Webservices,  for average user, it has not any value of practical use. But if you  decide to make station cluster, it is really a convenient stuff. And I  always hold the statement that it is suitable to apply prestashop into  station cluster, because shift and copy is that commodious, and the  running speed is much better compared with established brander shopping  system. Recently, I devoted myself to sem, so what I thought about tends  to sem a little.</p>
<p>At  present, module is controlled in the official method, which is  different like before, that is just creating an assortment automatically  after writing one, and modules which don’t obey the official rules will  be named as “other modules”.</p>
<p>In  code aspect, please pay attention to two new folder: controllers and  override. Previously, primary control routines are all in the files of  root directory, but this part of file has been transferred into  controllers. For prestashop which is facing the objectivity, of course  it has free play space about customizing for programmers, override is  exactly for this purpose, creating a file which has the same name as  documents in controllers, and system will invoke files in overrides  automatically.</p>
<p>The  last but not the least, it’s about the development direction of  prestashop. Before 1.2 version, prestashop didn’t have any official  stuff, and there is only a link in the backend. Now official website of  prestashop has established addons.prestashop.com, which is kind of like  app store, and 1.4 version is combined with prestashop very closely. In  submenu of modules, there is a special item – My Account, that is to  say, you can land the official addons platform as well as accounts on  addons directly.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.phpskill.com/prestashop-1-4-new-world-new-hope/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New module named Recent orders</title>
		<link>http://blog.phpskill.com/new-module-named-recent-orders/</link>
		<comments>http://blog.phpskill.com/new-module-named-recent-orders/#comments</comments>
		<pubDate>Sun, 05 Dec 2010 16:47:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Prestashop]]></category>
		<category><![CDATA[oder]]></category>

		<guid isPermaLink="false">http://blog.phpskill.com/?p=135</guid>
		<description><![CDATA[A module of prestashop, display the order’s product name and customer address(just city, state and country) in your left or right column. It’s have 3 dispaly mode: auto, fake date and mixed. Auto is default setting, which can display the real orders in database. If your shop dont have so much orders, fake data mode [...]]]></description>
			<content:encoded><![CDATA[<p>A module of prestashop, display the order’s product name and customer address(just city, state and country) in your left or right column.</p>
<p>It’s have 3 dispaly mode: auto, fake date and mixed.</p>
<p>Auto is default setting, which can display the real orders in database.</p>
<p>If your shop dont have so much orders, fake data mode can display orders you added below.</p>
<p>Mixed will display 2 mixed data.</p>
<p>Also, it’s have options to dispaly how many orders do you want do display.</p>
<p>Project home page http://phpskill.com/prestashop-shard-modules/71-recent-orders.html</p>
<p><a href="http://blog.phpskill.com/wp-content/uploads/2010/12/2.jpg"><img class="alignnone size-full wp-image-137" title="2" src="http://blog.phpskill.com/wp-content/uploads/2010/12/2.jpg" alt="" width="218" height="255" /></a></p>
<p>Show case</p>
<p><a href="http://blog.phpskill.com/wp-content/uploads/2010/12/1.jpg"><img class="alignnone size-medium wp-image-136" title="1" src="http://blog.phpskill.com/wp-content/uploads/2010/12/1-300x209.jpg" alt="" width="300" height="209" /></a></p>
<p>Configuration page</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.phpskill.com/new-module-named-recent-orders/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add phone number validator to prestashop registration form</title>
		<link>http://blog.phpskill.com/add-phone-number-validator-to-prestashop-registration-form/</link>
		<comments>http://blog.phpskill.com/add-phone-number-validator-to-prestashop-registration-form/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 07:15:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Prestashop]]></category>
		<category><![CDATA[form]]></category>

		<guid isPermaLink="false">http://blog.phpskill.com/?p=131</guid>
		<description><![CDATA[Add elseif&#40;!Tools::getValue&#40;'phone'&#41; &#124;&#124; !Tools::getValue&#40;'phone_mobile'&#41;&#41; $errors&#91;&#93; = Tools::displayError&#40;'Error phone number'&#41;; to behind of #54 line of authentication.php]]></description>
			<content:encoded><![CDATA[<p>Add</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>Tools<span style="color: #339933;">::</span><span style="color: #004000;">getValue</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'phone'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <span style="color: #339933;">!</span>Tools<span style="color: #339933;">::</span><span style="color: #004000;">getValue</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'phone_mobile'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #000088;">$errors</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> Tools<span style="color: #339933;">::</span><span style="color: #004000;">displayError</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Error phone number'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>to behind of #54 line of authentication.php</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.phpskill.com/add-phone-number-validator-to-prestashop-registration-form/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>how to expend prestashop catgory list on left colume automatic</title>
		<link>http://blog.phpskill.com/how-to-expend-prestashop-catgory-list-on-left-colume-automatic/</link>
		<comments>http://blog.phpskill.com/how-to-expend-prestashop-catgory-list-on-left-colume-automatic/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 06:49:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Prestashop]]></category>
		<category><![CDATA[category]]></category>

		<guid isPermaLink="false">http://blog.phpskill.com/?p=129</guid>
		<description><![CDATA[Sometimes the visits need to click the plus button to see the sub catgories, i think it not good for user experience. &#60;script type=&#34;text/javascript&#34;&#62; $&#40;function &#40;&#41;&#123; toggleBranch&#40;$&#40;'ul.tree span.grower'&#41;&#41;; &#125;&#41;; &#60;/script&#62; You can put those code in your header.tpl of theme folder, and also, can put toggleBranch&#40;$&#40;'ul.tree span.grower'&#41;&#41;; at end of themes/YOUR THEME NAME/js/tools/treeManagement.js, so it [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes the visits need to click the plus button to see the sub catgories, i think it not good for user experience.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
$<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
toggleBranch<span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'ul.tree span.grower'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p>You can put those code in your header.tpl of theme folder, and also, can put</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">toggleBranch<span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'ul.tree span.grower'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>at end of themes/YOUR THEME NAME/js/tools/treeManagement.js, so it looks like</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'ul.tree.dhtml'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'dhtml'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
toggleBranch<span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'ul.tree span.grower'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.phpskill.com/how-to-expend-prestashop-catgory-list-on-left-colume-automatic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The CDN of extjs</title>
		<link>http://blog.phpskill.com/the-cdn-of-extjs/</link>
		<comments>http://blog.phpskill.com/the-cdn-of-extjs/#comments</comments>
		<pubDate>Wed, 05 May 2010 09:09:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Frontend]]></category>
		<category><![CDATA[extjs]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.phpskill.com/?p=121</guid>
		<description><![CDATA[Google javascript CDN is very good, but it&#8217;s not support extjs. We dont know why, but the good news is, extjs buy the CDN service for themself. &#60;script type=&#8221;text/javascript&#8221; src=&#8221;http://extjs.cachefly.net/ext-3.0.3/adapter/ext/ext-base.js&#8221;&#62;&#60;/script&#62; &#60;script type=&#8221;text/javascript&#8221; src=&#8221;http://extjs.cachefly.net/ext-3.0.3/ext-all.js&#8221;&#62;&#60;/script&#62; &#60;link href=&#8221;http://extjs.cachefly.net/ext-3.0.3/resources/css/ext-all.css&#8221; rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221; /&#62; Include all css and images, very cool.]]></description>
			<content:encoded><![CDATA[<p>Google javascript CDN is very good, but it&#8217;s not support extjs.</p>
<p>We dont know why, but the good news is, extjs buy the CDN service for themself.</p>
<p>&lt;script type=&#8221;text/javascript&#8221;  src=&#8221;http://extjs.cachefly.net/ext-3.0.3/adapter/ext/ext-base.js&#8221;&gt;&lt;/script&gt;<br />
&lt;script type=&#8221;text/javascript&#8221;  src=&#8221;http://extjs.cachefly.net/ext-3.0.3/ext-all.js&#8221;&gt;&lt;/script&gt;<br />
&lt;link  href=&#8221;http://extjs.cachefly.net/ext-3.0.3/resources/css/ext-all.css&#8221;  rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221; /&gt;</p>
<p>Include all css and images, very cool.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.phpskill.com/the-cdn-of-extjs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to reset the administrator password of prestashop</title>
		<link>http://blog.phpskill.com/how-to-reset-the-administrator-password-of-prestashop/</link>
		<comments>http://blog.phpskill.com/how-to-reset-the-administrator-password-of-prestashop/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 03:46:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Prestashop]]></category>
		<category><![CDATA[bankend]]></category>
		<category><![CDATA[password]]></category>

		<guid isPermaLink="false">http://www.phpskill.com/?p=115</guid>
		<description><![CDATA[The administrator password of prestashop use md5 for password encryption, it&#8217;s use a long string called &#8220;cookie key&#8221; plus your password to generate password data. We need copy the cookie key in config/setting.inc.php. My cookie key is _COOKIE_KEY_ = Q8ofSVQ9j6biVE2TnsFkKrhGZL04s3ahUzYLUWYHxL3N686JLSBiX7uL So for me: UPDATE `prestashop`.`ps_employee` SET `passwd` = md5&#40;'Q8ofSVQ9j6biVE2TnsFkKrhGZL04s3ahUzYLUWYHxL3N686JLSBiX7uL' + '123456'&#41; WHERE `ps_employee`.`id_employee` =1 LIMIT [...]]]></description>
			<content:encoded><![CDATA[<p>The administrator password of prestashop use md5 for password encryption, it&#8217;s use a long string called &#8220;cookie key&#8221; plus your password to generate password data.</p>
<p>We need copy the cookie key in config/setting.inc.php.</p>
<p>My cookie key is _COOKIE_KEY_ = Q8ofSVQ9j6biVE2TnsFkKrhGZL04s3ahUzYLUWYHxL3N686JLSBiX7uL</p>
<p>So for me:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">UPDATE</span> <span style="color: #ff0000;">`prestashop`</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">`ps_employee`</span> <span style="color: #993333; font-weight: bold;">SET</span> <span style="color: #ff0000;">`passwd`</span> <span style="color: #66cc66;">=</span> md5<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Q8ofSVQ9j6biVE2TnsFkKrhGZL04s3ahUzYLUWYHxL3N686JLSBiX7uL'</span> <span style="color: #66cc66;">+</span> <span style="color: #ff0000;">'123456'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">WHERE</span> <span style="color: #ff0000;">`ps_employee`</span><span style="color: #66cc66;">.</span><span style="color: #ff0000;">`id_employee`</span> <span style="color: #66cc66;">=</span><span style="color: #cc66cc;">1</span> <span style="color: #993333; font-weight: bold;">LIMIT</span> <span style="color: #cc66cc;">1</span></pre></div></div>

<p>ps_employee is administrator table name, if you set other table prefix, need change herer.</p>
<p>id_employee = 1 This is the first administrator, if you want change other one, just replace the id here.</p>
<p>Still cant open bankend? See <a title="If you can not login backend of prestashop" href="/if-you-cant-login-backend-of-prestashop/">here</a></p>
<p>Hope this article can help you, thanks.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.phpskill.com/how-to-reset-the-administrator-password-of-prestashop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solution on google map v3 in tabs</title>
		<link>http://blog.phpskill.com/solution-on-google-map-v3-in-tabs/</link>
		<comments>http://blog.phpskill.com/solution-on-google-map-v3-in-tabs/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 14:13:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[google map]]></category>
		<category><![CDATA[tabs]]></category>

		<guid isPermaLink="false">http://www.phpskill.com/?p=112</guid>
		<description><![CDATA[If you want put google map in tabs view, sometimes cant display as well. My HTML is: &#60;div id=”tab_gmap”&#62; &#60;div id=”googlemap”&#62;&#60;/div&#62; &#60;/div&#62; First, need bind google map initialization in tabs title click event, so jQuery&#40;&#34;a.tabs&#34;&#41;.click&#40;function &#40;&#41;&#123; //google maps init; &#125;&#41;; Second step, we need reset some attributes of map div. jQuery&#40;&#34;a.tabs&#34;&#41;.click&#40;function &#40;&#41;&#123; jQuery&#40;&#34;#tab_gmap&#34;&#41;.css&#40;&#123;'display':'block'&#125;&#41;; jQuery&#40;&#34;#googlemap&#34;&#41;.css&#40;&#123;'width':'100%', 'height':'100%'&#125;&#41;; [...]]]></description>
			<content:encoded><![CDATA[<p>If you want put google map in tabs view, sometimes cant display as well.</p>
<p>My HTML is:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;div id=”tab_gmap”&gt;
&lt;div id=”googlemap”&gt;&lt;/div&gt;
&lt;/div&gt;</pre></div></div>

<p>First, need bind google map initialization in tabs title click event, so</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;a.tabs&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #006600; font-style: italic;">//google maps init;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Second step, we need reset some attributes of map div.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;a.tabs&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
   jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#tab_gmap&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">'display'</span><span style="color: #339933;">:</span><span style="color: #3366CC;">'block'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   jQuery<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#googlemap&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">'width'</span><span style="color: #339933;">:</span><span style="color: #3366CC;">'100%'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'height'</span><span style="color: #339933;">:</span><span style="color: #3366CC;">'100%'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #006600; font-style: italic;">//google maps init;</span>
&nbsp;
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Hope this article can help you, thanks.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.phpskill.com/solution-on-google-map-v3-in-tabs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A bug in the gsitemap module of prestashop 1.2.5</title>
		<link>http://blog.phpskill.com/a-bug-in-the-gsitemap-moulde-of-prestashop-1-2-5/</link>
		<comments>http://blog.phpskill.com/a-bug-in-the-gsitemap-moulde-of-prestashop-1-2-5/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 08:34:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Prestashop]]></category>
		<category><![CDATA[google sitemap]]></category>

		<guid isPermaLink="false">http://www.phpskill.com/?p=107</guid>
		<description><![CDATA[I dont know if the prestashop company already fix this problem in 1.3.x version, but i think 1.2.5 is a most useful version, and many website master dont want change it. gsitemap, is the name of google sitemap module in prestashop, will generate twice main domin in 1 url at same time when site have [...]]]></description>
			<content:encoded><![CDATA[<p>I dont know if the prestashop company already fix this problem in 1.3.x version, but i think 1.2.5 is a most useful version, and many website master dont want change it.</p>
<p>gsitemap, is the name of google sitemap module in prestashop, will generate twice main domin in 1 url at same time when site have 2 or more languages.</p>
<p>The URL like http://phpskill.com/abc under the defualt language is good, but for second language, this url will become http://phpskill.com/lang-nl/phpskill.com/abc.</p>
<p>So, open modules/gsitemap/gsitemap.php?change the line 86?113?147?165, replace the last &#8220;$tmplink&#8221; to str_ireplace(&#8216;/&#8217;.$_SERVER['HTTP_HOST'].&#8217;/', &#8221;, $tmpLink).</p>
<p>Hope this article can help you, thanks.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.phpskill.com/a-bug-in-the-gsitemap-moulde-of-prestashop-1-2-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

