Page 1 of 1
adding language key
Posted: Tue Sep 03, 2019 2:59 am
by Fabienlolo
OC: 3.0.2
Theme: Journal 2
URL:
www.vacacionandocancun.com/tours/
Hi everyone.
On a product page you may have 2 "add to cart" button. The one for the actual product, and some more for your related products at the product page bottom, before footer. I wish to make related products button text to "See Details" instead of "add to cart".
I then modified the following:
1. in the product language file , i added a key $_['button_seedetails'];
2. on admin panel theme editor, i modified the product/product file, line 328 that is included in the related product <div>, i changed {{ button_cart }} to {{ button_seedetails }}, and saved.
3. Refreshed cache theme, browser.
But i haven't been succesful.
Anything else i need to change? Or what would be the correct way to add a language key?
Thank you all for yout time and help,
lolo.
Re: adding language key
Posted: Tue Sep 03, 2019 3:19 am
by xxvirusxx
Post
here and you problem is solved (after payment)
Re: adding language key
Posted: Wed Sep 04, 2019 11:51 pm
by Fabienlolo
Hi, thank you for your suggestion so i could learn about the commercial forum. I guess it is more specialized than freelancer.com and alikes, but i hope i can find support from this community.
Anyway, always good to know about this option.
Re: adding language key
Posted: Sat Sep 14, 2019 12:29 am
by Fabienlolo
Hi everyone,
so i kept the new key in the different product language file, but this time i modified theme product/product file from default theme AND from journal 2 theme that i am using currently.
Still no improvement, I can not use the new language key $_['button_seedetails'].
Any suggestion?
Thanks for your help.
Re: adding language key
Posted: Sat Sep 14, 2019 12:42 am
by cyclops12
well it wont work if you havent edited the controller file accordingly
Re: adding language key
Posted: Sat Sep 14, 2019 12:54 am
by xxvirusxx
You have added on you language?
catalog/language/xx-xx/xx-xx.php
Code: Select all
$_['button_seedetails'] = 'Something';
Re: adding language key
Posted: Sat Sep 14, 2019 1:26 am
by Fabienlolo
by cyclops12 » Fri Sep 13, 2019 4:42 pm
well it wont work if you havent edited the controller file accordingly
That could be the point, in the MVC-L system, I modified the product/product L (language) and V (view=theme) files but i did not find any clue on what to do with the C (Controller) file.
Any suggestion?
Thanks for your help
Re: adding language key
Posted: Sat Sep 14, 2019 1:41 am
by Fabienlolo
by xxvirusxx » Fri Sep 13, 2019 4:54 pm
You have added on you language?
catalog/language/xx-xx/xx-xx.php
I added the language key in the different language file as i mentioned in my first post, the catalog/language/xx-xx/product/product.php.
I just now modified the general language file you mention, catalog/language/xx-xx/xx-xx.php, but result is the same, new key not used.
I clear all OC cache, browser cache, no improvement.
Update on 17/ OCT/2020: it actually worked. After a coupe of days i did what i mentionned above. I was out of guess. And then, it appeared. When i installed OC, cart has been malfunctionning for a couple of days too. i guess there is something in webhosting that takes time to adjust, and clear cache is not enough. Cheers.
Re: adding language key
Posted: Sat Sep 14, 2019 1:58 am
by xxvirusxx
Just added in language file and show just fine on Default theme
Re: adding language key
Posted: Sat Sep 14, 2019 2:30 am
by Fabienlolo
Thanks a lot for your help, but this is a second button. So you are saying this should work for any button? The one i want to modify is the "Related Items" button. At the bottom of each product page when you link "related products", that is why i modified the key in the product page theme in the "related products" <div>.
Thank you for your confirmation
Re: adding language key
Posted: Sat Sep 14, 2019 3:03 pm
by xxvirusxx
You mean Add to cart from Related products when you are on a Product age?
Re: adding language key
Posted: Sat Sep 14, 2019 10:14 pm
by Fabienlolo
Correct, that is the one. i wanto it to say «see details» when the product button to add to cart still mentions «add to cart».