Post by jtsroberts » Wed Jan 13, 2010 8:46 am

I'm trying to add some custom text to the create account page at index.php?route=account/create

In the markup for catalog\view\theme\default\template\account\create.tpl, I add the line:

Code: Select all

<p><?php echo $text_poboxnotice; ?></p>
Then, in the language file at catalog\language\english\account\create.php, I add the line:

Code: Select all

$_['text_poboxnotice']    = 'Please note, we do not ship to PO Boxes.';
I then clear the system\cache folder except for index.html

I am receiving an error "Notice: Undefined variable: text_poboxnotice in C:\Inetpub\wwwroot\domainname\catalog\view\theme\default\template\account\create.tpl on line 46"

What else do I need to do to add some simple text to a page like this?

New member

Posts

Joined
Wed Nov 11, 2009 4:24 pm

Post by jtsroberts » Wed Jan 13, 2010 11:08 am

Figured it out. I need to add the line:

$this->data['text_poboxnotice'] = $this->language->get('text_poboxnotice');

in catalog\controller\account\create.php

New member

Posts

Joined
Wed Nov 11, 2009 4:24 pm

Post by jontorbs » Wed Mar 24, 2010 11:00 pm

Bizarrely I had a similar problem with vouchers not calling the text for buttons at the bottom of the cart page. I had to get round by implementing this fix for cart.php in controller... strange that a fresh install of 1.4.4 would have this problem?

New member

Posts

Joined
Mon Feb 15, 2010 10:51 pm

Post by Qphoria » Wed Mar 24, 2010 11:35 pm

If you are only supporting one langauge, you can just type it out with html on the tpl file for that page

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by jontorbs » Thu Mar 25, 2010 12:45 am

I found the cause of the problem, it would appear that the calls to define the variables were missing.. however it doesn't explain random parts of my code going missing!

New member

Posts

Joined
Mon Feb 15, 2010 10:51 pm
Who is online

Users browsing this forum: No registered users and 106 guests