Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/12/2011, 11:37
yason
 
Fecha de Ingreso: febrero-2011
Ubicación: San Jose
Mensajes: 14
Antigüedad: 13 años, 2 meses
Puntos: 0
smarty no muestra valores del php

estoy tratando meterme de lleno con smarty y php, aunque php sea un poco confuso, estoy haciendo un modulo prestashop

Código PHP:
public function hookPayment($params)
    {
        if(!
$this->active)
            return ;       
        
        global 
$smarty$cookie$cart;        
        
        
$smarty->assign(array(
        
'cart' => $cart,
        
'logged' => $cookie->isLogged(),
        
'hash' =>  codificarHash($cart->id$cart->getTotalCart(true,3),
                                       
time(), $cart->id),
        
'customerName' => ($cookie->logged 
                           
$cookie->customer_firstname.' '.$cookie->customer_lastname 
                           
false)
        ) );        
        
        return 
$this->display(__FILE__,'/pago.tpl');
    }
//hookPayment 
el pago.tpl es:

Código HTML:
<div style="background: #ffffff ;  width: 150px; height: 90;">
          <a href="{$base_dir}modules/pago/pago_page.php" 
             title="Click this link"><img src="{$base_dir}/modules/pago/img/pago.png" style="width: 200px; height: 100px;" /> </a>
          </div> 
pago_page.php es:

Código PHP:
<?php

    
global $smarty;

    include(
'../../config/config.inc.php' );
    include(
'../../header.php');
    
    
$smarty->display(dirname(__FILE__).'/pago_page.tpl');
    
    include(
'../../footer.php');
    
?>
y pago_page.tpl es:
Código HTML:
<div id="formConfirmar">
    <form name="autorizationForm" method="post" class="std"          
         action="pago?accion=confirmar"> 
        <table >
            <tr>            
                <td style="float: right;">
                    Username:
                </td>                    
                <td>
                    <input type="text"  name="username" 
                           value="{$customerName}" id="username" />
                </td>
            </tr>
            <tr>
                <td style="float: right;">
                    key_id:
                </td>
                <td>
                    <input type="text"  name="key_id" 
                           value="{$cart->secure_key}" id="key_id" />
                </td>
            </tr>
            <tr>
                <td style="float: right;">
                    hash:
                </td>
                <td>
                    <input type="text"  name="hash" 
                           value="{$hash}" id="hash" />
                </td> 
todas las variables asignadas a la global $smarty se muestran en el .tpl menos la hash, ya comprobe el metodo codificarHash y funciona correctamente.
¿Alguien sabe que estoy haciendo mal? ayudenme porfa