Jump to content

ÅÄÖ i korta produktbeskrivningen


Gnylf

Recommended Posts

Tjena

Jag har en sida som jag använt en templatefil till och mina produktbeskrivningar innehåller mycket ÅÄÖ. Jag har upptäckt att när jag kontrollerar min sida med detta verktyg:

http://www.submitexpress.com/analyzer/

(min sida) www.gnylf.com

Så får alla mina korta produktbeskrivningar ä osv i texten. Jag har provat att byta ut dessa i texten men det fungerar inte. Kan det vara så att något i templaten jag använder inte konverterar till UTF8 i just korta produktbeskrivningar?

Jag är orolig att detta på något vis påverkar min SEO negativt.

Något tips, anyone?

Link to comment
Share on other sites

Det är möjligt att det är så, product-list.tpl får du kika i och se hur description_short behandlas, så här är det i orginaltemat.
{$product.description_short|strip_tags:'UTF-8'|truncate:360}

|strip_tags:'UTF-8' är det som tar bort eventuell html kod och konverterar till utf-8
|truncate:360 kortar ner texten till 360 tecken.

Link to comment
Share on other sites

Tjena

Lusläste där och det såg ut så här:

{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}



Kunde inte hitta något som tyder på att den inte kör UTF-8.

Hela koden:

>{if isset($products)}
   <!-- Products list -->
</pre>
<ul>
   {foreach from=$products item=product name=products}


{if ($product.allow_oosp OR $product.quantity > 0)}{l s='Available'}{else}{l s='Out of stock'}{/if}
getImageLink($product.link_rewrite, $product.id_image, 'home')}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" />
{if $product.new == 1}{l s='new'}{/if}{$product.name|truncate:35:'...'|escape:'htmlall':'UTF-8'}

{$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'}


               {if $product.on_sale}
{l s='On sale!'}
               {elseif ($product.reduction_price != 0 || $product.reduction_percent != 0) && ($product.reduction_from == $product.reduction_to OR ($smarty.now|date_format:'%Y-%m-%d' <= $product.reduction_to && $smarty.now|date_format:'%Y-%m-%d' >= $product.reduction_from))}
{l s='Price lowered!'}
               {/if}
               {if !$priceDisplay || $priceDisplay == 2}{convertPrice price=$product.price}{if $priceDisplay == 2} {l s='+Tx'}{/if}{/if}
               {if $priceDisplay}{convertPrice price=$product.price_tax_exc}{if $priceDisplay == 2} {l s='-Tx'}{/if}{/if}
               {if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2}
{l s='Add to cart'}
               {else}
{l s='Add to cart'}
               {/if}
{l s='View'}




   {/foreach}
</ul>
<br>   <!-- /Products list --><br

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...