- Posts: 15
- Thank you received: 1
PayPal Return Url for different languages
6 years 1 month ago #322907
by franchina
PayPal Return Url for different languages was created by franchina
-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.20
Hello,
Is it possible in the "HikaShop Paypal payment plugin" to customize the page to be inserted in the "Return URL" for each language?
THX
-- Joomla version -- : 3.9.20
Hello,
Is it possible in the "HikaShop Paypal payment plugin" to customize the page to be inserted in the "Return URL" for each language?
THX
Please Log in or Create an account to join the conversation.
6 years 1 month ago #322930
by nicolas
Replied by nicolas on topic PayPal Return Url for different languages
Hi,
No, but that's a good idea.
Add the code:
before the line:
in the file administrator/components/com_hikashop/classes/cart.php
We'll add that change on our end too for the next version of HikaShop, that way, you won't have to do anything when you update.
Then, instead of entering a URL in that "return URL" parameter, you can enter a translation key (for example MY_RETURN_URL).
And then, in the Languages tab of the HikaShop configuration, for each language, you can add such translation override:
MY_RETURN_URL="xxx"
where xxx is the URL you want for the language.
No, but that's a good idea.
Add the code:
Code:
$paymentOptions->payment_params->return_url = hikashop_translate($paymentOptions->payment_params->return_url);
Code:
foreach(get_object_vars($order) as $key => $val) {
We'll add that change on our end too for the next version of HikaShop, that way, you won't have to do anything when you update.
Then, instead of entering a URL in that "return URL" parameter, you can enter a translation key (for example MY_RETURN_URL).
And then, in the Languages tab of the HikaShop configuration, for each language, you can add such translation override:
MY_RETURN_URL="xxx"
where xxx is the URL you want for the language.
The following user(s) said Thank You: franchina
Please Log in or Create an account to join the conversation.
Time to create page: 0.182 seconds