Changing submit button text


https://forum.kartris.com/Topic651.aspx
Print Topic | Close Window

By thedrumdoctor - Mon 20 Jun 2011
I'm looking to change the 'Add' to basket input button text on the products extended view.

I've looked in the language strings and found the value 'Add' in the FormButton_Add language string for the front end, but when I change it to 'Add to basket' it doesn't change at the front end.

Is the text for the submit button hard coded into one of the aspx pages?
By Mohammad - Mon 20 Jun 2011
Hi,

I found that the language string for the "Add" button is using the back-end one instead of the front-end for non-options products.

To fix this, please go to "[kartris folder]\UserControls\General\AddToBasket.ascx" Line# 17, replace the word "_Kartris" by "Products" save your changes and that should do the fix, so the whole line should be:
<asp:Button ID="btnAdd" runat="server" Text='<%$ Resources: Products, FormButton_Add %>' CssClass="button" />

Will apply this fix into the next release.

Thank you,
By thedrumdoctor - Tue 21 Jun 2011
Yes, that works now, thanks. It still shows as a back-end string but it has the desired effect.

Is there a way of adding a text label to precede the quantity <select> <option> drop-down list? I'd like it to display:

Quantity [1] Add To Basket

So, I'm just looking to add the text 'Quantity' to the .addtobasket div.
By Mohammad - Tue 21 Jun 2011
In the same control add the below code right before "ddlItemsQuantity" drop down list:
<asp:Literal ID="litQuantityText" runat="server" Text='<%$ Resources: Kartris, ContentText_Quantity %>' /> 
By thedrumdoctor - Wed 22 Jun 2011
Many thanks Mohammad, you are a very clever, helpful chap!

I will be sure to mention your support to my boss when he moans about shelling money for the full licence!

In all seriousness though, from the viewpoint of someone who only deals with HTML and CSS code, it's a real eye opener to see where things are generated on the ASP side and is actually really helpful.