<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8346838345722076315</id><updated>2011-08-31T14:49:08.101+02:00</updated><category term='Instructions from others'/><category term='book store'/><category term='Irrelevant'/><category term='translation'/><category term='bug'/><category term='PS 1.4'/><category term='product list view'/><category term='how to'/><category term='language'/><category term='product view'/><category term='note to self'/><category term='positioning'/><category term='book'/><title type='text'>mohsart and PrestaShop</title><subtitle type='html'>Since I started using PrestaShop, I've discovered that I explain several things more than once; also some things I tend to forget.
This is my tool for handeling that.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mohsart-prestashop.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://mohsart-prestashop.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>mohsart</name><uri>http://www.blogger.com/profile/11144001509268375981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8346838345722076315.post-3471367510528166527</id><published>2011-07-06T01:49:00.002+02:00</published><updated>2011-07-06T01:54:24.209+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='how to'/><category scheme='http://www.blogger.com/atom/ns#' term='PS 1.4'/><title type='text'>Prestashop 1.4</title><content type='html'>Just upgraded and one important difference from earlier versions is that no(?) changes will take effect unless you first go to &lt;span style="font-family: courier new;"&gt;Preferences&lt;/span&gt;/&lt;span style="font-family: courier new;"&gt;Performance &lt;/span&gt;and change &lt;span style="font-family: courier new;"&gt;Force Compile&lt;/span&gt; to &lt;span style="font-family: courier new;"&gt;Yes&lt;/span&gt; and &lt;span style="font-family: courier new;"&gt;Cache &lt;/span&gt;to &lt;span style="font-family: courier new;"&gt;No&lt;/span&gt;.&lt;br /&gt;After the code change and a verification of it being OK, don't forget to restore the settings or you will have a very slow site.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8346838345722076315-3471367510528166527?l=mohsart-prestashop.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mohsart-prestashop.blogspot.com/feeds/3471367510528166527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mohsart-prestashop.blogspot.com/2011/07/prestashop-14.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/3471367510528166527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/3471367510528166527'/><link rel='alternate' type='text/html' href='http://mohsart-prestashop.blogspot.com/2011/07/prestashop-14.html' title='Prestashop 1.4'/><author><name>mohsart</name><uri>http://www.blogger.com/profile/11144001509268375981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8346838345722076315.post-8654093907050642573</id><published>2011-07-06T01:18:00.003+02:00</published><updated>2011-07-06T01:48:16.234+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='book store'/><category scheme='http://www.blogger.com/atom/ns#' term='product list view'/><category scheme='http://www.blogger.com/atom/ns#' term='how to'/><title type='text'>Prestashop as Bookstore Part 4 - Details in product lists</title><content type='html'>I have done several modifications to make &lt;span style="font-style: italic;"&gt;PrestaShop &lt;/span&gt;usable as a &lt;span style="font-style: italic;"&gt;bookstore  &lt;/span&gt;and I will try to sum it up in a few blog posts.&lt;br /&gt;&lt;br /&gt;(I don't really have time for this, but a new post is overdue ++)&lt;br /&gt;&lt;br /&gt;To put &lt;span style="font-weight: bold;"&gt;tags &lt;/span&gt;in the &lt;span style="font-style: italic;"&gt;product list&lt;/span&gt;:&lt;br /&gt;In &lt;span style="font-family:courier new;"&gt;classes/product.php&lt;/span&gt;, find eg&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;code&gt;&lt;/code&gt;&lt;/span&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;$row['features'] = Product::getFrontFeaturesStatic((int)$id_lang, $row['id_product']);&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;and add the line&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;code&gt;$row['tags'] = Tag::getProductTags($row['id_product']);&lt;br /&gt;&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;In eg themes/yourtheme/product-list.tpl, find the line&lt;br /&gt;&lt;code&gt;&lt;br /&gt;title="{$product.description_short|truncate:360:'...'|strip_tags:'UTF-8'|escape:'htmlall':'UTF-8'}"&amp;gt;{$product.description_short|truncate:360:'...'|strip_tags:'UTF-8'}&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;and add&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;code&gt;&lt;/code&gt;&lt;/span&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{if $product.location}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;{if $product.tags}&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="font-family:courier new;"&gt;{if $lang_iso == sv} {assign var='lng' value=4}{else} {assign var='lng' value=1} {/if}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;{assign var='tag1' value=$product.tags[$lng]}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;p&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;{assign var='delimiter' value=''}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;{l s='Authors'}:&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;{foreach from=$tag1 item=tag}{$delimiter} {$tag|escape:'htmlall':'UTF-8'}{assign var='delimiter' value=','}{/foreach}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;To put &lt;span style="font-weight: bold;"&gt;features &lt;/span&gt;at the same place&lt;br /&gt;In eg &lt;span style="font-family:courier new;"&gt;themes/yourtheme/product-list.tpl&lt;/span&gt;, at the same place as for the tags, add&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;code&gt;&lt;/code&gt;&lt;/span&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{if $product.features}&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;p&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;{assign var='go' value='0'}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;{foreach from=$product.features item=feature}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;{foreach from=$feature item=rank}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;{if $go}Rank: {$rank}&amp;lt;br /&amp;gt;{/if}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;{if $rank == '40.Suggested rank'}{assign var='go' value='1'}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;{else} {assign var='go' value='0'}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;{/if}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;{/foreach}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;{/foreach}&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;{/if}&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Short explanation of the code:&lt;br /&gt;I use &lt;span style="font-style: italic;"&gt;tags &lt;/span&gt;for &lt;span style="font-style: italic;"&gt;authors &lt;/span&gt;and &lt;span style="font-style: italic;"&gt;location &lt;/span&gt;to pin a item as a &lt;span style="font-style: italic;"&gt;book&lt;/span&gt;, other parts of the logic may or may not be of use for you, the &lt;span style="font-style: italic;"&gt;delimeter &lt;/span&gt;jazz is so that one &lt;span style="font-style: italic;"&gt;tag &lt;/span&gt;appears as "foo" and tho tags as "foo, bar", ie comma separated.&lt;br /&gt;The &lt;span style="font-style: italic;"&gt;features &lt;/span&gt;array looks like this&lt;br /&gt;Length, 10 cm, height, 2 cm, weight, 2 kg...&lt;br /&gt;So I search for "Suggested rank" and print the following value. I only use one feature, but there is nothing stopping you from using more.&lt;br /&gt;&lt;br /&gt;Edit: Forgot to add a picture of how it looks&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-va6Sc_GuTus/ThOiexsoNtI/AAAAAAAAA0Q/ZW16W58JWE4/s1600/blogg.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 318px;" src="http://1.bp.blogspot.com/-va6Sc_GuTus/ThOiexsoNtI/AAAAAAAAA0Q/ZW16W58JWE4/s400/blogg.jpg" alt="" id="BLOGGER_PHOTO_ID_5626019009136178898" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8346838345722076315-8654093907050642573?l=mohsart-prestashop.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mohsart-prestashop.blogspot.com/feeds/8654093907050642573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mohsart-prestashop.blogspot.com/2011/07/prestashop-as-bookstore-part-4-details.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/8654093907050642573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/8654093907050642573'/><link rel='alternate' type='text/html' href='http://mohsart-prestashop.blogspot.com/2011/07/prestashop-as-bookstore-part-4-details.html' title='Prestashop as Bookstore Part 4 - Details in product lists'/><author><name>mohsart</name><uri>http://www.blogger.com/profile/11144001509268375981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-va6Sc_GuTus/ThOiexsoNtI/AAAAAAAAA0Q/ZW16W58JWE4/s72-c/blogg.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8346838345722076315.post-2158831543218658268</id><published>2010-06-29T18:04:00.003+02:00</published><updated>2010-06-29T18:28:22.388+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Irrelevant'/><title type='text'>Vacation</title><content type='html'>Off to China for a little less than a month, so plolly no blogging fol a while&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i83.photobucket.com/albums/j300/mohsart/Beijing%2008-09/IMG_1146.jpg"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 374px; height: 280px;" src="http://i83.photobucket.com/albums/j300/mohsart/Beijing%2008-09/IMG_1146.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8346838345722076315-2158831543218658268?l=mohsart-prestashop.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mohsart-prestashop.blogspot.com/feeds/2158831543218658268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mohsart-prestashop.blogspot.com/2010/06/vacation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/2158831543218658268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/2158831543218658268'/><link rel='alternate' type='text/html' href='http://mohsart-prestashop.blogspot.com/2010/06/vacation.html' title='Vacation'/><author><name>mohsart</name><uri>http://www.blogger.com/profile/11144001509268375981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://i83.photobucket.com/albums/j300/mohsart/Beijing%2008-09/th_IMG_1146.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8346838345722076315.post-2008126588441987986</id><published>2010-06-24T21:56:00.008+02:00</published><updated>2010-06-25T14:06:50.620+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='note to self'/><category scheme='http://www.blogger.com/atom/ns#' term='how to'/><category scheme='http://www.blogger.com/atom/ns#' term='product view'/><title type='text'>Popups</title><content type='html'>In the picture in my &lt;a href="http://mohsart-prestashop.blogspot.com/2010/06/prestashop-as-bookstore-part-3-tabs.html"&gt;last post&lt;/a&gt; there is one thing that may need extra explanation:&lt;br /&gt;The texts "About the rank suggestion" and "About the book sizes" underneath the Data Sheet Tab.&lt;br /&gt;They are links to pop-up windows, like this&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_sXy26UwAN1w/TCO58cdWI5I/AAAAAAAAAtE/fv7Dx7qczgw/s1600/popup.jpg"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 400px; height: 313px;" src="http://1.bp.blogspot.com/_sXy26UwAN1w/TCO58cdWI5I/AAAAAAAAAtE/fv7Dx7qczgw/s400/popup.jpg" alt="" id="BLOGGER_PHOTO_ID_5486433219149964178" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is accomplished in a pretty crude way IMHO, in [themes folder]/css/global.css I added&lt;br /&gt;&lt;code&gt;/* pop up */&lt;br /&gt;#layer1 {&lt;br /&gt;position: relative;&lt;br /&gt;visibility: hidden;&lt;br /&gt;width: 250px;&lt;br /&gt;height: 110px;&lt;br /&gt;left: 0px;&lt;br /&gt;top: 0px;&lt;br /&gt;background-color: #fff;&lt;br /&gt;border: 1px solid #000;&lt;br /&gt;padding: 10px;&lt;br /&gt;}&lt;br /&gt;#layer2 {&lt;br /&gt;position: relative;&lt;br /&gt;visibility: hidden;&lt;br /&gt;width: 250px;&lt;br /&gt;height: 110px;&lt;br /&gt;left: 0px;&lt;br /&gt;top: 0px;&lt;br /&gt;background-color: #fff;&lt;br /&gt;border: 1px solid #000;&lt;br /&gt;padding: 10px;&lt;br /&gt;}&lt;br /&gt;#close {&lt;br /&gt;float: right;&lt;br /&gt;}&lt;br /&gt;/* /pop up */&lt;br /&gt;&lt;/code&gt;then in [themes folder]/product.tpl beneath the code to display the features&lt;br /&gt;&lt;code&gt;&amp;lt;table border="0"&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;&lt;br /&gt;&amp;lt;th style="text-align: left"&amp;gt;&lt;br /&gt;&amp;lt;a href="javascript:setVisible('layer1',true)"&amp;gt;{l s='About the rank suggestion'}&amp;lt;/a&amp;gt;&lt;br /&gt;&amp;lt;/th&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;th style="text-align: left"&amp;gt;&lt;br /&gt;&amp;lt;a href="javascript:setVisible('layer2',true)"&amp;gt;{l s='About the book sizes'}&amp;lt;/a&amp;gt;&lt;br /&gt;&amp;lt;/th&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&lt;br /&gt;&amp;lt;div id="layer1"&amp;gt;&lt;br /&gt;&amp;lt;span id="close"&amp;gt;&amp;lt;a href="javascript:setVisible('layer1')" style="text-decoration: none"&amp;gt;&amp;lt;strong&amp;gt;{l s='Hide'}&amp;lt;/strong&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;&amp;lt;br /&amp;gt;{l s='Rank suggestions are taken from various websites and are sometimes also based on my personal ideas.'}&amp;lt;br /&amp;gt;&lt;br /&gt;{l s='If you have different opinions about what rank the reader should be when reading the book, please contact me!'}&lt;br /&gt;&amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&lt;br /&gt;&amp;lt;div id="layer2"&amp;gt;&lt;br /&gt;&amp;lt;span id="close"&amp;gt;&amp;lt;a href="javascript:setVisible('layer2')" style="text-decoration: none"&amp;gt;&amp;lt;strong&amp;gt;{l s='Hide'}&amp;lt;/strong&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;&amp;lt;p&amp;gt;&amp;lt;br /&amp;gt;{l s='The book sizes are approximate.'}&amp;lt;br /&amp;gt;&lt;br /&gt;{l s='L = close to A4, about 26-28 cm high'}&amp;lt;/br&amp;gt;&lt;br /&gt;{l s='M = close to A5, about 19-22 cm high'}&amp;lt;/br&amp;gt;&lt;br /&gt;{l s='S = In-between A5 and A6, about 17-18 cm high'}&amp;lt;/br&amp;gt;&lt;br /&gt;{l s='XS = close to A6, about 14 cm high'}&lt;br /&gt;&amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;/table&amp;gt;&lt;br /&gt;&lt;/code&gt;and in [themes folder]/header.tpl&lt;br /&gt;&lt;code&gt;&amp;lt;script type="text/javascript" src="{$content_dir}/../../pop-up/popupDiv.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/code&gt;And finaly in the folder directed to in header.tpl I created the file &lt;span style="font-family:courier new;"&gt;popupDic.js&lt;/span&gt; with the following content&lt;br /&gt;&lt;code&gt;/* -----------------------------------------------&lt;br /&gt;Floating layer - v.1&lt;br /&gt;(c) 2006 www.haan.net&lt;br /&gt;contact: jeroen@haan.net&lt;br /&gt;You may use this script but please leave the credits on top intact.&lt;br /&gt;Please inform us of any improvements made.&lt;br /&gt;When usefull we will add your credits.&lt;br /&gt;------------------------------------------------ */&lt;br /&gt;x = 20;&lt;br /&gt;y = 70;&lt;br /&gt;function setVisible(obj)&lt;br /&gt;{&lt;br /&gt;obj = document.getElementById(obj);&lt;br /&gt;obj.style.visibility = (obj.style.visibility == 'visible') ? 'hidden' : 'visible';&lt;br /&gt;}&lt;br /&gt;function placeIt(obj)&lt;br /&gt;{&lt;br /&gt;obj = document.getElementById(obj);&lt;br /&gt;if (document.documentElement)&lt;br /&gt;{&lt;br /&gt;theLeft = document.documentElement.scrollLeft;&lt;br /&gt;theTop = document.documentElement.scrollTop;&lt;br /&gt;}&lt;br /&gt;else if (document.body)&lt;br /&gt;{&lt;br /&gt;theLeft = document.body.scrollLeft;&lt;br /&gt;theTop = document.body.scrollTop;&lt;br /&gt;}&lt;br /&gt;theLeft += x;&lt;br /&gt;theTop += y;&lt;br /&gt;obj.style.left = theLeft + 'px' ;&lt;br /&gt;obj.style.top = theTop + 'px' ;&lt;br /&gt;setTimeout("placeIt('layer1')",500);&lt;br /&gt;}&lt;br /&gt;window.onscroll = setTimeout("placeIt('layer1')",500);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;This solution was taken from &lt;a href="http://javascript.internet.com/miscellaneous/popup-div.html"&gt;&lt;span style="font-family:courier new;"&gt;http://javascript.internet.com/miscellaneous/popup-div.html&lt;/span&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8346838345722076315-2008126588441987986?l=mohsart-prestashop.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mohsart-prestashop.blogspot.com/feeds/2008126588441987986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mohsart-prestashop.blogspot.com/2010/06/popups.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/2008126588441987986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/2008126588441987986'/><link rel='alternate' type='text/html' href='http://mohsart-prestashop.blogspot.com/2010/06/popups.html' title='Popups'/><author><name>mohsart</name><uri>http://www.blogger.com/profile/11144001509268375981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_sXy26UwAN1w/TCO58cdWI5I/AAAAAAAAAtE/fv7Dx7qczgw/s72-c/popup.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8346838345722076315.post-6751807867799661516</id><published>2010-06-24T16:21:00.000+02:00</published><updated>2010-06-24T16:23:00.234+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Instructions from others'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>A Book on PrestaShop</title><content type='html'>Today I recieved a new Book about how to configure and use the  PrestaShop Package.&lt;br /&gt;&lt;br /&gt;It is in .pdf format and I will try to go through it next week when I  fly to China; depending on how much of a sleeping pill it is and on  several other things like Internet availability in China, a revew of  some sort is to be published here soon afterwards.&lt;br /&gt;I may not be able to reach this Blog for a month or so, so even if I  finish reading the book immediatly, the review may be a little late.  Please be patient.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8346838345722076315-6751807867799661516?l=mohsart-prestashop.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mohsart-prestashop.blogspot.com/feeds/6751807867799661516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mohsart-prestashop.blogspot.com/2010/06/book-on-prestashop.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/6751807867799661516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/6751807867799661516'/><link rel='alternate' type='text/html' href='http://mohsart-prestashop.blogspot.com/2010/06/book-on-prestashop.html' title='A Book on PrestaShop'/><author><name>mohsart</name><uri>http://www.blogger.com/profile/11144001509268375981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8346838345722076315.post-6634020488910285035</id><published>2010-06-24T13:16:00.011+02:00</published><updated>2010-06-24T16:01:26.707+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='book store'/><category scheme='http://www.blogger.com/atom/ns#' term='how to'/><category scheme='http://www.blogger.com/atom/ns#' term='product view'/><title type='text'>Prestashop as Bookstore Part 3 - Tabs</title><content type='html'>I have done several modifications to make &lt;span style="font-style: italic;"&gt;PrestaShop &lt;/span&gt;usable as a &lt;span style="font-style: italic;"&gt;bookstore  &lt;/span&gt;and I will try to sum it up in a few blog posts.&lt;br /&gt;&lt;br /&gt;In &lt;span style="font-style: italic;"&gt;PrestaShop&lt;/span&gt;, when you view a &lt;span style="font-style: italic;"&gt;product &lt;/span&gt;(click on the product from  e.g. the Product List, Start Page etc) you get a view like this.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_sXy26UwAN1w/TCNWykpahdI/AAAAAAAAAs0/dXVg4dBU65U/s1600/defaultprod.jpg"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 324px; height: 400px;" src="http://2.bp.blogspot.com/_sXy26UwAN1w/TCNWykpahdI/AAAAAAAAAs0/dXVg4dBU65U/s400/defaultprod.jpg" alt="" id="BLOGGER_PHOTO_ID_5486324197898225106" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I made some changes to the text block to the right of the picture, but recently I decided to put that extra information in a &lt;span style="font-style: italic;"&gt;tab&lt;/span&gt;, so now it looks like this&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_sXy26UwAN1w/TCNX3zSNVSI/AAAAAAAAAs8/E1U_LFfBU3o/s1600/modprod.jpg"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 368px; height: 400px;" src="http://2.bp.blogspot.com/_sXy26UwAN1w/TCNX3zSNVSI/AAAAAAAAAs8/E1U_LFfBU3o/s400/modprod.jpg" alt="" id="BLOGGER_PHOTO_ID_5486325387238397218" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There is some extra information in the "Data Sheet" &lt;span style="font-style: italic;"&gt;tab &lt;/span&gt;and a &lt;span style="font-style: italic;"&gt;new tab&lt;/span&gt; called "Review"&lt;br /&gt;&lt;br /&gt;First: To change the content of a tab, edit &lt;span style="font-family:courier new;"&gt;themes folder/product.tpl&lt;/span&gt; and find the line&lt;br /&gt;&lt;code&gt;&amp;lt;!-- description and features --&amp;gt;&lt;/code&gt;&lt;br /&gt;Thereafter, you will find two blocks of code, the first produce the tabs and the second the tab's content.&lt;br /&gt;So, basically, just add whatever you want in the correct place. E.g. to add "Facts about the product" to the &lt;span style="font-style: italic;"&gt;Data Sheet tab&lt;/span&gt; first find the &lt;span style="font-style: italic;"&gt;ID &lt;/span&gt;for that tab:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;li&amp;gt;&amp;lt;a id="more_info_tab_data_sheet" href="#idTab2"&amp;gt;{l s='Data sheet'}&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;So the ID is &lt;span style="font-family:courier new;"&gt;idTab2&lt;/span&gt;, find the block for &lt;span style="font-family:courier new;"&gt;idTab2 &lt;/span&gt;which will look something like this:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;{if $features}&lt;br /&gt;&amp;lt;ul id="idTab2" class="bullet"&amp;gt;&lt;br /&gt;&amp;lt;div id="short_description_block"&amp;gt;&lt;br /&gt;{if $features}&lt;br /&gt;{foreach from=$features item=feature}&lt;br /&gt;&amp;lt;li&amp;gt;&amp;lt;span&amp;gt;{$feature.name|escape:'htmlall':'UTF-8'}:&amp;lt;/span&amp;gt; {$feature.value|escape:'htmlall':'UTF-8'}&amp;lt;/li&amp;gt;&lt;br /&gt;{/foreach}&lt;br /&gt;{/if}&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;{/if}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Change it to&lt;br /&gt;&lt;code&gt;&lt;br /&gt;{if $features}&lt;br /&gt;{l s='Facts about the product'}&lt;br /&gt;&amp;lt;ul id="idTab2" class="bullet"&amp;gt;&lt;br /&gt;&amp;lt;div id="short_description_block"&amp;gt;&lt;br /&gt;{if $features}&lt;br /&gt;{foreach from=$features item=feature}&lt;br /&gt;&amp;lt;li&amp;gt;&amp;lt;span&amp;gt;{$feature.name|escape:'htmlall':'UTF-8'}:&amp;lt;/span&amp;gt; {$feature.value|escape:'htmlall':'UTF-8'}&amp;lt;/li&amp;gt;&lt;br /&gt;{/foreach}&lt;br /&gt;{/if}&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;{/if}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;You can use &lt;span style="font-family:courier new;"&gt;html tags&lt;/span&gt; to make it e.g. &lt;b&gt;bold&lt;/b&gt; and the &lt;span style="font-family:courier new;"&gt;{l s=xxx}&lt;/span&gt; makes it translatable from the BO.&lt;br /&gt;&lt;br /&gt;To add a &lt;span style="font-style: italic;"&gt;new tab&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;Reviews&lt;/span&gt;, I added the line&lt;br /&gt;&lt;code&gt;&lt;br /&gt;{if $product-&amp;gt;location}&amp;lt;li&amp;gt;&amp;lt;a id="review" href="#idTab100"&amp;gt;{l s='Reviews'}&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;{/if}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Right before &lt;span style="font-family:courier new;"&gt;{$HOOK_PRODUCT_TAB}&lt;/span&gt; to make it display last (before &lt;span style="font-style: italic;"&gt;Comments&lt;/span&gt;, whose code comes even further down). Note that it is the order of these lines of code that determines where the &lt;span style="font-style: italic;"&gt;tab &lt;/span&gt;goes, not the name of the &lt;span style="font-style: italic;"&gt;ID tag&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Then, somewhere below &lt;span style="font-family:courier new;"&gt;{$HOOK_PRODUCT_TAB}&lt;/span&gt;, within the &lt;span style="font-family:courier new;"&gt;div &lt;/span&gt;add&lt;br /&gt;&lt;code&gt;&lt;br /&gt;{if $product-&amp;gt;location}&lt;br /&gt;&amp;lt;div id="idTab100" class="rte"&amp;gt;&lt;br /&gt;...&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;{/if}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;where ... symbolize what you want to be shown in the &lt;span style="font-style: italic;"&gt;tab&lt;/span&gt;.&lt;br /&gt;I use the &lt;span style="font-style: italic;"&gt;location field&lt;/span&gt; to mark the item as a &lt;span style="font-style: italic;"&gt;book&lt;/span&gt;, and so the &lt;span style="font-family:courier new;"&gt;if &lt;/span&gt;statement makes the &lt;span style="font-style: italic;"&gt;tab &lt;/span&gt;only show for &lt;span style="font-style: italic;"&gt;books&lt;/span&gt;, you may use something else there, whatever fits your needs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8346838345722076315-6634020488910285035?l=mohsart-prestashop.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mohsart-prestashop.blogspot.com/feeds/6634020488910285035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mohsart-prestashop.blogspot.com/2010/06/prestashop-as-bookstore-part-3-tabs.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/6634020488910285035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/6634020488910285035'/><link rel='alternate' type='text/html' href='http://mohsart-prestashop.blogspot.com/2010/06/prestashop-as-bookstore-part-3-tabs.html' title='Prestashop as Bookstore Part 3 - Tabs'/><author><name>mohsart</name><uri>http://www.blogger.com/profile/11144001509268375981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_sXy26UwAN1w/TCNWykpahdI/AAAAAAAAAs0/dXVg4dBU65U/s72-c/defaultprod.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8346838345722076315.post-388109438577378842</id><published>2010-06-05T17:33:00.006+02:00</published><updated>2010-06-05T18:06:01.071+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='book store'/><category scheme='http://www.blogger.com/atom/ns#' term='how to'/><category scheme='http://www.blogger.com/atom/ns#' term='product view'/><title type='text'>Prestashop as Bookstore Part 2 - Book Series &amp; Publishers</title><content type='html'>I have done several modifications to make &lt;span style="font-style: italic;"&gt;PrestaShop &lt;/span&gt;usable as a &lt;span style="font-style: italic;"&gt;bookstore &lt;/span&gt;and I will try to sum it up in a few blog posts.&lt;br /&gt;&lt;br /&gt;Today I'll talk a little about more information I like to have in my &lt;span style="font-style: italic;"&gt;Bookstore&lt;/span&gt;, eg the &lt;span style="font-style: italic;"&gt;Publishers&lt;/span&gt; of the books.&lt;br /&gt;&lt;br /&gt;I understand if my needs are not the same as most Bookstores have, but these modifications were very valuable for my needs.&lt;br /&gt;First of all, listing the &lt;span style="font-style: italic;"&gt;Publishers&lt;/span&gt;, to be able to find all books from a certain &lt;span style="font-style: italic;"&gt;Publisher &lt;/span&gt;is almost a must for me.&lt;br /&gt;And also, lots of my books are part of a &lt;span style="font-style: italic;"&gt;series &lt;/span&gt;of books, so listing all books in a series is a really good thing for me.&lt;br /&gt;&lt;br /&gt;First off I translated &lt;span style="font-style: italic;"&gt;Manufacturers &lt;/span&gt;and &lt;span style="font-style: italic;"&gt;Distributors &lt;/span&gt;to &lt;span style="font-style: italic;"&gt;Publisher &lt;/span&gt;and &lt;span style="font-style: italic;"&gt;Book Series&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;I then used the &lt;span style="font-style: italic;"&gt;Location &lt;/span&gt;field for the &lt;span style="font-style: italic;"&gt;ISBN number&lt;/span&gt; and by leaving this field empty for other items I can determine if a item is a book or not (for books without ISBN I just put "none" in the field.&lt;br /&gt;&lt;br /&gt;I put the info in the same block as the &lt;span style="font-style: italic;"&gt;Authors&lt;/span&gt;, like this&lt;br /&gt;(continued from last post's chunk of code, in themes/product.tpl)&lt;br /&gt;&lt;code&gt;&lt;br /&gt;{if $product-&amp;gt;manufacturer_name}&lt;br /&gt;&amp;lt;div id="short_description_content" class="rte align_justify"&amp;gt;&lt;br /&gt;{if $product-&amp;gt;location}&lt;br /&gt;{l s='Publisher'}:&lt;br /&gt;&amp;lt;a href="{$link-&amp;gt;getmanufacturerLink($product-&amp;gt;id_manufacturer, $product-&amp;gt;link_rewrite)|escape:'htmlall':'UTF-8'}" title="{l s='List books from'} {$product-&amp;gt;manufacturer_name|escape:'htmlall':'UTF-8'}"&amp;gt;{$product-&amp;gt;manufacturer_name|escape:'htmlall':'UTF-8'}&amp;lt;/a&amp;gt;&lt;br /&gt;{else}&lt;br /&gt;{l s='Manufacturer'}:&lt;br /&gt;&amp;lt;a href="{$link-&amp;gt;getmanufacture&lt;/code&gt;&lt;code&gt;rLink($product-&amp;gt;id_manufacturer, $product-&amp;gt;link_rewrite)|escape:'htmlall':'UTF-8'}" title="{l s='List items made by'} {$product-&amp;gt;manufacturer_name|escape:'htmlall':'UTF-8'}"&amp;gt;{$product-&amp;gt;manufacturer_name|escape:'htmlall':'UTF-8'}&amp;lt;/a&amp;gt;&lt;br /&gt;{/if}&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;{/if}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;As you may see in the code above, I later realized that I could use &lt;span style="font-style: italic;"&gt;Manufacturers &lt;/span&gt;for their "real" use when not dealing with books.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;{if $product-&amp;gt;supplier_name}&lt;br /&gt;&amp;lt;div id="short_description_content" class="rte align_justify"&amp;gt;&lt;br /&gt;{l s='Supplier'}:&lt;br /&gt;&amp;lt;a href="{$link-&amp;gt;getsupplierLink($product-&amp;gt;id_supplier, $product-&amp;gt;link_rewrite)|escape:'htmlall':'UTF-8'}" title="{l s='List books in the series'} {$product-&amp;gt;supplier_name|escape:'htmlall':'UTF-8'}"&amp;gt;&lt;br /&gt;{$product-&amp;gt;supplier_name|escape:'htmlall':'UTF-8'}&amp;lt;/a&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;{/if}&lt;br /&gt;{if $product-&amp;gt;location != ''}&lt;br /&gt;&amp;lt;div id="short_description_content"&lt;/code&gt;&lt;code&gt; class="rte align_justify"&amp;gt;&lt;br /&gt;{l s='ISBN'}: {$product-&amp;gt;location}&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;{/if}&lt;br /&gt;{if $product-&amp;gt;ean13 != ''}&lt;br /&gt;&amp;lt;div id="short_description_content" class="rte align_justify"&amp;gt;&lt;br /&gt;{l s='EAN'}: {$product-&amp;gt;ean13}&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;{/if}&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/p&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;And last in the block I put the &lt;span style="font-style: italic;"&gt;ISBN &lt;/span&gt;and/or &lt;span style="font-style: italic;"&gt;EAN&lt;/span&gt;, which tends to be the same thing for most books (but not always) so I just figured why not. More information than one needs is better than less information than one wants...&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_sXy26UwAN1w/TApxmiePRtI/AAAAAAAAAsU/zI3GWkJD3gg/s1600/bloggbild2.jpg"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 197px; height: 197px;" src="http://2.bp.blogspot.com/_sXy26UwAN1w/TApxmiePRtI/AAAAAAAAAsU/zI3GWkJD3gg/s400/bloggbild2.jpg" alt="" id="BLOGGER_PHOTO_ID_5479316803552233170" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Then I modified the settings in the &lt;span style="font-style: italic;"&gt;Manufacturers &lt;/span&gt;and &lt;span style="font-style: italic;"&gt;Distributors Blocks&lt;/span&gt; in the &lt;span style="font-style: italic;"&gt;Ad&lt;/span&gt;&lt;span style="font-style: italic;"&gt;min &lt;/span&gt;part of &lt;span style="font-style: italic;"&gt;Prestashop &lt;/span&gt;to not use plain text but a drop-down list.&lt;br /&gt;&lt;br /&gt;I also did some more translations so it says "Select Series" etc.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the future I'd like to split up the &lt;span style="font-style: italic;"&gt;Distributors Block&lt;/span&gt; in two so that one is for &lt;span style="font-style: italic;"&gt;Publishers &lt;/span&gt;and one for &lt;span style="font-style: italic;"&gt;Manufacturors&lt;/span&gt;, but right now th&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_sXy26UwAN1w/TApxmX-6z-I/AAAAAAAAAsM/Gbr-e-y4Dw4/s1600/bloggbild1.jpg"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 400px; height: 259px;" src="http://4.bp.blogspot.com/_sXy26UwAN1w/TApxmX-6z-I/AAAAAAAAAsM/Gbr-e-y4Dw4/s400/bloggbild1.jpg" alt="" id="BLOGGER_PHOTO_ID_5479316800736514018" border="0" /&gt;&lt;/a&gt;ey are mixed together.&lt;br /&gt;&lt;br /&gt;This is how the product view looks for a book after the modifications.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_sXy26UwAN1w/TApzTTiSheI/AAAAAAAAAsc/HeW85EnkXZU/s1600/bloggbild3.jpg"&gt;&lt;img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 400px; height: 258px;" src="http://4.bp.blogspot.com/_sXy26UwAN1w/TApzTTiSheI/AAAAAAAAAsc/HeW85EnkXZU/s400/bloggbild3.jpg" alt="" id="BLOGGER_PHOTO_ID_5479318672148432354" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;and this is how it looks for a non-book.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="display: block;" id="formatbar_Buttons"&gt;&lt;span class=" on" style="display: block;" id="formatbar_Add_Image" title="Lägg till bild" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="addImage();" onmousedown="CheckFormatting(event);;ButtonMouseDown(this);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8346838345722076315-388109438577378842?l=mohsart-prestashop.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mohsart-prestashop.blogspot.com/feeds/388109438577378842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mohsart-prestashop.blogspot.com/2010/06/prestashop-as-bookstore-part-2-book.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/388109438577378842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/388109438577378842'/><link rel='alternate' type='text/html' href='http://mohsart-prestashop.blogspot.com/2010/06/prestashop-as-bookstore-part-2-book.html' title='Prestashop as Bookstore Part 2 - Book Series &amp; Publishers'/><author><name>mohsart</name><uri>http://www.blogger.com/profile/11144001509268375981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_sXy26UwAN1w/TApxmiePRtI/AAAAAAAAAsU/zI3GWkJD3gg/s72-c/bloggbild2.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8346838345722076315.post-9004706174152061354</id><published>2010-06-02T16:39:00.005+02:00</published><updated>2010-06-05T17:39:58.516+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='book store'/><category scheme='http://www.blogger.com/atom/ns#' term='how to'/><category scheme='http://www.blogger.com/atom/ns#' term='product view'/><title type='text'>Prestashop as Bookstore Part 1 - Authors</title><content type='html'>I have done several modifications to make &lt;span style="font-style: italic;"&gt;PrestaShop&lt;/span&gt; usable as a &lt;span style="font-weight: bold;"&gt;bookstore &lt;/span&gt;and I will try to sum it up in a few blog posts.&lt;br /&gt;&lt;br /&gt;First off I'll try to explain how I handled &lt;span style="font-style: italic;"&gt;authors&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;Some others have used eg &lt;span style="font-family:courier new;"&gt;Manufacturers &lt;/span&gt;for this job, renaming &lt;span style="font-family:courier new;"&gt;Manufacturers &lt;/span&gt;to &lt;span style="font-family:courier new;"&gt;Authors &lt;/span&gt;kind of does the job, but there are a couple of issues with this solution. Most important for me was that the authors of the books that I sell often work together with others, and several authors have written many books.&lt;br /&gt;Basically, what I needed was a &lt;span style="font-style: italic;"&gt;one to many&lt;/span&gt; relationship, ie if I chose a author I'd like to see all books that s/he has written, as a sole author as well as those together with others.&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Manufacturers &lt;/span&gt;and &lt;span style="font-family:courier new;"&gt;Distributors &lt;/span&gt;don't work like this so I had to look for another solution.&lt;br /&gt;&lt;br /&gt;I decided to use &lt;span style="font-family:courier new;"&gt;Tags&lt;/span&gt;. This is not optimal, but for my purposes it works quite good.&lt;br /&gt;&lt;br /&gt;First thing to do is translate &lt;span style="font-family:courier new;"&gt;Tags &lt;/span&gt;to &lt;span style="font-family:courier new;"&gt;Authors &lt;/span&gt;(and the equivalent for other languages that you use), using Tools, Translations in the Back Office.&lt;br /&gt;&lt;br /&gt;Then I wanted the Tags Block to look like eg the Manufacturers Block.&lt;br /&gt;By looking at the code in modules/blocktags and modules/blockmanufacturer I came up with this for modules/blocktags/blocktags.tpl&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;!-- Block tags module --&amp;gt;&lt;br /&gt;&amp;lt;div id="tags_block_left" class="block blockmanufacturer"&amp;gt;&lt;br /&gt;&amp;lt;h4&amp;gt;{l s='Tags' mod='blocktags'}&amp;lt;/h4&amp;gt;&lt;br /&gt;&amp;lt;div class="block_content"&amp;gt;&lt;br /&gt;{if $tags}&lt;br /&gt;&amp;lt;form action="{$smarty.server.SCRIPT_NAME}" method="get"&amp;gt;&lt;br /&gt; &amp;lt;p&amp;gt;&lt;br /&gt;  &amp;lt;select id="tags_list" onchange="autoUrl('tags_list', '');"&amp;gt;&lt;br /&gt;   &amp;lt;option value="0"&amp;gt;{l s='All tags' mod='blocktags'}&amp;lt;/option&amp;gt;&lt;br /&gt;   {foreach from=$tags item=tag}&lt;br /&gt;    &amp;lt;option value="{$base_dir}search.php?tag={$tag.name|urlencode}"&amp;gt;{$tag.name}&amp;lt;/option&amp;gt;&lt;br /&gt;   {/foreach}&lt;br /&gt;   &amp;lt;/select&amp;gt;&lt;br /&gt; &amp;lt;/p&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;{else}&lt;br /&gt;{l s='No tags specified yet' mod='blocktags'}&lt;br /&gt;{/if}&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;!-- /Block tags module --&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Then I wanted the author(s) to show when I view the product, in themes/prestashop (or whatever themes folder name you have)/product.tpl&lt;br /&gt;After&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;div id="pb-left-column"&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;add&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;div id="short_description_block"&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;(This is to create a separate block where authors and other information will go, it will show right above the short description block.)&lt;br /&gt;&lt;code&gt;&lt;br /&gt;{if $product-&amp;gt;tags}&lt;br /&gt; &amp;lt;div id="short_description_content" class="rte align_justify"&amp;gt;{l s='Tags'}:&lt;br /&gt; {if $lang_iso == se} {assign var='lng' value=4}&lt;br /&gt; {else} {assign var='lng' value=1}&lt;br /&gt; {/if}&lt;br /&gt; {assign var='tag1' value=$product-&amp;gt;tags[$lng]}&lt;br /&gt; {foreach from=$tag1 item=author}&lt;br /&gt;  &amp;lt;a href="{$base_dir}search.php?tag={$author}" title="{l s='List books by'} {$author}"&amp;gt;{$author}&amp;lt;/a&amp;gt;&lt;br /&gt; {/foreach}&lt;br /&gt; &amp;lt;/div&amp;gt;&lt;br /&gt;{/if}&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;(The last line is of course to end the block, more will be added in this block later.)&lt;br /&gt;&lt;br /&gt;All texts inside &lt;code&gt;{l s='...'}&lt;/code&gt; can and should be traslated in the BO.&lt;br /&gt;&lt;br /&gt;I didn't find what variable contains the numeric code for the language, and it seems to be a great secret because nobody at the PS Forum seems to know either, so I did the ugly workaround using the if statement above.&lt;br /&gt;&lt;br /&gt;Now I just added the authors as tags on each book.&lt;br /&gt;Note that it has to be done for each language you use.&lt;br /&gt;&lt;br /&gt;The modifications described above were made about six months ago, so I may have forgotten something in the description. Please feel free to ask if something is unclear!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8346838345722076315-9004706174152061354?l=mohsart-prestashop.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mohsart-prestashop.blogspot.com/feeds/9004706174152061354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mohsart-prestashop.blogspot.com/2010/06/prestashop-as-bookstore-part-1-authors.html#comment-form' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/9004706174152061354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/9004706174152061354'/><link rel='alternate' type='text/html' href='http://mohsart-prestashop.blogspot.com/2010/06/prestashop-as-bookstore-part-1-authors.html' title='Prestashop as Bookstore Part 1 - Authors'/><author><name>mohsart</name><uri>http://www.blogger.com/profile/11144001509268375981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8346838345722076315.post-3390975799950788185</id><published>2010-06-02T12:54:00.009+02:00</published><updated>2010-06-02T13:54:12.290+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='note to self'/><category scheme='http://www.blogger.com/atom/ns#' term='bug'/><category scheme='http://www.blogger.com/atom/ns#' term='how to'/><category scheme='http://www.blogger.com/atom/ns#' term='language'/><title type='text'>Default Country - Bug in IE 6-8</title><content type='html'>It seems I never wrote about this strange &lt;span style="font-weight: bold;"&gt;bug &lt;/span&gt;before, so here goes...&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div style="font-weight: bold;"&gt;Problem description&lt;/div&gt; &lt;div&gt;If a customer use the Swedish Internet Explorer 6, 7, or 8 PrestaShop  thinks they are located in &lt;span style="font-style: italic;"&gt;El Salvador&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt; &lt;div&gt;This is because of a &lt;span style="font-weight: bold;"&gt;bug&lt;/span&gt; in IE. IE sends the &lt;span style="font-family:courier new;"&gt;Language Code&lt;/span&gt; (&lt;span style="font-family:courier new;"&gt;SV&lt;/span&gt; for &lt;span style="font-style: italic;"&gt;Sweden&lt;/span&gt;)  intead of the &lt;span style="font-family:courier new;"&gt;Country Code&lt;/span&gt; (&lt;span style="font-family:courier new;"&gt;SE&lt;/span&gt; for &lt;span style="font-style: italic;"&gt;Sweden&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;SV&lt;/span&gt; for &lt;span style="font-style: italic;"&gt;El Salvador&lt;/span&gt;) to the  server.&lt;/div&gt; &lt;div&gt;Since the &lt;span style="font-weight: bold;"&gt;bug &lt;/span&gt;appeared &lt;span style="font-style: italic;"&gt;as early&lt;/span&gt; as in ver 6 of IE, one would think that the  bug would be solved by now, but I guess it's not regarded severe enough.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Client side workaround&lt;/span&gt;&lt;br /&gt;&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;One workaround would be to add .se as suffix in IE (&lt;span style="font-family:courier new;"&gt;Verktyg&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt; Internetalternativ&lt;/span&gt;, &lt;span style="font-family:courier new;"&gt;Språk&lt;/span&gt;), but since that only fix the problem for &lt;span style="font-style: italic;"&gt;that single  client&lt;/span&gt; it's not really a solution.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Solution&lt;/span&gt;&lt;br /&gt;&lt;/div&gt; &lt;div&gt; &lt;/div&gt; &lt;div&gt;The way I solved it was to &lt;span style="font-style: italic;"&gt;hardcode &lt;/span&gt;it in the PrestaShop code, like  this:&lt;/div&gt; &lt;div&gt;In &lt;span style="font-family:courier new;"&gt;themes/prestashop&lt;/span&gt; (or whatever your &lt;span style="font-style: italic;"&gt;themes folder&lt;/span&gt; is  called)&lt;span style="font-family:courier new;"&gt;/authentication.tpl&lt;/span&gt; change &lt;span style="font-family:courier new;"&gt;$sl_country&lt;/span&gt; to the number that represents &lt;span style="font-style: italic;"&gt;Sweden &lt;/span&gt;in your installation of PrestaShop (in mine it's 18 but could be something else for you)&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;I.e. change&lt;br /&gt;&lt;code&gt;&lt;br /&gt;{foreach from=$countries item=v}&lt;br /&gt;&amp;lt;option value="{$v.id_country}" {if ($sl_country == $v.id_country)} selected="selected"{/if}&amp;gt;{$v.name|escape:'htmlall':'UTF-8'}&amp;lt;/option&amp;gt;&lt;br /&gt;{/foreach}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;to&lt;br /&gt;&lt;code&gt;&lt;br /&gt;{foreach from=$countries item=v}&lt;br /&gt;&amp;lt;option value="{$v.id_country}" {if (18 == $v.id_country)} selected="selected"{/if}&amp;gt;{$v.name|escape:'htmlall':'UTF-8'}&amp;lt;/option&amp;gt;&lt;br /&gt;{/foreach}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;PS Note to self: use &lt;a href="http://www.simplebits.com/cgi-bin/simplecode.pl"&gt;this&lt;/a&gt; to include code in blog posts&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8346838345722076315-3390975799950788185?l=mohsart-prestashop.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mohsart-prestashop.blogspot.com/feeds/3390975799950788185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mohsart-prestashop.blogspot.com/2010/06/default-country-bug-in-ie-6-8.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/3390975799950788185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/3390975799950788185'/><link rel='alternate' type='text/html' href='http://mohsart-prestashop.blogspot.com/2010/06/default-country-bug-in-ie-6-8.html' title='Default Country - Bug in IE 6-8'/><author><name>mohsart</name><uri>http://www.blogger.com/profile/11144001509268375981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8346838345722076315.post-6966329601298718556</id><published>2010-03-08T04:18:00.005+01:00</published><updated>2010-03-08T04:46:54.427+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='bug'/><category scheme='http://www.blogger.com/atom/ns#' term='how to'/><category scheme='http://www.blogger.com/atom/ns#' term='product view'/><title type='text'>A small bug(?) in product.tpl</title><content type='html'>I found that if I created a product that was allowed to be ordered when it is out of stock and it has &lt;em&gt;combinations&lt;/em&gt;, or &lt;em&gt;attributes&lt;/em&gt;, when I look on the product (&lt;em&gt;product.tpl&lt;/em&gt;) the text about entering an email address to be "notified when the item is in stock" appears.&lt;br /&gt;This is &lt;strong&gt;only&lt;/strong&gt; if there are &lt;em&gt;combinations&lt;/em&gt; added, so a little strange.&lt;br /&gt;&lt;br /&gt;While debugging the code I found that by inserting&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family:courier new;"&gt;{if !$allow_oosp}&lt;br /&gt;...&lt;br /&gt;{/if}&lt;br /&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;around the &lt;span style="font-family:courier new;"&gt;$HOOK_PRODUCT_OOS&lt;/span&gt; paragraph, right after &lt;span style="font-family:courier new;"&gt;&lt; ! - - Out of stock hook - - &gt;&lt;/span&gt;, the behaviour returns to normal.&lt;br /&gt;(spaces added so as the code won't be interpreted as code...)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8346838345722076315-6966329601298718556?l=mohsart-prestashop.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mohsart-prestashop.blogspot.com/feeds/6966329601298718556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mohsart-prestashop.blogspot.com/2010/03/small-bug-in-producttpl.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/6966329601298718556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/6966329601298718556'/><link rel='alternate' type='text/html' href='http://mohsart-prestashop.blogspot.com/2010/03/small-bug-in-producttpl.html' title='A small bug(?) in product.tpl'/><author><name>mohsart</name><uri>http://www.blogger.com/profile/11144001509268375981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8346838345722076315.post-4387649666332113256</id><published>2010-02-15T23:28:00.001+01:00</published><updated>2010-02-15T23:29:57.661+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='note to self'/><title type='text'>Toolkit</title><content type='html'>&lt;a href="http://esdev.net/ultimate-prestashop-toolkit-50-resources"&gt;http://esdev.net/ultimate-prestashop-toolkit-50-resources&lt;/a&gt;&lt;br /&gt;Haven't had the time to check it out yet&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8346838345722076315-4387649666332113256?l=mohsart-prestashop.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mohsart-prestashop.blogspot.com/feeds/4387649666332113256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mohsart-prestashop.blogspot.com/2010/02/toolkit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/4387649666332113256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/4387649666332113256'/><link rel='alternate' type='text/html' href='http://mohsart-prestashop.blogspot.com/2010/02/toolkit.html' title='Toolkit'/><author><name>mohsart</name><uri>http://www.blogger.com/profile/11144001509268375981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8346838345722076315.post-3238612061267284599</id><published>2010-02-15T22:24:00.002+01:00</published><updated>2010-02-15T22:32:46.763+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='how to'/><category scheme='http://www.blogger.com/atom/ns#' term='positioning'/><title type='text'>Moving a block</title><content type='html'>&lt;strong&gt;If you want to move it inside the same panel&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Go to &lt;em&gt;Modules&lt;/em&gt; and click &lt;em&gt;Positions&lt;/em&gt;&lt;/li&gt;&lt;li&gt;Now you can move the block up or down inside the panel where it is located&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;strong&gt;If you want to move it to a different panel&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Click &lt;em&gt;Transplant a module&lt;/em&gt;&lt;/li&gt;&lt;li&gt;Select the Module/block that you want to move and where you want it&lt;/li&gt;&lt;li&gt;Remove it from where it used to be&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8346838345722076315-3238612061267284599?l=mohsart-prestashop.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mohsart-prestashop.blogspot.com/feeds/3238612061267284599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mohsart-prestashop.blogspot.com/2010/02/moving-block.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/3238612061267284599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/3238612061267284599'/><link rel='alternate' type='text/html' href='http://mohsart-prestashop.blogspot.com/2010/02/moving-block.html' title='Moving a block'/><author><name>mohsart</name><uri>http://www.blogger.com/profile/11144001509268375981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8346838345722076315.post-4857627293253022169</id><published>2010-02-15T21:48:00.005+01:00</published><updated>2010-02-25T06:28:05.367+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='how to'/><category scheme='http://www.blogger.com/atom/ns#' term='translation'/><title type='text'>Translations</title><content type='html'>If you want to translate something in PrestaShop, don't edit any files!&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;This is the way to do it&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;In the &lt;em&gt;Back Office&lt;/em&gt;, go to &lt;em&gt;Tools&lt;/em&gt; and &lt;em&gt;Translations&lt;/em&gt;&lt;/li&gt;&lt;li&gt;Select where the translation is to be made, usually in a &lt;em&gt;Module&lt;/em&gt; or the &lt;em&gt;Front Office&lt;/em&gt;, and click the flag of the country whose language you want to translate to&lt;/li&gt;&lt;li&gt;Click &lt;em&gt;Expand all fieldsets&lt;/em&gt; and search for the phrase you want to translate&lt;/li&gt;&lt;li&gt;Enter the translation and click &lt;em&gt;Update Translations&lt;/em&gt;&lt;/li&gt;&lt;/ul&gt;Simple as that&lt;br /&gt;What this does is add the translated phrase(s) to a file called &lt;span style="font-family:courier new;"&gt;xx.php&lt;/span&gt; where &lt;span style="font-family:courier new;"&gt;xx&lt;/span&gt; is the ISO-Code of the country (where it is located depends on what you have translated).&lt;br /&gt;It is also (I guess) possible to edit that file directly but I wouldn't recommend it.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;OK, that's not too hard, but what if I want to add some text and translate that?&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Lets say we want to add the text &lt;span style="font-family:courier new;"&gt;"This is a test shop, please do not order anything"&lt;/span&gt; to all product pages.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Go to the &lt;span style="font-family:courier new;"&gt;themes&lt;/span&gt; directory (&lt;span style="font-family:courier new;"&gt;themes/prestashop&lt;/span&gt; by default) and edit the file &lt;span style="font-family:courier new;"&gt;product.tpl&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Enter this where you want the text to appear &lt;span style="font-family:courier new;"&gt;{l s='This is a test shop, please do not order anything'}&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Then follow the steps above and you will see that the phrase has popped up to be translated in the &lt;em&gt;Back Office&lt;/em&gt;&lt;/li&gt;&lt;/ul&gt;Note that if the phrase is located in a &lt;em&gt;module&lt;/em&gt; the &lt;span style="font-family:courier new;"&gt;xxx.tpl&lt;/span&gt; file is located in &lt;span style="font-family:courier new;"&gt;modules/xxx&lt;/span&gt; where &lt;span style="font-family:courier new;"&gt;xxx&lt;/span&gt; is the name of the module, and that you need to add the &lt;em&gt;module name&lt;/em&gt; in the code, ie&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;{l s='This is a text to be shown in a module' &lt;strong&gt;mod='xxx'&lt;/strong&gt;}&lt;/span&gt;&lt;br /&gt;If you forget about the &lt;span style="font-family:courier new;"&gt;mod='xxx'&lt;/span&gt;, the phrase will show up to be translated in the &lt;em&gt;Back Office&lt;/em&gt;, but the translated phrase will never show up in the shop.&lt;br /&gt;&lt;br /&gt;If you want to change a text, I'd advise you not to change it in the &lt;em&gt;code&lt;/em&gt; but instead use the &lt;em&gt;translation tool&lt;/em&gt; and translate from English to English.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8346838345722076315-4857627293253022169?l=mohsart-prestashop.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mohsart-prestashop.blogspot.com/feeds/4857627293253022169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mohsart-prestashop.blogspot.com/2010/02/translations.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/4857627293253022169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8346838345722076315/posts/default/4857627293253022169'/><link rel='alternate' type='text/html' href='http://mohsart-prestashop.blogspot.com/2010/02/translations.html' title='Translations'/><author><name>mohsart</name><uri>http://www.blogger.com/profile/11144001509268375981</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
