Jump to content

Changing text in widget buttons


Recommended Posts

Hi everyone,

 

I am quiet new in using Prestashop so it's maybe just a little thing but...

I'm from Czech Republic and I'm doing Czech localization (language translation) of Presta theme and widgets.

 

But I have a serious problem - I dont know how to change text in my widgets. I give you an example = my problem.

 

I'm using LEO Widgets and I have a Product List . I want to change button title from 'Add to cart' to sth else in my language. Then I want to remove "Quick view".

 

I changed some .tpl, but still dont get an answer. :(

 

//I have experience in HTML, CSS + bases of programming, so I have orientation in code (mostly).

 

 

Could somebody please give me little help?

 

 

Thank you so much! :)

Link to comment
Share on other sites

I'm now working on my page hidden under live_config, so this link folows you to my website: http://goo.gl/nwKLhX

 

You can see one product and than Add to cart  button (thats it). I'd like to underestand this "methode of chaning" names, so it would become universal (if you underestand my bad english).

 

//EDIT: I swear it's this code, but when I change the parts I think I need to change - nothing happends.

 

<div class="button-container">
{if ($product.id_product_attribute == 0 || (isset($add_prod_display) && ($add_prod_display == 1))) && $product.available_for_order && !isset($restricted_country_mode) && $product.customizable != 2 && !$PS_CATALOG_MODE}
{if (!isset($product.customization_required) || !$product.customization_required) && ($product.allow_oosp || $product.quantity > 0)}
{capture}add=1&id_product={$product.id_product|intval}{if isset($static_token)}&token={$static_token}{/if}{/capture}
<a class="button ajax_add_to_cart_button btn btn-outline" href="{$link->getPageLink('cart', true, NULL, $smarty.capture.default, false)|escape:'html':'UTF-8'}" rel="nofollow" title="{l s='Add to cart'}" data-id-product="{$product.id_product|intval}" data-minimal_quantity="{if isset($product.product_attribute_minimal_quantity) && $product.product_attribute_minimal_quantity >= 1}{$product.product_attribute_minimal_quantity|intval}{else}{$product.minimal_quantity|intval}{/if}">
<i class="fa fa-shopping-cart"></i>
<span>{l s='Add to cart='leomanagewidgets'}</span>
</a>
{else}
<div class="button ajax_add_to_cart_button btn btn-outline disabled">
<i class="fa fa-shopping-cart"></i>
<span>{l s='Sold out' mod='leomanagewidgets'}</span>
</div>
{/if}
{/if}
<a itemprop="url" class="button lnk_view btn btn-outline" href="{$product.link|escape:'html':'UTF-8'}" title="{l s='Více' mod='leomanagewidgets'}">
<span>{l s='More' mod='leomanagewidgets'}</span>
</a>
</div>
Edited by MikroTik_ (see edit history)
Link to comment
Share on other sites

You can put string that can be translated using {l s='Dobry den'} or {l s='Yedna pivo prosim'} into any tpl file.. This way the row of text will be shown in back office in Localization -> Translation -> Front office -> Your theme -> Your language...

This one is in /themes/[your_theme]/product-list.tpl

Sorry for my little Czech that I remember

Link to comment
Share on other sites

I did it. I changed every 'Add to cart' for 'Koupit' - but with no success - it's still the same... Add to cart - on my website

 

'Dobry den' and 'Jedno pivo prosim' is base of Czech language, you remeber well.

 

I think, I need to change 'text' in some .tpl file, becase products are shown by widget - Leo Widget (product list) and when I change something in "Translation" it has no effect.

So I ask, if is and option to change button title somewhere int .tpl files. And if Presta has some "flush cache" option.

 

Thanks

 

 

//And probably I shouldn't change text in Localization -> Translation -> Front office -> Your theme -> Your language, right? :D

Edited by MikroTik_ (see edit history)
Link to comment
Share on other sites

  • 4 years later...

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...