- Posts: 40
- Thank you received: 0
Different button text per category
- simonbornhoft
-
Topic Author
- Offline
Less
More
12 years 10 months ago #131992
by simonbornhoft
Different button text per category was created by simonbornhoft
Hi,
I need to change the text for the add to cart button depending on the category that is being displayed in a listing page.
The main issue that I'm having is when a product has options. I've been able to do something similar in the table layout by creating a language override within joomla, then checking the category id against an array of IDs for which to change the text, but can't work out how to do something similar in the DIV layout.
Thanks in advance
Keith
I need to change the text for the add to cart button depending on the category that is being displayed in a listing page.
The main issue that I'm having is when a product has options. I've been able to do something similar in the table layout by creating a language override within joomla, then checking the category id against an array of IDs for which to change the text, but can't work out how to do something similar in the DIV layout.
Thanks in advance
Keith
Please Log in or Create an account to join the conversation.
12 years 10 months ago #132059
by Xavier
Replied by Xavier on topic Different button text per category
Hi,
You will have to edit the view "product / quantity" and get the current category id, then depending on the category id you will have to change the translation key in the JText:
'xxxxxxxx') code.
It require some php skills.
You will have to edit the view "product / quantity" and get the current category id, then depending on the category id you will have to change the translation key in the JText:
It require some php skills.
Please Log in or Create an account to join the conversation.
- simonbornhoft
-
Topic Author
- Offline
Less
More
- Posts: 40
- Thank you received: 0
12 years 10 months ago #132062
by simonbornhoft
Replied by simonbornhoft on topic Different button text per category
Hi Xavier,
that's fine, exactly what I did for the table heading in the listing_table file, I just wasn't sure if that technique would work in the quantity file
What was confusing me was that the ADD_TO_CART text value seems to change depending on whether the product has options, but I couldn't see where within the quantity file.
Thanks
Keith
that's fine, exactly what I did for the table heading in the listing_table file, I just wasn't sure if that technique would work in the quantity file
What was confusing me was that the ADD_TO_CART text value seems to change depending on whether the product has options, but I couldn't see where within the quantity file.
Thanks
Keith
Please Log in or Create an account to join the conversation.
12 years 10 months ago #132119
by nicolas
Replied by nicolas on topic Different button text per category
It's the check at the beginning of the quantity file of the product view which display the "choose option" button instead of the "add to cart" when the product has characteristics/options/custom item fields to be filled on the product page.
The following user(s) said Thank You: simonbornhoft
Please Log in or Create an account to join the conversation.
- simonbornhoft
-
Topic Author
- Offline
Less
More
- Posts: 40
- Thank you received: 0
12 years 10 months ago #132125
by simonbornhoft
Replied by simonbornhoft on topic Different button text per category
Ah! Perfect! Many thanks
Please Log in or Create an account to join the conversation.
- simonbornhoft
-
Topic Author
- Offline
Less
More
- Posts: 40
- Thank you received: 0
12 years 10 months ago #132127
by simonbornhoft
Replied by simonbornhoft on topic Different button text per category
Just to say, that all worked perfectly, many thanks Xavier
Please Log in or Create an account to join the conversation.
Time to create page: 0.169 seconds