¿Existe una forma de usar una variable smarty del controlador en algún otro sitio del archivo de plantillas?
¡
Usar variable smarty en plantillas de Prestashop
Iniciado por
Nicolas
, may 21 2014 18:19
#1 AUTOR PREGUNTA
Preguntas Similares
Esto también te interesa!
#2
Publicado 21 mayo 2014 - 21:34
Prueba con lo siguiente:
<?php
class MyAccountController extends MyAccountControllerCore
{
public function initContent()
{
parent::initContent();
$total_orders = 0;
if ($orders = *****::getCustomerOrders($this->context->customer->id))
$total_orders = count($orders);
$this->context->smarty->assign('total_orders', $total_orders);
}
}