AbanteCart Community

Shopping Cart Operations => Support => General Support => Topic started by: Sam_78 on December 05, 2022, 11:37:07 PM

Title: Language not displaying
Post by: Sam_78 on December 05, 2022, 11:37:07 PM
Hi I am trying to add a radio button on \storefront\controller\pages\account\subscriber.php Line #138

Code: [Select]
$this->data['form']['newsletter_type'] = $form->getFieldHtml(array(
            'type'    => 'radio',
            'name'    => $this->language->get('text_newsletter_type'); // tried  'label'    => $this->language->get('text_newsletter_type'); // 'name'    => 'Newsletter Type:', // nothing displays label
            'value'   => '1',
            'options' => array(
                '1' => 'Digital',
                '0' => 'Print',
            ),
        ));

added this to storefront\language\english\account\newsletter.xml

   <definition>
      <key>text_newsletter_type</key>
      <value><![CDATA[Newsletter Type:]]></value>
   </definition>

on the form I am not able to get label to display, options are displaying. I don't mind hardcoding this word in subscriber.php but I need a label for those radio button.  I did clear browser cache and system cache
Can someone point my mistake? or help me how to fix it
Title: Re: Language not displaying
Post by: maxter on December 06, 2022, 07:44:56 AM
If language was already loaded in the database before, new text key might not be picked up.
Try to do the following:

1. Delete all text entries for english/account/newsletter in the admin language definition section (or database)
2. clear language cache.

This should resolve the issue.
Title: Re: Language not displaying
Post by: Sam_78 on December 15, 2022, 04:44:56 PM
I tried doing that but still no luck.  Even hardcoding is not working. Strange thing is just the name part is not working rest everything is fine

'name'    => 'Select Type'

is also not working