Jump to content

Ocultar Transporte en carrito Usuarios No Registrados(Solucionado)


antoniohola
 Share

Recommended Posts

Buenas tardes,alguna manera no muy complicada,para que,cuando una persona no esté registrada en mi tienda,en un producto le de a Añadir producto...y en el carrito salga el precio del producto..pero no el transporte???.

Entonces se registre para hacer el pedido,,y ahí que le aparezca el precio del producto + el transporte.

 

He estado leyendo por el foro pero no me entero bien,mi version es 1.4.7.2

 

Saludos y gracias por este foro. :)

Edited by antoniohola (see edit history)

Share this post


Link to post
Share on other sites

Buenas tardes,alguna manera no muy complicada,para que,cuando una persona no esté registrada en mi tienda,en un producto le de a Añadir producto...y en el carrito salga el precio del producto..pero no el transporte???.

Entonces se registre para hacer el pedido,,y ahí que le aparezca el precio del producto + el transporte.

 

He estado leyendo por el foro pero no me entero bien,mi version es 1.4.7.2

 

Saludos y gracias por este foro. :)

 

Quizás el modulo que se comenta aquí: http://www.prestashop.com/forums/index.php?/topic/158698-shipping-cost-only-correct-when-logged-in/page__view__findpost__p__932826 sea mas optimo que ocultarlo.

Share this post


Link to post
Share on other sites

Acompañando la información de Statitic

 

Hola tan solo busca esto en el blockcart.tpl:

<span id="cart_block_shipping_cost" class="price ajax_cart_shipping_cost">{$shipping_cost}</span>
  <span>{l s='Shipping' mod='blockcart'}</span>
  <br/>

Y lo cambias por este otro:

{if $logged}<span id="cart_block_shipping_cost" class="price ajax_cart_shipping_cost">{$shipping_cost}</span>
  <span>{l s='Shipping' mod='blockcart'}</span>
  <br/>{/if}

No lo he probado pero deberia de funcionar.

 

Saludos

 

Añado, para el resumen del pedido, carrito como queramos llamarlo.

 

En el fichero que te he comentado:

 

/themes/tu-plantilla/shopping-cart.tpl

 

busca esto:

 

  {if $use_taxes}
{if $priceDisplay}
 <tr class="cart_total_delivery" {if $shippingCost <= 0} style="display:none;"{/if}>
  <td colspan="6">{l s='Total shipping'}{if $display_tax_label} {l s='(tax excl.)'}{/if}{l s=':'}</td>
  <td class="price" id="total_shipping">{displayPrice price=$shippingCostTaxExc}</td>
 </tr>
{else}
 <tr class="cart_total_delivery"{if $shippingCost <= 0} style="display:none;"{/if}>
  <td colspan="6">{l s='Total shipping'}{if $display_tax_label} {l s='(tax incl.)'}{/if}{l s=':'}</td>
  <td class="price" id="total_shipping" >{displayPrice price=$shippingCost}</td>
 </tr>
{/if}
  {else}
<tr class="cart_total_delivery"{if $shippingCost <= 0} style="display:none;"{/if}>
 <td colspan="6">{l s='Total shipping:'}</td>
 <td class="price" id="total_shipping" >{displayPrice price=$shippingCostTaxExc}</td>
</tr>
  {/if}

 

 

Y dejalo asi:

 

  {if $logged}
  {if $use_taxes}
{if $priceDisplay}
 <tr class="cart_total_delivery" {if $shippingCost <= 0} style="display:none;"{/if}>
  <td colspan="6">{l s='Total shipping'}{if $display_tax_label} {l s='(tax excl.)'}{/if}{l s=':'}</td>
  <td class="price" id="total_shipping">{displayPrice price=$shippingCostTaxExc}</td>
 </tr>
{else}
 <tr class="cart_total_delivery"{if $shippingCost <= 0} style="display:none;"{/if}>
  <td colspan="6">{l s='Total shipping'}{if $display_tax_label} {l s='(tax incl.)'}{/if}{l s=':'}</td>
  <td class="price" id="total_shipping" >{displayPrice price=$shippingCost}</td>
 </tr>
{/if}
  {else}
<tr class="cart_total_delivery"{if $shippingCost <= 0} style="display:none;"{/if}>
 <td colspan="6">{l s='Total shipping:'}</td>
 <td class="price" id="total_shipping" >{displayPrice price=$shippingCostTaxExc}</td>
</tr>
  {/if}
{/if}

 

(Esto seria si quisieras ocultar los gastos de envio en el resumen del carrito, a los usuarios no registrados)

 

PD: Aunque realmente no lo estas ocultando... es decir los ocultas de la vista, pero no del total...

Edited by nadie (see edit history)

Share this post


Link to post
Share on other sites

Y donde aparece el blockcart.tpl ? dentro de que carpeta..

 

gracias por vuestras respuestas

 

/modules/blockcart/blockcart.tpl

 

O si lo tienes sobreescrito en tu plantilla:

 

/themes/tu-plantilla/modules/blockcart/blockcart.tpl

 

Si no lo tuvieras sobreescrito en la plantilla, te recomendaria crear la ruta que te he comentado, ya que de esa manera, depende modificar el original, modificamos el override del fichero.

 

Tu tienes la decisión, tu tienes el poder )

Share this post


Link to post
Share on other sites

Dentro de mi plantilla hay una carpeta llamada css y dentro,modules y dentro blockart y dentro blockart.css pero no .tpl(osea,no hay carpeta modules si no es entrando en css) mi plantilla es prestashop a secas.

 

En modules blockart y blockart.tpl he modificado poniendo el if como indica pero le doy a forzar complicacion y se desactiva al entrar en mi tienda la parte entera de la derecha,,desaparece el carrito y todo lo que haya en ese lado...le doy despues a no forzar complicacion...aparece todo perfecto..pero al añadir un producto al carrito...sigue apareciendo el transporte con su precio.

 

Lo del carrito es el primer mensaje ...o el segundo que me has mandado NADIE? tengo que configurar 2 cosas..cual es cual

Edited by antoniohola (see edit history)

Share this post


Link to post
Share on other sites

Una explicación, es para bloque lateral del carrito, otra para el resumen del carrito central. (La que yo te he comentado es para el resumen del carrito, la que te ha comentado statitic, es para el bloque lateral)

Share this post


Link to post
Share on other sites

He modificado esto: /themes/tu-plantilla/shopping-cart.tpl dejandolo tal y como indicas:

añadiendo el {if $logged} y el {/if} En la misma posicion que está dibujado.

 

Y sigue cargando el transporte aun estando no logueado.

 

Cambio también lo de blockcart.tpl o no hace falta?

 

Voy a lo de blockart.tpl que me falta introducir una cosa...dios santo con la programacion

Share this post


Link to post
Share on other sites

A mi me aperece esto en el blockcart.tpl

 

 

<p id="cart-prices">

<span>{l s='Shipping' mod='blockcart'}</span>

<span id="cart_block_shipping_cost" class="price ajax_cart_shipping_cost">{$shipping_cost}</span>

<br/>

{if $show_wrapping}

{assign var='blockcart_cart_flag' value='Cart::ONLY_WRAPPING'|constant}

<span>{l s='Wrapping' mod='blockcart'}</span>

<span id="cart_block_wrapping_cost" class="price cart_block_wrapping_cost">{if $priceDisplay == 1}{convertPrice price=$cart->getOrderTotal(false, $blockcart_cart_flag)}{else}{convertPrice price=$cart->getOrderTotal(true, $blockcart_cart_flag)}{/if}</span>

<br/>

{/if}

{if $show_tax && isset($tax_cost)}

<span>{l s='Tax' mod='blockcart'}</span>

<span id="cart_block_tax_cost" class="price ajax_cart_tax_cost">{$tax_cost}</span>

<br/>

{/if}

<span>{l s='Total' mod='blockcart'}</span>

<span id="cart_block_total" class="price ajax_block_cart_total">{$total}</span>

 

 

Osea,me aparece al reves de como lo mostrais vosotros....es por eso que no funciona,o tengo que modificar otra cosa para que no aparezca el transporte en el carrito lateral a las personas que no estén registradas?

 

Saludos

Share this post


Link to post
Share on other sites

Si solo quieres mostrar el precio de los productos, y no el total, ni los gastos de envíos para los no registrados, deja el fichero asi: (Para el bloque lateral) (Recuerda, vaciar fichero modules/blockcart/blockcart.tpl y pegar este contenido)

 

{*
* 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
*}
{*************************************************************************************************************************************}
{* IMPORTANT : If you change some data here, you have to report these changes in the ./blockcart-json.js (to let ajaxCart available) *}
{*************************************************************************************************************************************}
{if $ajax_allowed}
<script type="text/javascript">
var CUSTOMIZE_TEXTFIELD = {$CUSTOMIZE_TEXTFIELD};
var customizationIdMessage = '{l s='Customization #' mod='blockcart' js=1}';
var removingLinkText = '{l s='remove this product from my cart' mod='blockcart' js=1}';
</script>
{/if}
<!-- MODULE Block cart -->
<div id="cart_block" class="block exclusive">
<h4>
 <a href="{$link->getPageLink("$order_process.php", true)}">{l s='Cart' mod='blockcart'}</a>
 {if $ajax_allowed}
 <span id="block_cart_expand" {if isset($colapseExpandStatus) && $colapseExpandStatus eq 'expanded' || !isset($colapseExpandStatus)}class="hidden"{/if}> </span>
 <span id="block_cart_collapse" {if isset($colapseExpandStatus) && $colapseExpandStatus eq 'collapsed'}class="hidden"{/if}> </span>
 {/if}
</h4>
<div class="block_content">
<!-- block summary -->
<div id="cart_block_summary" class="{if isset($colapseExpandStatus) && $colapseExpandStatus eq 'expanded' || !$ajax_allowed || !isset($colapseExpandStatus)}collapsed{else}expanded{/if}">
 <span class="ajax_cart_quantity" {if $cart_qties <= 0}style="display:none;"{/if}>{$cart_qties}</span>
 <span class="ajax_cart_product_txt_s" {if $cart_qties <= 1}style="display:none"{/if}>{l s='products' mod='blockcart'}</span>
 <span class="ajax_cart_product_txt" {if $cart_qties > 1}style="display:none"{/if}>{l s='product' mod='blockcart'}</span>
 <span class="ajax_cart_total" {if $cart_qties <= 0}style="display:none"{/if}>{if $priceDisplay == 1}{convertPrice price=$cart->getOrderTotal(false)}{else}{convertPrice price=$cart->getOrderTotal(true)}{/if}</span>
 <span class="ajax_cart_no_product" {if $cart_qties != 0}style="display:none"{/if}>{l s='(empty)' mod='blockcart'}</span>
</div>
<!-- block list of products -->
<div id="cart_block_list" class="{if isset($colapseExpandStatus) && $colapseExpandStatus eq 'expanded' || !$ajax_allowed || !isset($colapseExpandStatus)}expanded{else}collapsed{/if}">
{if $products}
 <dl class="products">
 {foreach from=$products item='product' name='myLoop'}
  {assign var='productId' value=$product.id_product}
  {assign var='productAttributeId' value=$product.id_product_attribute}
  <dt id="cart_block_product_{$product.id_product}{if $product.id_product_attribute}_{$product.id_product_attribute}{/if}" class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}">
<span class="quantity-formated"><span class="quantity">{$product.cart_quantity}</span>x</span>
<a class="cart_block_product_name" href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category)}" title="{$product.name|escape:html:'UTF-8'}">
{$product.name|truncate:13:'...'|escape:html:'UTF-8'}</a>
<span class="remove_link">{if !isset($customizedDatas.$productId.$productAttributeId)}<a rel="nofollow" class="ajax_cart_block_remove_link" href="{$link->getPageLink('cart.php')}?delete&id_product={$product.id_product}&ipa={$product.id_product_attribute}&token={$static_token}" title="{l s='remove this product from my cart' mod='blockcart'}"> </a>{/if}</span>
<span class="price">{if $priceDisplay == $smarty.const.PS_TAX_EXC}{displayWtPrice p="`$product.total`"}{else}{displayWtPrice p="`$product.total_wt`"}{/if}</span>
  </dt>
  {if isset($product.attributes_small)}
  <dd id="cart_block_combination_of_{$product.id_product}{if $product.id_product_attribute}_{$product.id_product_attribute}{/if}" class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}">
<a href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category)}" title="{l s='Product detail'}">{$product.attributes_small}</a>
  {/if}
  <!-- Customizable datas -->
  {if isset($customizedDatas.$productId.$productAttributeId)}
{if !isset($product.attributes_small)}<dd id="cart_block_combination_of_{$product.id_product}{if $product.id_product_attribute}_{$product.id_product_attribute}{/if}" class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}">{/if}
<ul class="cart_block_customizations" id="customization_{$productId}_{$productAttributeId}">
 {foreach from=$customizedDatas.$productId.$productAttributeId key='id_customization' item='customization' name='customizations'}
  <li name="customization">
   <div class="deleteCustomizableProduct" id="deleteCustomizableProduct_{$id_customization|intval}_{$product.id_product|intval}_{$product.id_product_attribute|intval}"><a class="ajax_cart_block_remove_link" href="{$link->getPageLink('cart.php')}?delete&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_customization={$id_customization}&token={$static_token}"> </a></div>
   <span class="quantity-formated"><span class="quantity">{$customization.quantity}</span>x</span>{if isset($customization.datas.$CUSTOMIZE_TEXTFIELD.0)}
   {$customization.datas.$CUSTOMIZE_TEXTFIELD.0.value|escape:html:'UTF-8'|replace:"<br />":" "|truncate:28}
   {else}
   {l s='Customization #' mod='blockcart'}{$id_customization|intval}{l s=':' mod='blockcart'}
   {/if}
  </li>
 {/foreach}
</ul>
{if !isset($product.attributes_small)}</dd>{/if}
  {/if}
  {if isset($product.attributes_small)}</dd>{/if}
 {/foreach}
 </dl>
{/if}
 <p {if $products}class="hidden"{/if} id="cart_block_no_products">{l s='No products' mod='blockcart'}</p>
 {if $discounts|@count > 0}<table id="vouchers">
  <tbody>
  {foreach from=$discounts item=discount}
<tr class="bloc_cart_voucher" id="bloc_cart_voucher_{$discount.id_discount}">
 <td class="name" title="{$discount.description}">{$discount.name|cat:' : '|cat:$discount.description|truncate:18:'...'|escape:'htmlall':'UTF-8'}</td>
 <td class="price">-{if $discount.value_real != '!'}{if $priceDisplay == 1}{convertPrice price=$discount.value_tax_exc}{else}{convertPrice price=$discount.value_real}{/if}{/if}</td>
 <td class="delete"><a href="{$link->getPageLink("$order_process.php", true)}?deleteDiscount={$discount.id_discount}" title="{l s='Delete'}"><img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" width="11" height="13" class="icon" /></a></td>
</tr>
  {/foreach}
  </tbody>
 </table>
 {/if}
 {if $logged}
 <p id="cart-prices">
  <span>{l s='Shipping' mod='blockcart'}</span>
  <span id="cart_block_shipping_cost" class="price ajax_cart_shipping_cost">{$shipping_cost}</span>
  <br/>
  {if $show_wrapping}
{assign var='blockcart_cart_flag' value='Cart::ONLY_WRAPPING'|constant}
<span>{l s='Wrapping' mod='blockcart'}</span>
<span id="cart_block_wrapping_cost" class="price cart_block_wrapping_cost">{if $priceDisplay == 1}{convertPrice price=$cart->getOrderTotal(false, $blockcart_cart_flag)}{else}{convertPrice price=$cart->getOrderTotal(true, $blockcart_cart_flag)}{/if}</span>
<br/>
  {/if}
  {if $show_tax && isset($tax_cost)}
<span>{l s='Tax' mod='blockcart'}</span>
<span id="cart_block_tax_cost" class="price ajax_cart_tax_cost">{$tax_cost}</span>
<br/>
  {/if}
  <span>{l s='Total' mod='blockcart'}</span>
  <span id="cart_block_total" class="price ajax_block_cart_total">{$total}</span>
 </p>
 {if $use_taxes && $display_tax_label == 1 && $show_tax}
  {if $priceDisplay == 0}
<p id="cart-price-precisions">
 {l s='Prices are tax included' mod='blockcart'}
</p>
  {/if}
  {if $priceDisplay == 1}
<p id="cart-price-precisions">
 {l s='Prices are tax excluded' mod='blockcart'}
</p>
  {/if}
 {/if}
 {/if}
 <p id="cart-buttons">
  {if $order_process == 'order'}<a href="{$link->getPageLink("$order_process.php", true)}" class="button_small" title="{l s='Cart' mod='blockcart'}">{l s='Cart' mod='blockcart'}</a>{/if}
  <a href="{$link->getPageLink("$order_process.php", true)}{if $order_process == 'order'}?step=1{/if}" id="button_order_cart" class="exclusive{if $order_process == 'order-opc'}_large{/if}" title="{l s='Check out' mod='blockcart'}">{l s='Check out' mod='blockcart'}</a>
 </p>
</div>
</div>
</div>
<!-- /MODULE Block cart -->

Share this post


Link to post
Share on other sites

Eres muy grande NADIE...muy grande. thanks,solucionado. Funciona perfecto para los no registrados y cuando te registras aparecen los gastos de envio.

 

Ahora a probar lo que has comentado antes,del resumen central del carrito de compra que no aparezca tampoco para los no registrados.

 

Puedes pasar una codigo como el que me has pasado para pegarlo?

 

Thanks por todo.

Share this post


Link to post
Share on other sites

No funciona al modificar /themes/tu-plantilla/shopping-cart.tpl lo de que no se muestre los gastos de envio en el pedido central,si aparecen los gastos de envio:

 

Total gastos de envío con IVA: 6,95 €

 

 

En no registrado,lo unico que no aparece es esto:

 

Total productos con IVA: 339,00 €

 

y registrado si aparece...es lo unico que cambia,pero los gastos de envio siguen apareciendo

Edited by antoniohola (see edit history)

Share this post


Link to post
Share on other sites

Y del carrito de compra central,me gustaría quitar para clientes registrados y no registrados esto,pero solo del carrito central...no de las facturas ni back office:

 

Total productos con IVA:339,00 €

Total gastos de envío con IVA:6,95 €

Total sin IVA:287,12 €

Total de impuestos:58,83 €

Total IVA incluído:345,95 €

 

Creo que lo señalado en rojo,hace equivocar al cliente,detenerse,leer bien y perder ventas yo con ello.Ya que el producto pone con iva incluido no hace falta que muestre lo que cobra de impuestos

Edited by antoniohola (see edit history)

Share this post


Link to post
Share on other sites

Y del carrito de compra central,me gustaría quitar para clientes registrados y no registrados esto,pero solo del carrito central...no de las facturas ni back office:

 

Total productos con IVA:339,00 €

Total gastos de envío con IVA:6,95 €

Total sin IVA:287,12 €

Total de impuestos:58,83 €

Total IVA incluído:345,95 €

 

 

Aquí, tienes el fichero integro:

 

{*
* 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: 16688 $
*  @license	http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
{capture name=path}{l s='Your shopping cart'}{/capture}
{include file="$tpl_dir./breadcrumb.tpl"}
<h1 id="cart_title">{l s='Shopping cart summary'}</h1>
{assign var='current_step' value='summary'}
{include file="$tpl_dir./order-steps.tpl"}
{include file="$tpl_dir./errors.tpl"}
{if isset($empty)}
<p class="warning">{l s='Your shopping cart is empty.'}</p>
{elseif $PS_CATALOG_MODE}
<p class="warning">{l s='This store has not accepted your new order.'}</p>
{else}
<script type="text/javascript">
// <![CDATA[
var currencySign = '{$currencySign|html_entity_decode:2:"UTF-8"}';
var currencyRate = '{$currencyRate|floatval}';
var currencyFormat = '{$currencyFormat|intval}';
var currencyBlank = '{$currencyBlank|intval}';
var txtProduct = "{l s='product'}";
var txtProducts = "{l s='products'}";
// ]]>
</script>
<p style="display:none" id="emptyCartWarning" class="warning">{l s='Your shopping cart is empty.'}</p>
{if isset($lastProductAdded) AND $lastProductAdded}
{foreach from=$products item=product}
 {if $product.id_product == $lastProductAdded.id_product AND (!$product.id_product_attribute OR ($product.id_product_attribute == $lastProductAdded.id_product_attribute))}
  <div class="cart_last_product">
<div class="cart_last_product_header">
 <div class="left">{l s='Last added product'}</div>
</div>
<a  class="cart_last_product_img" href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category)|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'small')}" alt="{$product.name|escape:'htmlall':'UTF-8'}"/></a>
<div class="cart_last_product_content">
 <h5><a href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category)|escape:'htmlall':'UTF-8'}">{$product.name|escape:'htmlall':'UTF-8'}</a></h5>
 {if isset($product.attributes) && $product.attributes}<a href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category)|escape:'htmlall':'UTF-8'}">{$product.attributes|escape:'htmlall':'UTF-8'}</a>{/if}
</div>
<br class="clear" />
  </div>
 {/if}
{/foreach}
{/if}
<p>{l s='Your shopping cart contains'} <span id="summary_products_quantity">{$productNumber} {if $productNumber == 1}{l s='product'}{else}{l s='products'}{/if}</span></p>
<div id="order-detail-content" class="table_block">
<table id="cart_summary" class="std">
 <thead>
  <tr>
<th class="cart_product first_item">{l s='Product'}</th>
<th class="cart_description item">{l s='Description'}</th>
<th class="cart_ref item">{l s='Ref.'}</th>
<th class="cart_availability item">{l s='Avail.'}</th>
<th class="cart_unit item">{l s='Unit price'}</th>
<th class="cart_quantity item">{l s='Qty'}</th>
<th class="cart_total last_item">{l s='Total'}</th>
  </tr>
 </thead>
 <tfoot>{if $logged}
  {if $use_taxes}
{if $priceDisplay}
 <tr class="cart_total_price">
  <td colspan="6">{l s='Total products'}{if $display_tax_label} {l s='(tax excl.)'}{/if}{l s=':'}</td>
  <td class="price" id="total_product">{displayPrice price=$total_products}</td>
 </tr>
{else}
 <tr class="cart_total_price">
  <td colspan="6">{l s='Total products'}{if $display_tax_label} {l s='(tax incl.)'}{/if}{l s=':'}</td>
  <td class="price" id="total_product">{displayPrice price=$total_products_wt}</td>
 </tr>
{/if}
  {else}
<tr class="cart_total_price">
 <td colspan="6">{l s='Total products:'}</td>
 <td class="price" id="total_product">{displayPrice price=$total_products}</td>
</tr>
  {/if}{/if}
  <tr class="cart_total_voucher" {if $total_discounts == 0}style="display: none;"{/if}>
<td colspan="6">
{if $use_taxes}
 {if $priceDisplay}
  {l s='Total vouchers'}{if $display_tax_label} {l s='(tax excl.)'}{/if}{l s=':'}
 {else}
  {l s='Total vouchers'}{if $display_tax_label} {l s='(tax incl.)'}{/if}{l s=':'}
 {/if}
{else}
 {l s='Total vouchers:'}
{/if}
</td>
<td class="price-discount" id="total_discount">
{if $use_taxes}
 {if $priceDisplay}
  {displayPrice price=$total_discounts_tax_exc}
 {else}
  {displayPrice price=$total_discounts}
 {/if}
{else}
 {displayPrice price=$total_discounts_tax_exc}
{/if}
</td>
  </tr>
  <tr class="cart_total_voucher" {if $total_wrapping == 0}style="display: none;"{/if}>
<td colspan="6">
{if $use_taxes}
 {if $priceDisplay}
  {l s='Total gift-wrapping'}{if $display_tax_label} {l s='(tax excl.)'}{/if}{l s=':'}
 {else}
  {l s='Total gift-wrapping'}{if $display_tax_label} {l s='(tax incl.)'}{/if}{l s=':'}
 {/if}
{else}
 {l s='Total gift-wrapping:'}
{/if}
</td>
<td class="price-discount" id="total_wrapping">
{if $use_taxes}
 {if $priceDisplay}
  {displayPrice price=$total_wrapping_tax_exc}
 {else}
  {displayPrice price=$total_wrapping}
 {/if}
{else}
 {displayPrice price=$total_wrapping_tax_exc}
{/if}
</td>
  </tr> {if $logged}
  {if $use_taxes}
{if $priceDisplay}
 <tr class="cart_total_delivery" {if $shippingCost <= 0} style="display:none;"{/if}>
  <td colspan="6">{l s='Total shipping'}{if $display_tax_label} {l s='(tax excl.)'}{/if}{l s=':'}</td>
  <td class="price" id="total_shipping">{displayPrice price=$shippingCostTaxExc}</td>
 </tr>
{else}
 <tr class="cart_total_delivery"{if $shippingCost <= 0} style="display:none;"{/if}>
  <td colspan="6">{l s='Total shipping'}{if $display_tax_label} {l s='(tax incl.)'}{/if}{l s=':'}</td>
  <td class="price" id="total_shipping" >{displayPrice price=$shippingCost}</td>
 </tr>
{/if}
  {else}
<tr class="cart_total_delivery"{if $shippingCost <= 0} style="display:none;"{/if}>
 <td colspan="6">{l s='Total shipping:'}</td>
 <td class="price" id="total_shipping" >{displayPrice price=$shippingCostTaxExc}</td>
</tr>
  {/if}{/if}
  {if $use_taxes}
 <!-- <tr class="cart_total_price">
<td colspan="6">
 {if $display_tax_label}
  {l s='Total (tax excl.):'}
 {else}
  {l s='Subtotal:'}
 {/if}
</td>
<td class="price" id="total_price_without_tax">{displayPrice price=$total_price_without_tax}</td>

  </tr>-->
  <!-- <tr class="cart_total_tax">
  <td colspan="6">
 {if $display_tax_label}
  {l s='Total tax:'}
 {else}
  {l s='Estimated Sales Tax:'}
 {/if}
</td>
<td class="price" id="total_tax">{displayPrice price=$total_tax}</td>

  </tr>  -->
  <tr class="cart_total_price">
<td colspan="6">
 {if $display_tax_label}
  {l s='Total (tax incl.):'}
 {else}
  {l s='Total:'}
 {/if}
</td>
<td class="price" id="total_price">{displayPrice price=$total_price}</td>
  </tr>
  {else}
  <tr class="cart_total_price">
<td colspan="6">{l s='Total:'}</td>
<td class="price" id="total_price">{displayPrice price=$total_price_without_tax}</td>
  </tr>
  {/if}
  <tr class="cart_free_shipping" {if $free_ship <= 0 || $isVirtualCart} style="display: none;" {/if}>
 <td colspan="6" style="white-space: normal;">{l s='In order to obtain free shipping you must first place an order'}</td>
 <td id="free_shipping" class="price">{displayPrice price=$free_ship}</td>
</tr>
 </tfoot>
 <tbody>
 {foreach from=$products item=product name=productLoop}
  {assign var='productId' value=$product.id_product}
  {assign var='productAttributeId' value=$product.id_product_attribute}
  {assign var='quantityDisplayed' value=0}
  {* Display the product line *}
  {include file="$tpl_dir./shopping-cart-product-line.tpl"}
  {* Then the customized datas ones*}
  {if isset($customizedDatas.$productId.$productAttributeId)}
{foreach from=$customizedDatas.$productId.$productAttributeId key='id_customization' item='customization'}
 <tr id="product_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" class="alternate_item cart_item">
  <td colspan="5">
   {foreach from=$customization.datas key='type' item='datas'}
	{if $type == $CUSTOMIZE_FILE}
	 <div class="customizationUploaded">
	  <ul class="customizationUploaded">
	   {foreach from=$datas item='picture'}<li><img src="{$pic_dir}{$picture.value}_small" alt="" class="customizationUploaded" /></li>{/foreach}
	  </ul>
	 </div>
	{elseif $type == $CUSTOMIZE_TEXTFIELD}
	 <ul class="typedText">
	  {foreach from=$datas item='textField' name='typedText'}<li>{if $textField.name}{$textField.name}{else}{l s='Text #'}{$smarty.foreach.typedText.index+1}{/if}{l s=':'} {$textField.value}</li>{/foreach}
	 </ul>
	{/if}
   {/foreach}
  </td>
  <td class="cart_quantity">
   <div style="float:right">
	<a rel="nofollow" class="cart_quantity_delete" id="{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" href="{$link->getPageLink('cart.php', true)}?delete&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_customization={$id_customization}&token={$token_cart}"><img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" title="{l s='Delete this customization'}" width="11" height="13" class="icon" /></a>
   </div>
   <div id="cart_quantity_button" style="float:left">
   <a rel="nofollow" class="cart_quantity_up" id="cart_quantity_up_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" href="{$link->getPageLink('cart.php', true)}?add&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_customization={$id_customization}&token={$token_cart}" title="{l s='Add'}"><img src="{$img_dir}icon/quantity_up.gif" alt="{l s='Add'}" width="14" height="9" /></a><br />
   {if $product.minimal_quantity < ($customization.quantity -$quantityDisplayed) OR $product.minimal_quantity <= 1}
   <a rel="nofollow" class="cart_quantity_down" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" href="{$link->getPageLink('cart.php', true)}?add&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&id_customization={$id_customization}&op=down&token={$token_cart}" title="{l s='Subtract'}">
	<img src="{$img_dir}icon/quantity_down.gif" alt="{l s='Subtract'}" width="14" height="9" />
   </a>
   {else}
   <a class="cart_quantity_down" style="opacity: 0.3;" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}" href="#" title="{l s='Subtract'}">
	<img src="{$img_dir}icon/quantity_down.gif" alt="{l s='Subtract'}" width="14" height="9" />
   </a>
   {/if}
   </div>
   <input type="hidden" value="{$customization.quantity}" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}_hidden"/>
   <input size="2" type="text" value="{$customization.quantity}" class="cart_quantity_input" name="quantity_{$product.id_product}_{$product.id_product_attribute}_{$id_customization}"/>
  </td>
  <td class="cart_total"></td>
 </tr>
 {assign var='quantityDisplayed' value=$quantityDisplayed+$customization.quantity}
{/foreach}
{* If it exists also some uncustomized products *}
{if $product.quantity-$quantityDisplayed > 0}{include file="$tpl_dir./shopping-cart-product-line.tpl"}{/if}
  {/if}
 {/foreach}
 </tbody>
{if sizeof($discounts)}
 <tbody>
 {foreach from=$discounts item=discount name=discountLoop}
  <tr class="cart_discount {if $smarty.foreach.discountLoop.last}last_item{elseif $smarty.foreach.discountLoop.first}first_item{else}item{/if}" id="cart_discount_{$discount.id_discount}">
<td class="cart_discount_name" colspan="2">{$discount.name}</td>
<td class="cart_discount_description" colspan="3">{$discount.description}</td>
<td class="cart_discount_delete"><a href="{if $opc}{$link->getPageLink('order-opc.php', true)}{else}{$link->getPageLink('order.php', true)}{/if}?deleteDiscount={$discount.id_discount}" title="{l s='Delete'}"><img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" class="icon" width="11" height="13" /></a></td>
<td class="cart_discount_price"><span class="price-discount">
 {if $discount.value_real > 0}
  {if !$priceDisplay}{displayPrice price=$discount.value_real*-1}{else}{displayPrice price=$discount.value_tax_exc*-1}{/if}
 {/if}
</span></td>
  </tr>
 {/foreach}
 </tbody>
{/if}
</table>
</div>
{if $voucherAllowed}
<div id="cart_voucher" class="table_block">
{if isset($errors_discount) && $errors_discount}
 <ul class="error">
 {foreach from=$errors_discount key=k item=error}
  <li>{$error|escape:'htmlall':'UTF-8'}</li>
 {/foreach}
 </ul>
{/if}
<form action="{if $opc}{$link->getPageLink('order-opc.php', true)}{else}{$link->getPageLink('order.php', true)}{/if}" method="post" id="voucher">
 <fieldset>
  <h4>{l s='Vouchers'}</h4>
  <p>
<label for="discount_name">{l s='Code:'}</label>
<input type="text" id="discount_name" name="discount_name" value="{if isset($discount_name) && $discount_name}{$discount_name}{/if}" />
  </p>
  <p class="submit"><input type="hidden" name="submitDiscount" /><input type="submit" name="submitAddDiscount" value="{l s='Add'}" class="button" /></p>
 {if $displayVouchers}
  <h4>{l s='Take advantage of our offers:'}</h4>
  <div id="display_cart_vouchers">
  {foreach from=$displayVouchers item=voucher}
<span onclick="$('#discount_name').val('{$voucher.name}');return false;" class="voucher_name">{$voucher.name}</span> - {$voucher.description} <br />
  {/foreach}
  </div>
 {/if}
 </fieldset>
</form>
</div>
{/if}
<div id="HOOK_SHOPPING_CART">{$HOOK_SHOPPING_CART}</div>
{* Define the style if it doesn't exist in the PrestaShop version*}
{* Will be deleted for 1.5 version and more *}
{if !isset($addresses_style)}
{$addresses_style.company = 'address_company'}
{$addresses_style.vat_number = 'address_company'}
{$addresses_style.firstname = 'address_name'}
{$addresses_style.lastname = 'address_name'}
{$addresses_style.address1 = 'address_address1'}
{$addresses_style.address2 = 'address_address2'}
{$addresses_style.city = 'address_city'}
{$addresses_style.country = 'address_country'}
{$addresses_style.phone = 'address_phone'}
{$addresses_style.phone_mobile = 'address_phone_mobile'}
{$addresses_style.alias = 'address_title'}
{/if}
{if (($carrier->id AND !isset($virtualCart)) OR $delivery->id OR $invoice->id) AND !$opc}
<div class="order_delivery">
{if !isset($formattedAddresses)}
 {if $delivery->id}
 <ul id="delivery_address" class="address item">
  <li class="address_title">{l s='Delivery address'}</li>
{if $delivery->company}<li class="address_company">{$delivery->company|escape:'htmlall':'UTF-8'}</li>{/if}
<li class="address_name">{$delivery->firstname|escape:'htmlall':'UTF-8'} {$delivery->lastname|escape:'htmlall':'UTF-8'}</li>
<li class="address_address1">{$delivery->address1|escape:'htmlall':'UTF-8'}</li>
{if $delivery->address2}<li class="address_address2">{$delivery->address2|escape:'htmlall':'UTF-8'}</li>{/if}
<li class="address_city">{$delivery->postcode|escape:'htmlall':'UTF-8'} {$delivery->city|escape:'htmlall':'UTF-8'}</li>
<li class="address_country">{$delivery->country|escape:'htmlall':'UTF-8'} {if $delivery_state}({$delivery_state|escape:'htmlall':'UTF-8'}){/if}</li>
 </ul>
 {/if}
 {if $invoice->id}
 <ul id="invoice_address" class="address alternate_item">
  <li class="address_title">{l s='Invoice address'}</li>
{if $invoice->company}<li class="address_company">{$invoice->company|escape:'htmlall':'UTF-8'}</li>{/if}
<li class="address_name">{$invoice->firstname|escape:'htmlall':'UTF-8'} {$invoice->lastname|escape:'htmlall':'UTF-8'}</li>
<li class="address_address1">{$invoice->address1|escape:'htmlall':'UTF-8'}</li>
{if $invoice->address2}<li class="address_address2">{$invoice->address2|escape:'htmlall':'UTF-8'}</li>{/if}
<li class="address_city">{$invoice->postcode|escape:'htmlall':'UTF-8'} {$invoice->city|escape:'htmlall':'UTF-8'}</li>
<li class="address_country">{$invoice->country|escape:'htmlall':'UTF-8'} {if $invoice_state}({$invoice_state|escape:'htmlall':'UTF-8'}){/if}</li>
 </ul>
 {/if}
{else}
 {foreach from=$formattedAddresses item=address name=myLoop}
  <ul class="address {if $smarty.foreach.myLoop.last}last_item{elseif $smarty.foreach.myLoop.first}first_item{/if} {if $smarty.foreach.myLoop.index % 2}alternate_item{else}item{/if}">
<li class="address_title">{$address.object.alias}</li>
{foreach from=$address.ordered name=adr_loop item=pattern}
 {assign var=addressKey value=" "|explode:$pattern}
 <li>
 {foreach from=$addressKey item=key name="word_loop"}
  <span class="{if isset($addresses_style[$key])}{$addresses_style[$key]}{/if}">
   {$address.formated[$key]|escape:'htmlall':'UTF-8'}
  </span>
 {/foreach}
 </li>
{/foreach}
</ul>
 {/foreach}
 <p class="clear" />
{/if}
{if $carrier->id AND !isset($virtualCart)}
<div id="order_carrier">
 <h4>{l s='Carrier:'}</h4>
 {if isset($carrierPicture)}<img src="{$img_ship_dir}{$carrier->id}.jpg" alt="{l s='Carrier'}" />{/if}
 <span>{$carrier->name|escape:'htmlall':'UTF-8'}</span>
</div>
{/if}
</div>
{/if}
<p class="cart_navigation">
{if !$opc}<a href="{$link->getPageLink('order.php', true)}?step=1{if $back}&back={$back}{/if}" class="exclusive" title="{l s='Next'}">{l s='Next'} »</a>{/if}
<a href="{if (isset($smarty.server.HTTP_REFERER) && strstr($smarty.server.HTTP_REFERER, $link->getPageLink('order.php'))) || !isset($smarty.server.HTTP_REFERER)}{$link->getPageLink('index.php')}{else}{$smarty.server.HTTP_REFERER|escape:'htmlall':'UTF-8'|secureReferrer}{/if}" class="button_large" title="{l s='Continue shopping'}">« {l s='Continue shopping'}</a>
</p>
<p class="clear"><br /><br /></p>
<div class="clear"></div>
<p class="cart_navigation_extra">
<span id="HOOK_SHOPPING_CART_EXTRA">{$HOOK_SHOPPING_CART_EXTRA}</span>
</p>
{/if}

 

Si no estas logeado, muestra:

 

Precio productos con iva

 

Si estas logeado muestra:

 

Total productos

Gastos de Envio

Total final )

 

PD: Es una modificación un tanto chapuza :wub:

Share this post


Link to post
Share on other sites

Nadie, esto sirve para que el no registrado,no vea los gastos de envio en el carrito central que te he preguntado antes?

 

Podría aparecer estas frases asi como las he puesto en naranja para los registrados,osea que indique IVA? :

 

Total productos con IVA:339,00 €

Total gastos de envío con IVA:6,95 €

Total IVA incluído:345,95 €

Share this post


Link to post
Share on other sites

Hay una forma muchísimo más sencilla de hacer todo esto:

 

Agrega un método de transporte que esa gratuito, por ejemplo puedes añadir como forma de envío la de "recogida en tienda" o "envío con portes debidos". Una vez creada y debidamente configurada, tienes que indicar que este método de envío es gratuito. Una vez hecho esto, simplemente tienes que decirle que este es el tipo de envío por defecto. Una vez que un usuario se registre, podrá ver el resto de métodos de envío que ofreces, incluido este que has creado y es la forma más fácil y efectiva de que los portes no aparezcan y no se sumen al total de la compra en un carrito. Por supuesto, también es la más legal y transparente para tus clientes.

 

Un saludo.

  • Like 1

Share this post


Link to post
Share on other sites

Símplemente era un ejemplo. Yo por ejemplo ese método de envío lo tengo porque lo utilizo, si tu no puedes o no te conviene utilizarlo una buena opción es la de "portes debidos", es decir, que el cliente pague diréctamente a la agencia de transporte.

 

¿Con que empresa de transporte trabajas?

Share this post


Link to post
Share on other sites

Cuando me refiero al tema de portes debidos, es porque el cliente tiene que abonar el porte a Seur en tu caso, como bien sabrás, al no tener cuenta el precio del transporte se dispara y el cliente preferirá pagarte a tí y seleccionará el transportista que tu le ofreces.

 

Los portes debidos es una muy buena opción, a clientes que no quieran trabajar con Seur les das la opción de ser ellos los que elijan el transportista y tu solo tendrás que preparar el paquete para que la agencia que él ha decidido pase a recogerlo. De todas formas, esto seguro de que el 99% de tus clientes optarán por pagar los portes en el momento de la compra y no al recibirlo.

 

Saludos.

  • Like 1

Share this post


Link to post
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More