News:

AbanteCart v1.4.2 is released.

Main Menu

Language not displaying

Started by Sam_78, December 05, 2022, 11:37:07 PM

Previous topic - Next topic

Sam_78

Hi I am trying to add a radio button on \storefront\controller\pages\account\subscriber.php Line #138

$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

maxter

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.

Sam_78

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

Forum Rules Code of conduct
AbanteCart.com 2010 -