Jump to content

how to send a variable from the indexcontroller to a file.tpl


Nicolas_Marshall

Recommended Posts

Hello everyone,
I have been trying to send a variable from the indexcontroller to a .tpl file. I am editing the product module presented on the home page to change the prices it shows, the problem is that this module loads the view products-list.tpl and this is where I should receive the variables, but I can not send the variable . Look at the module code, but I do not understand where you assign the variables.
In trying to understand the indexcontroller, I realize that the hooks are responsible for bringing the information from the view and that these are loaded in the index.tpl view, so if I'm not mistaken, the variable I need should be assigned before receive the down payment, but I have no idea where to assign it. Please, you can guide me with this thing that is already driving me crazy.
I'm starting to develop in Prestashop and the version I'm using is 1.6.1.1

Captura.PNG

Link to comment
Share on other sites

Can you try to explain what you are trying to accomplish with your module, you might receive better support...

I'm confused about what module you are talking about, and what variable you are trying to send to smarty, and what the indexcontroller has to do with it, why not look at the module code?

Link to comment
Share on other sites

On 31/12/2017 at 10:06 AM, bellini13 said:

¿Puede tratar de explicar lo que está tratando de lograr con su módulo, es posible que reciba un mejor soporte ...

Estoy confundido acerca de qué módulo está hablando, y qué variable está tratando de enviar a smarty, y qué tiene que ver el indexcontroller con él, ¿por qué no mira el código del módulo?

 

I am trying to add the maximum discount registered for each product, this I want to show it to the main view. The problem is that the discounts of each product are not sent to the main view only in view of the specific product.

 

Captura.PNG

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...