Jump to content

[Solucionado] - Añadir la palabra Producto al modulo blockuserinfo.tpl


3plus

Recommended Posts

En la parte superior de la pantalla cuando agrego un producto al carrito me muestra esto:

 

Mi carrito: 1 9,00 € VER FINALIZAR PEDIDO

 

 

 

Y me gustaría que pusiese:

 

MI CARRITO :1Producto 9,00 € VER FINALIZAR PEDIDO

 

 

 

blockuserinfo.tpl

<ul class="shopping_cart">
<h4>{l s='Cart' mod='blockuserinfo'} : </a></h4>
<li>
<span class="ajax_cart_no_product {if $cart_qties > 0}hidden{/if}">{l s='empty' mod='blockuserinfo'}</span>
  <span class="ajax_cart_quantity">{if $cart_qties > 0}{$cart_qties}{/if}</span>
  <span class="ajax_cart_product{if $cart_qties != 1} hidden{/if}">
	{l s='product' mod='blockuserinfo'}
	<span class="ajax_cart_total">{if $cart_qties > 0}{convertPrice price=$cart->getOrderTotal(true)}{/if}</span>
	<a href="{$base_dir_ssl}order.php" title="{l s='view' mod='blockuserinfo'}">{l s='View' mod='blockuserinfo'}</a>
	<a href="{$base_dir_ssl}order.php?step=1" id="button_order_cart" title="{l s='check out' mod='blockuserinfo'}">{l s='check out' mod='blockuserinfo'}</a>
 </span>
 <span class="ajax_cart_product {if $cart_qties < 2} hidden{/if}">
	{l s='products' mod='blockuserinfo'}
	<span class="ajax_cart_total">{if $cart_qties > 0}{convertPrice price=$cart->getOrderTotal(true)}{/if}</span>
	<a href="{$base_dir_ssl}order.php" title="{l s='View' mod='blockuserinfo'}">{l s='view' mod='blockuserinfo'}</a>
	<a href="{$base_dir_ssl}order.php?step=1" id="button_order_cart" title="{l s='check out' mod='blockuserinfo'}">{l s='check out' mod='blockuserinfo'}</a>

 

 

Gracias de antemano

Edited by nadie (see edit history)
Link to comment
Share on other sites

Tienes que agregar debajo de :

<span class="ajax_cart_quantity">{if $cart_qties > 0}{$cart_qties}{/if}</span> 

<span class="ajax_cart_product_txt{if $cart_qties != 1} hidden{/if}">{l s='product' mod='blockuserinfo'}</span>
  <span class="ajax_cart_product_txt_s{if $cart_qties < 2} hidden{/if}">{l s='products' mod='blockuserinfo'}</span>

Link to comment
Share on other sites

Sigue sin salir, aqui te dejo como a quedado:

 

 </li>
</ul>
<ul class="shopping_cart">
<h4>{l s='Cart' mod='blockuserinfo'} : </a></h4>
<li>
<span class="ajax_cart_no_product {if $cart_qties > 0}hidden{/if}">{l s='empty' mod='blockuserinfo'}</span>
  <span class="ajax_cart_quantity">{if $cart_qties > 0}{$cart_qties}{/if}</span>
<span class="ajax_cart_product_txt{if $cart_qties != 1} hidden{/if}">{l s='product' mod='blockuserinfo'}</span>
  <span class="ajax_cart_product_txt_s{if $cart_qties < 2} hidden{/if}">{l s='products' mod='blockuserinfo'}</span>
  <span class="ajax_cart_product{if $cart_qties != 1} hidden{/if}">
	{l s='product' mod='blockuserinfo'}
	<span class="ajax_cart_total">{if $cart_qties > 0}{convertPrice price=$cart->getOrderTotal(true)}{/if}</span>
	<a href="{$base_dir_ssl}order.php" title="{l s='view' mod='blockuserinfo'}">{l s='View' mod='blockuserinfo'}</a>
	<a href="{$base_dir_ssl}order.php?step=1" id="button_order_cart" title="{l s='check out' mod='blockuserinfo'}">{l s='check out' mod='blockuserinfo'}</a>
 </span>
 <span class="ajax_cart_product {if $cart_qties < 2} hidden{/if}">
	{l s='products' mod='blockuserinfo'}
	<span class="ajax_cart_total">{if $cart_qties > 0}{convertPrice price=$cart->getOrderTotal(true)}{/if}</span>
	<a href="{$base_dir_ssl}order.php" title="{l s='View' mod='blockuserinfo'}">{l s='view' mod='blockuserinfo'}</a>
	<a href="{$base_dir_ssl}order.php?step=1" id="button_order_cart" title="{l s='check out' mod='blockuserinfo'}">{l s='check out' mod='blockuserinfo'}</a>
 </span>			

Edited by 3plus (see edit history)
Link to comment
Share on other sites

Sigue sin salir, aqui te dejo como a quedado:

 

 </li>
</ul>
<ul class="shopping_cart">
<h4>{l s='Cart' mod='blockuserinfo'} : </a></h4>
<li>
<span class="ajax_cart_no_product {if $cart_qties > 0}hidden{/if}">{l s='empty' mod='blockuserinfo'}</span>
  <span class="ajax_cart_quantity">{if $cart_qties > 0}{$cart_qties}{/if}</span>
<span class="ajax_cart_product_txt{if $cart_qties != 1} hidden{/if}">{l s='product' mod='blockuserinfo'}</span>
  <span class="ajax_cart_product_txt_s{if $cart_qties < 2} hidden{/if}">{l s='products' mod='blockuserinfo'}</span>
  <span class="ajax_cart_product{if $cart_qties != 1} hidden{/if}">
	{l s='product' mod='blockuserinfo'}
	<span class="ajax_cart_total">{if $cart_qties > 0}{convertPrice price=$cart->getOrderTotal(true)}{/if}</span>
	<a href="{$base_dir_ssl}order.php" title="{l s='view' mod='blockuserinfo'}">{l s='View' mod='blockuserinfo'}</a>
	<a href="{$base_dir_ssl}order.php?step=1" id="button_order_cart" title="{l s='check out' mod='blockuserinfo'}">{l s='check out' mod='blockuserinfo'}</a>
 </span>
 <span class="ajax_cart_product {if $cart_qties < 2} hidden{/if}">
	{l s='products' mod='blockuserinfo'}
	<span class="ajax_cart_total">{if $cart_qties > 0}{convertPrice price=$cart->getOrderTotal(true)}{/if}</span>
	<a href="{$base_dir_ssl}order.php" title="{l s='View' mod='blockuserinfo'}">{l s='view' mod='blockuserinfo'}</a>
	<a href="{$base_dir_ssl}order.php?step=1" id="button_order_cart" title="{l s='check out' mod='blockuserinfo'}">{l s='check out' mod='blockuserinfo'}</a>
 </span>			

 

¿Has forzado compilación?

Link to comment
Share on other sites

He modificado ese tambien y sigue igual, no se que es lo que hago mal.

 

 

/themes/matrice/modules/blockuserinfo/blockuserinfo.tpl

<ul class="shopping_cart">
<h4>{l s='Cart' mod='blockuserinfo'} : </a></h4>
<li>
<span class="ajax_cart_no_product {if $cart_qties > 0}hidden{/if}">{l s='empty' mod='blockuserinfo'}</span>
  <span class="ajax_cart_quantity">{if $cart_qties > 0}{$cart_qties}{/if}</span>
<span class="ajax_cart_product_txt{if $cart_qties != 1} hidden{/if}">{l s='product' mod='blockuserinfo'}</span>
  <span class="ajax_cart_product_txt_s{if $cart_qties < 2} hidden{/if}">{l s='products' mod='blockuserinfo'}</span>
  <span class="ajax_cart_product{if $cart_qties != 1} hidden{/if}">
	{l s='product' mod='blockuserinfo'}
	<span class="ajax_cart_total">{if $cart_qties > 0}{convertPrice price=$cart->getOrderTotal(true)}{/if}</span>
	<a href="{$base_dir_ssl}order.php" title="{l s='view' mod='blockuserinfo'}">{l s='View' mod='blockuserinfo'}</a>
	<a href="{$base_dir_ssl}order.php?step=1" id="button_order_cart" title="{l s='check out' mod='blockuserinfo'}">{l s='check out' mod='blockuserinfo'}</a>
 </span>
 <span class="ajax_cart_product {if $cart_qties < 2} hidden{/if}">
	{l s='products' mod='blockuserinfo'}
	<span class="ajax_cart_total">{if $cart_qties > 0}{convertPrice price=$cart->getOrderTotal(true)}{/if}</span>
	<a href="{$base_dir_ssl}order.php" title="{l s='View' mod='blockuserinfo'}">{l s='view' mod='blockuserinfo'}</a>
	<a href="{$base_dir_ssl}order.php?step=1" id="button_order_cart" title="{l s='check out' mod='blockuserinfo'}">{l s='check out' mod='blockuserinfo'}</a>
 </span>			
</li>
 </ul>
</div>

Edited by 3plus (see edit history)
Link to comment
Share on other sites

He modificado ese tambien y sigue igual, no se que es lo que hago mal.

 

 

/themes/matrice/modules/blockuserinfo/blockuserinfo.tpl

<ul class="shopping_cart">
<h4>{l s='Cart' mod='blockuserinfo'} : </a></h4>
<li>
<span class="ajax_cart_no_product {if $cart_qties > 0}hidden{/if}">{l s='empty' mod='blockuserinfo'}</span>
  <span class="ajax_cart_quantity">{if $cart_qties > 0}{$cart_qties}{/if}</span>
<span class="ajax_cart_product_txt{if $cart_qties != 1} hidden{/if}">{l s='product' mod='blockuserinfo'}</span>
  <span class="ajax_cart_product_txt_s{if $cart_qties < 2} hidden{/if}">{l s='products' mod='blockuserinfo'}</span>
  <span class="ajax_cart_product{if $cart_qties != 1} hidden{/if}">
	{l s='product' mod='blockuserinfo'}
	<span class="ajax_cart_total">{if $cart_qties > 0}{convertPrice price=$cart->getOrderTotal(true)}{/if}</span>
	<a href="{$base_dir_ssl}order.php" title="{l s='view' mod='blockuserinfo'}">{l s='View' mod='blockuserinfo'}</a>
	<a href="{$base_dir_ssl}order.php?step=1" id="button_order_cart" title="{l s='check out' mod='blockuserinfo'}">{l s='check out' mod='blockuserinfo'}</a>
 </span>
 <span class="ajax_cart_product {if $cart_qties < 2} hidden{/if}">
	{l s='products' mod='blockuserinfo'}
	<span class="ajax_cart_total">{if $cart_qties > 0}{convertPrice price=$cart->getOrderTotal(true)}{/if}</span>
	<a href="{$base_dir_ssl}order.php" title="{l s='View' mod='blockuserinfo'}">{l s='view' mod='blockuserinfo'}</a>
	<a href="{$base_dir_ssl}order.php?step=1" id="button_order_cart" title="{l s='check out' mod='blockuserinfo'}">{l s='check out' mod='blockuserinfo'}</a>
 </span>			
</li>
 </ul>
</div>

 

Hola, ahora si se ve algun cambio,sale:

 

MI CARRITO : 3 PRODUCTOS PRODUCTOS 28,50 € VER FINALIZAR PEDIDO

Link to comment
Share on other sites

Vale ya se el problema, me lo dice cuando llevo 2 productos, si solo elijo uno no me sale la palabra ''productos''

 

Dejalo asi:

 

<ul class="shopping_cart">
<h4>{l s='Cart' mod='blockuserinfo'} : </a></h4>
    <li>
<span class="ajax_cart_no_product {if $cart_qties > 0}hidden{/if}">{l s='empty' mod='blockuserinfo'}</span>
	  <span class="ajax_cart_quantity">{if $cart_qties > 0}{$cart_qties}{/if}</span>
<span class="ajax_cart_product_txt{if $cart_qties != 1} hidden{/if}">{l s='product' mod='blockuserinfo'}</span>
  <span class="ajax_cart_product_txt_s{if $cart_qties < 2} hidden{/if}">{l s='products' mod='blockuserinfo'}</span>
	  <span class="ajax_cart_product{if $cart_qties != 1} hidden{/if}">
		    {l s='product' mod='blockuserinfo'}
		    <span class="ajax_cart_total">{if $cart_qties > 0}{convertPrice price=$cart->getOrderTotal(true)}{/if}</span>
		    <a href="{$base_dir_ssl}order.php" title="{l s='view' mod='blockuserinfo'}">{l s='View' mod='blockuserinfo'}</a>
		    <a href="{$base_dir_ssl}order.php?step=1" id="button_order_cart" title="{l s='check out' mod='blockuserinfo'}">{l s='check out' mod='blockuserinfo'}</a>
	 </span>
	 <span class="ajax_cart_product {if $cart_qties < 2} hidden{/if}">
		    {l s='products' mod='blockuserinfo'}
		    <span class="ajax_cart_total">{if $cart_qties > 0}{convertPrice price=$cart->getOrderTotal(true)}{/if}</span>
		    <a href="{$base_dir_ssl}order.php" title="{l s='View' mod='blockuserinfo'}">{l s='view' mod='blockuserinfo'}</a>
		    <a href="{$base_dir_ssl}order.php?step=1" id="button_order_cart" title="{l s='check out' mod='blockuserinfo'}">{l s='check out' mod='blockuserinfo'}</a>
	 </span>					   
    </li>
 </ul>
</div>

 

Deja ese fichero, asi:

 

{*
* 2007-2012 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2012 PrestaShop SA
*  @version  Release: $Revision: 14011 $
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
<!-- Block user information module HEADER -->
<div id="header_user">
<p id="header_user_info">
 {l s='Welcome' mod='blockuserinfo'},
 {if $cookie->isLogged()}
  <span>{$cookie->customer_firstname} {$cookie->customer_lastname}</span>
  (<a href="{$link->getPageLink('index.php')}?mylogout" title="{l s='Log me out' mod='blockuserinfo'}">{l s='Log out' mod='blockuserinfo'}</a>)
 {else}
  <a href="{$link->getPageLink('my-account.php', true)}">{l s='Log in' mod='blockuserinfo'}</a>
 {/if}
</p>
<ul id="header_nav">
 {if !$PS_CATALOG_MODE}
 <li id="shopping_cart">
  <a href="{$link->getPageLink("$order_process.php", true)}" title="{l s='Your Shopping Cart' mod='blockuserinfo'}">{l s='Cart:' mod='blockuserinfo'}</a>
  <span class="ajax_cart_quantity{if $cart_qties == 0} hidden{/if}">{$cart_qties}</span>
  <span class="ajax_cart_product_txt{if $cart_qties != 1} hidden{/if}">{l s='product' mod='blockuserinfo'}</span>
  <span class="ajax_cart_product_txt_s{if $cart_qties < 2} hidden{/if}">{l s='products' mod='blockuserinfo'}</span>
  {if $cart_qties >= 0}
   <span class="ajax_cart_total{if $cart_qties == 0} hidden{/if}">
 {if $priceDisplay == 1}
  {assign var='blockuser_cart_flag' value='Cart::BOTH_WITHOUT_SHIPPING'|constant}
  {convertPrice price=$cart->getOrderTotal(false, $blockuser_cart_flag)}
 {else}
  {assign var='blockuser_cart_flag' value='Cart::BOTH_WITHOUT_SHIPPING'|constant}
  {convertPrice price=$cart->getOrderTotal(true, $blockuser_cart_flag)}
 {/if}
   </span>
  {/if}
  <span class="ajax_cart_no_product{if $cart_qties > 0} hidden{/if}">{l s='(empty)' mod='blockuserinfo'}</span>
 </li>
 {/if}
 <li id="your_account"><a href="{$link->getPageLink('my-account.php', true)}" title="{l s='Your Account' mod='blockuserinfo'}">{l s='Your Account' mod='blockuserinfo'}</a></li>
</ul>
</div>
<!-- /Block user information module HEADER -->

Link to comment
Share on other sites

Lo he dejado de las 2 maneras, en la 1º sigue pasando lo mismo cuando escojo un producto no me sale la palabra ''producto'' y en la segunda me cambia los colores y el idioma del modulo (pk supongo que sera otro) pero sigue el mismo error, con 1 producto no sale la palabra ''producto'' (ahora esta como el segundo modo)

Edited by 3plus (see edit history)
Link to comment
Share on other sites

Gracias por las respuestas. Mirando la traducción al ES del modulo he visto que había un campo vacío.

He añadido la palabra ''Producto'' y si, me sale cuando solo elijo 1 producto, pero ahora tengo un nuevo error... Me sale la palabra repetida 2 veces:

 

MI CARRITO : 1 PRODUCTO PRODUCTO 9,00 €

Ponga lo que ponga se repite

 

<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{blockuserinfo}matrice>blockuserinfo_83218ac34c1834c26781fe4bde918ee4'] = 'Bienvenido';
$_MODULE['<{blockuserinfo}matrice>blockuserinfo_4b877ba8588b19f1b278510bf2b57ebb'] = 'Cerrer sesión';
$_MODULE['<{blockuserinfo}matrice>blockuserinfo_4394c8d8e63c470de62ced3ae85de5ae'] = 'Salir';
$_MODULE['<{blockuserinfo}matrice>blockuserinfo_bffe9a3c9a7e00ba00a11749e022d911'] = 'Entrar';
$_MODULE['<{blockuserinfo}matrice>blockuserinfo_a85eba4c6c699122b2bb1387ea4813ad'] = 'Mi Carrito';
$_MODULE['<{blockuserinfo}matrice>blockuserinfo_a2e4822a98337283e39f7b60acf85ec9'] = 'Vacío';
$_MODULE['<{blockuserinfo}matrice>blockuserinfo_f5bf48aa40cad7891eb709fcf1fde128'] = '';
$_MODULE['<{blockuserinfo}matrice>blockuserinfo_86024cad1e83101d97359d7351051156'] = 'productos';

Edited by 3plus (see edit history)
Link to comment
Share on other sites

Gracias por las respuestas. Mirando la traducción al ES del modulo he visto que había un campo vacío.

He añadido la palabra ''Producto'' y si, me sale cuando solo elijo 1 producto, pero ahora tengo un nuevo error... Me sale la palabra repetida 2 veces:

 

MI CARRITO : 1 PRODUCTO PRODUCTO 9,00 €

Ponga lo que ponga se repite

 

<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{blockuserinfo}matrice>blockuserinfo_83218ac34c1834c26781fe4bde918ee4'] = 'Bienvenido';
$_MODULE['<{blockuserinfo}matrice>blockuserinfo_4b877ba8588b19f1b278510bf2b57ebb'] = 'Cerrer sesión';
$_MODULE['<{blockuserinfo}matrice>blockuserinfo_4394c8d8e63c470de62ced3ae85de5ae'] = 'Salir';
$_MODULE['<{blockuserinfo}matrice>blockuserinfo_bffe9a3c9a7e00ba00a11749e022d911'] = 'Entrar';
$_MODULE['<{blockuserinfo}matrice>blockuserinfo_a85eba4c6c699122b2bb1387ea4813ad'] = 'Mi Carrito';
$_MODULE['<{blockuserinfo}matrice>blockuserinfo_a2e4822a98337283e39f7b60acf85ec9'] = 'Vacío';
$_MODULE['<{blockuserinfo}matrice>blockuserinfo_f5bf48aa40cad7891eb709fcf1fde128'] = '';
$_MODULE['<{blockuserinfo}matrice>blockuserinfo_86024cad1e83101d97359d7351051156'] = 'productos';

Hola, deja el fichero:

 

http://talisman-amuleto.es/themes/matrice/modules/blockuserinfo/blockuserinfo.tpl

 

Como lo tenias originalmente:

{*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author PrestaShop SA <[email protected]>
*  @copyright  2007-2011 PrestaShop SA
*  @version  Release: $Revision: 1.4 $
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
<!-- Block user information module HEADER -->
<div id="header_user">
 <ul class="header_links">
  <li>
 {l s='Welcome' mod='blockuserinfo'}{if $logged},
  <b>{$customerName}</b>
	    <a href="{$base_dir_ssl}my-account.php">{l s='My account' mod='blockuserinfo'}</a>
	    <a href="{$base_dir}index.php?mylogout" title="{l s='Log me out' mod='blockuserinfo'}">{l s='Log out' mod='blockuserinfo'}</a>
 {else}
  <a href="{$base_dir_ssl}my-account.php" id="try-1">{l s='Log in' mod='blockuserinfo'}</a>
 {/if}
  </li>
</ul>
<ul class="shopping_cart">
<h4>{l s='Cart' mod='blockuserinfo'} : </a></h4>
   <li>
<span class="ajax_cart_no_product {if $cart_qties > 0}hidden{/if}">{l s='empty' mod='blockuserinfo'}</span>
  <span class="ajax_cart_quantity">{if $cart_qties > 0}{$cart_qties}{/if}</span>
  <span class="ajax_cart_product{if $cart_qties != 1} hidden{/if}">
    {l s='product' mod='blockuserinfo'}
    <span class="ajax_cart_total">{if $cart_qties > 0}{convertPrice price=$cart->getOrderTotal(true)}{/if}</span>
    <a href="{$base_dir_ssl}order.php" title="{l s='view' mod='blockuserinfo'}">{l s='View' mod='blockuserinfo'}</a>
    <a href="{$base_dir_ssl}order.php?step=1" id="button_order_cart" title="{l s='check out' mod='blockuserinfo'}">{l s='check out' mod='blockuserinfo'}</a>
 </span>
 <span class="ajax_cart_product {if $cart_qties < 2} hidden{/if}">
    {l s='products' mod='blockuserinfo'}
    <span class="ajax_cart_total">{if $cart_qties > 0}{convertPrice price=$cart->getOrderTotal(true)}{/if}</span>
    <a href="{$base_dir_ssl}order.php" title="{l s='View' mod='blockuserinfo'}">{l s='view' mod='blockuserinfo'}</a>
    <a href="{$base_dir_ssl}order.php?step=1" id="button_order_cart" title="{l s='check out' mod='blockuserinfo'}">{l s='check out' mod='blockuserinfo'}</a>
 </span>			 
   </li>
 </ul>
</div>
<!-- /Block user information module HEADER -->

Link to comment
Share on other sites

Pues como dice Nadie, deje el fichero tpl original y use el traductor de prestashop para cambiar los textos o edite el archivo idioma php manualmente.

el duplicado de la palabra se debe a que no existe la frase adicionada por usted el archivo idioma php.

 

saludos

 

PD: la solucion a su problema es esta, seria bueno que edite el titulo a solucionado asi puede servir a otros que tengan el mismo problema.

Edited by tamu secreto (see edit history)
Link to comment
Share on other sites

Perfecto por fin me sale bien gracias por vuestras respuestas. Ah, una ultima cosa que me gustaría saber si se puede hacer o ya es mucho pedir...

Si escojo 1 producto se ve tal cual ''1 Producto'', si escojo 2 se ve ''2 Producto'' y si refresco la pagina ''2 Productos'' ahi alguna manera de que cuando se escoja otro producto refresque solo el modulo que no aya que actualizar la pagina para verlo bien?

Link to comment
Share on other sites

Eso deberia estar pasando por defecto, pero puede que no este traducida la palabra products o que no esta activo el modo ajax en el modulo carrito.

 

primero obser su archivo TPL :

 

   <li>
<span class="ajax_cart_no_product {if $cart_qties > 0}hidden{/if}">{l s='empty' mod='blockuserinfo'}</span>
	  <span class="ajax_cart_quantity">{if $cart_qties > 0}{$cart_qties}{/if}</span>
	  <span class="ajax_cart_product{if $cart_qties != 1} hidden{/if}">
	    {l s='product' mod='blockuserinfo'}
	    <span class="ajax_cart_total">{if $cart_qties > 0}{convertPrice price=$cart->getOrderTotal(true)}{/if}</span>
	    <a href="{$base_dir_ssl}order.php" title="{l s='view' mod='blockuserinfo'}">{l s='View' mod='blockuserinfo'}</a>
	    <a href="{$base_dir_ssl}order.php?step=1" id="button_order_cart" title="{l s='check out' mod='blockuserinfo'}">{l s='check out' mod='blockuserinfo'}</a>
	 </span>
	 <span class="ajax_cart_product {if $cart_qties < 2} hidden{/if}">
	    {l s='products' mod='blockuserinfo'}
	    <span class="ajax_cart_total">{if $cart_qties > 0}{convertPrice price=$cart->getOrderTotal(true)}{/if}</span>
	    <a href="{$base_dir_ssl}order.php" title="{l s='View' mod='blockuserinfo'}">{l s='view' mod='blockuserinfo'}</a>
	    <a href="{$base_dir_ssl}order.php?step=1" id="button_order_cart" title="{l s='check out' mod='blockuserinfo'}">{l s='check out' mod='blockuserinfo'}</a>
	 </span>						
   </li>

 

esta linea :

 

<span class="ajax_cart_product{if $cart_qties != 1} hidden{/if}">

{l s='product' mod='blockuserinfo'}

 

le esta diciendo si es distinto de uno oculte "product"

 

y esta linea:

 

<span class="ajax_cart_product {if $cart_qties < 2} hidden{/if}">

{l s='products' mod='blockuserinfo'}

 

que si es menor a 2 oculte la palabra "products"

 

como puede ver esto esta en ingles, asi que debe traducir el archivo tpl .

 

Esto no deberia ser asi ya que utilizando un else if se pudieron evitar la chorrera de codigo expuesto, pero en fin asi funciona y parece que asi seguira funcionando.

 

saludos

Link to comment
Share on other sites

  • 4 months later...

Muchas gracias a todos, en especial a "nadie", copié el codigo y se me solucionaron varios problemas que me daba, incluído el de productos, que lo tenía bien en las traducciones, pero fué cuestión del tpl.

 

Gracias de nuevo, sois geniales.

Un saludo.

Link to comment
Share on other sites

  • 3 months later...

Perfecto por fin me sale bien gracias por vuestras respuestas. Ah, una ultima cosa que me gustaría saber si se puede hacer o ya es mucho pedir...

Si escojo 1 producto se ve tal cual ''1 Producto'', si escojo 2 se ve ''2 Producto'' y si refresco la pagina ''2 Productos'' ahi alguna manera de que cuando se escoja otro producto refresque solo el modulo que no aya que actualizar la pagina para verlo bien?

Ami me pasa exactamente esto que comentas, cuando añadi 1 articulo a la tienda, se me queda como 1, si le doy a actualizar ya me dice 1 articulo. Si Añado otro articulo me dice, 2 articulo, y si le vuelvo a dar a f5 me dice 2 articulos. Digamos que actualiza en tiempo real la cantidad y el precio, pero no la palabra articulo / articulos no lo hace en tiempo real, sino que es cuando refrescas la pagina.

Alguna idea ?

Saludos y siento reflotar el tema.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...