Site structure
Version 6.x > Site structure > Question for translations View modes: 
User avatar
Member
Member
lurquin_b-hotmail - 3/5/2012 4:46:58 AM
   
Question for translations
Hi guys,

I have one more question for you. I would like to know how I can use String key instead of simple text in the Content before Html Envelope of a WebPart.

I tryied with {$ key $} syntax but it does'nt work...

Thanks for the help !

User avatar
Kentico Support
Kentico Support
kentico_janh - 3/5/2012 5:46:40 AM
   
RE:Question for translations
Hello,

If you don't have a resource key, you need to put there the equal sign, which has to be placed at the beginning of a macro content as it is show below:

{$=Hello$}


and for more translations than one:

{$=Hello|cs-CZ=Ahoj$}


Best regards,
Jan Hermann

User avatar
Member
Member
lurquin_b-hotmail - 3/5/2012 6:05:54 AM
   
RE:Question for translations
Thanks Jan !

I have an other problem, this one might be more difficult to solve...

I want to display a message a user adds an item in the shopping cart. How can I manage that ?

My first idea was to change the javascript on the AddToCartButton but i can't find where it's populated...

Thanks !

Ps : Tell me if I got to create a new Thread.

User avatar
Kentico Support
Kentico Support
kentico_janh - 3/5/2012 7:14:17 AM
   
RE:Question for translations
Hello,

It really depends on the way, how you add that button to a product? Do you have it in a transformation or do you use a web part/control for it? (How do you you display a product detail?)

Best regards,
Jan Hermann

User avatar
Member
Member
lurquin_b-hotmail - 3/5/2012 7:34:38 AM
   
RE:Question for translations
Hi,

Here is how i display my options :

  <table width="100%" cellspacing="0" cellpadding="0" class="productOptionsTable">
<tr>
<td>
<div class="productOptions">
<uc1:CartItemSelector id="cartItemSelector" runat="server" SKUID='<%# ValidationHelper.GetInteger(Eval("SKUID"), 0) %>
' SKUEnabled='
<%# ValidationHelper.GetBoolean(Eval("SKUEnabled"), false) %> ' AddToCartImageButton="button_add10.gif" ShowProductOptions="true" ShowDonationProperties="false" ShowUnitsTextBox="true" AddToWishlistImageButton="false" ShowPriceIncludingTax="false" ShowTotalPrice="false" />
</div>
</td>
</tr>
</table>


I use a transformation with that code for my products.

Thanks,

Benj

User avatar
Kentico Support
Kentico Support
kentico_janh - 3/5/2012 8:36:57 AM
   
RE:Question for translations
Hello,

If you look at the top of your transformation, you can see there a path to a file (~/CMSModules/Ecommerce/Controls/ProductOptions/ShoppingCartItemSelector.ascx), which contains logic for that Add to shopping cart button, so this is the right place to add your custom code (pls backup this file first).

Best regards,
Jan Hermann

User avatar
Member
Member
lurquin_b-hotmail - 3/5/2012 12:32:12 PM
   
RE:Question for translations
Ok, i tried with :

OnClientClick="var message = document.getElementById('msgAddCart');message.style.display = 'block';


On the button, it do work but then, the page is reloaded and my message is not displayed anymore. It's just shown the time for the page to load...

What can I do to that issue ?

Thanks,

Benj

User avatar
Kentico Support
Kentico Support
kentico_janh - 3/6/2012 1:31:48 AM
   
RE:Question for translations
Hello,

I would solve it through the code-behind instead. You can check there, if there was a postback and then display the message. (or you can comment out that redirection/reload, if it doesn't affect the functionality)

Best regards,
Jan Hermann