Menu Content

Podpora

> Diskusní fóra, FAQs & placená podpora
Welcome, Guest
Username Password: Remember me

Payment Name Language Constant not translating
(1 viewing) (1) Guest
Support forum for users using free edition of Book it!. These forums are for mutual help among users.

NOTE: Due to our capacity limitations, ARTIO does not monitor this forum category regularly. If you want direct support from ARTIO, please start a ticket at Support Dashboard. If you have no support ticket available, you need to purchase it. .
  • Page:
  • 1
  • 2

TOPIC: Payment Name Language Constant not translating

Payment Name Language Constant not translating 10 years ago #45688

Hello!

I'm having a problem at the "Add Reservation" page.

The Payment Methods radio button is showing this text "plg_bookingpayment_paypal_name" which should
correspond to a language file. It looks something like this:

Payment Methods: (•) plg_bookingpayment_paypal_name

I think there is a bug in this file:

webroot/components/com_booking/views/reservation/tmpl/form_customer.php

Specifically, the code is doing this:

<snip>
title="<?php echo $this->escape($payment->title);
</snip>

When it should probably do something like this:

<possibleSolution>
title="<?php echo $this->escape(JText::_($payment->title));
</possibleSolution>

Am I missing something or is the code just not calling a function that it needs to call to get access to a language file or a language override file?

I saw several other posts that may have concerned this same problem but I don't think there was a solution.

Any help/advice would be great!

Thanks!
The topic has been locked.

Re: Payment Name Language Constant not translating 9 years, 10 months ago #45898

Is there no response to this.
I've raised a ticket, but seems that my "support" issues might be bugs.

I will be requesting a refund from PayPal should I not see responses to these issues shortly
The topic has been locked.

Re: Payment Name Language Constant not translating 9 years, 10 months ago #45903

  • jitr
  • OFFLINE
  • ARTIO Support
  • Posts: 1432
Hello, you are probably missing language constant in your custom localisation. What langauge do you use?

Place into frontend language file constant:

PLG_BOOKINGPAYMENT_PAYPAL_NAME="Paypal"
ARTIO Support Team
The topic has been locked.

Re: Payment Name Language Constant not translating 9 years, 10 months ago #45906

the language constant doesn't work as the code is currently written; we had to edit the code.
The topic has been locked.

Re: Payment Name Language Constant not translating 9 years, 10 months ago #45907

Yes I know this... Like the other person I've already tried this.

Did you even try this "fix" yourself before posting?

Would you mind sharing your solution ikbhokie?
The topic has been locked.

Re: Payment Name Language Constant not translating 9 years, 10 months ago #45911

"Hello, you are probably missing language constant in your custom localisation. What langauge do you use?

Place into frontend language file constant:

PLG_BOOKINGPAYMENT_PAYPAL_NAME="Paypal"

The above solution doesn't address the problem that the actual Artio Code is missing the function calls to actually access the language files. The Artio code is essentially broken in its off-the-shelf format. You will need to re-apply this fix every time Artio updates their code unless this issue is addressed: Artio updates will re-break the code (we have had it happen).
Here's what's going on:

0. Problem Description
1. File Path
2. Description of Changes
3. Modifications to Language Overrides

------------------------------------------------------------------------------------

0. Problem Description

When paying for a reservation, at the "Add Reservation" step a user encounters the following string:

PLG_BOOKINGPAYMENT_PAYPAL_NAME

This problem is due to code in the file listed below not calling functions to access Joomla language files to output values to the page when it is displayed and interpreted by a browser.

1. File Path

/components/com_booking/views/reservation/tmpl/form_customer.php


2. Description of Changes

Two (2) lines of code need modificiation: 537, 539:

Line 537 original:

<div class="hasTip payment" title="<?php echo $this->escape($payment->title); echo (($info = JString::trim($payment->params->get('info'))) ? ('::' . $this->escape($info)) : ''); ?>">

Line 537 new:

<div class="hasTip payment" title="<?php echo $this->escape(JText::_($payment->title)); echo (($info = JString::trim($payment->params->get('info'))) ? ('::' . $this->escape($info)) : ''); ?>">

Line 539 original:

<label for="payment_method_id_<?php echo $payment->alias; ?>"><?php echo $payment->title; ?></label>

Line 539 new:

<label for="payment_method_id_<?php echo $payment->alias; ?>"><?php echo JText::_($payment->title); ?></label>

3. Modifications to Language Overrides

Created override for constant "PLG_BOOKINGPAYMENT_PAYPAL_NAME"

The value of this constant will appear on the page. The current value is:

Pay for this reservation using PayPal <img src="images/logo_paypal_small.gif" />

The value of the text along with the image is displayed on the page.
Note: I uploaded the PayPal gif for this test.
The topic has been locked.
  • Page:
  • 1
  • 2
Přihlášení uživatele Prázdný