Showing posts with label language. Show all posts
Showing posts with label language. Show all posts

Monday, December 3, 2012

PS 1.5 - warning, please wait for mature version!

Long time no blogging, I'll see if I can rectify that...

I've been playing around with PS 1.5.2 for a bit and I must say that 1.5 is not yet mature.
Some bugs I've found:
  • Installing 1.5.2 breaks other installations if same database is used! - I installed 1.5.2 and supplied db-prefix hk_, after install, all references to Swedish was wiped out from my old installation that has ps_ as db-prefix.
  • With a Swedish browser (tested with FF 16 and IE 9) and registring a new address as customer, El Salvador is proposed as country (see old blog post for plausible reason).
  • For apparently no reason, sometimes all products show up twise; if this happens, don't delete the duplicates since that removes the originals too.
  • When searching for products, either via the search box or by clicking a tag, some products are listed with a price of 0; in other views (featured, category etc) the price is shown OK). In the cart, prices are OK so no monetary risk but not very pretty.
  • The Suppliers Block is broken: The title bar is not a link, if code is changed to make it work clicking it shows "There are no suppliers." ($nbSuppliers that is supposed to hold the number of suppliers is 0 and no variables holds any supplier-info.)
  • The MoneyBookers Module has a small issue that the image that is supposed to show up has the wrong name in the code (or the image is not included/has the wrong name).
Annoyances:
  • It is getting increasingly difficult to get help via the forum.
  • I'm not sure if reporting bugs does any good since there is absolutely zero feedback.
  • Not that many Modules/Themes are ported/developed for 1.5 because, I would think, of the issues with that version.
I'll try to get back soon with some information on a couple of tweaks I've done.

Wednesday, June 2, 2010

Default Country - Bug in IE 6-8

It seems I never wrote about this strange bug before, so here goes...

Problem description
If a customer use the Swedish Internet Explorer 6, 7, or 8 PrestaShop thinks they are located in El Salvador.

This is because of a bug in IE. IE sends the Language Code (SV for Sweden) intead of the Country Code (SE for Sweden, SV for El Salvador) to the server.
Since the bug appeared as early 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.

Client side workaround
One workaround would be to add .se as suffix in IE (Verktyg, Internetalternativ, Språk), but since that only fix the problem for that single client it's not really a solution.

Solution
The way I solved it was to hardcode it in the PrestaShop code, like this:
In themes/prestashop (or whatever your themes folder is called)/authentication.tpl change $sl_country to the number that represents Sweden in your installation of PrestaShop (in mine it's 18 but could be something else for you)

I.e. change

{foreach from=$countries item=v}
<option value="{$v.id_country}" {if ($sl_country == $v.id_country)} selected="selected"{/if}>{$v.name|escape:'htmlall':'UTF-8'}</option>
{/foreach}

to

{foreach from=$countries item=v}
<option value="{$v.id_country}" {if (18 == $v.id_country)} selected="selected"{/if}>{$v.name|escape:'htmlall':'UTF-8'}</option>
{/foreach}


PS Note to self: use this to include code in blog posts