Jump to content

How to put customer custom fields in the index.tpl ?


missill

Recommended Posts

I think you will need to override Customer class so that you will be able to handle the new custom fields.

 

then use the customer object to load data and then display in your index.tpl via Smarty variable or $this->context->customer in IndexController.php

  • Like 1
Link to comment
Share on other sites

Hi shokinro and thanks to answer me !

 

I tried to do what you recommend me and it works fine !!!

 

I overrided Customer class and added a new function to get my new custom field value from the database.

 

In my index.tpl, i do this :

{assign var='myvariable' value=Context::getContext()->customer->getMyvariable()}

I could assign my variable directly from my class Customer in a smarty variable.

 

I don't know what the best solution but it works :)

 

Thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...