rlodiaz Posted March 10, 2014 Share Posted March 10, 2014 Hola a todos, Estoy acabando de montar una tienda online y me acabo de percatar de un problema en las facturas. El problema en cuestión viene cuando quiero que el transporte sea gratis. Ya sea para un producto en cuestión o para toda la cesta cuando se genera la factura en el apartado de "total cupones" de la factura aparece descontado el valor del transporte x 2. Supongo que se debe a algun error en el código de la plantilla, es por ello que os adjunto la parte de código que creo que habría que cambiar para ver si alguien me puede decir dónde esta el problema. Adjunto también un ejemplo de factura para que veáis mas claro el problema. Gracias por adelantado. Código: <!-- CART RULES --> {assign var="shipping_discount_tax_incl" value="0"} {foreach $cart_rules as $cart_rule} {cycle values='#FFF,#DDD' assign=bgcolor} <tr style="line-height:6px;background-color:{$bgcolor};" text-align="left"> <td colspan="{if !$tax_excluded_display}5{else}4{/if}">{$cart_rule.name}</td> <td> {if $cart_rule.free_shipping} {assign var="shipping_discount_tax_incl" value=$order_invoice->total_shipping_tax_incl} {/if} {if $tax_excluded_display} - {$cart_rule.value_tax_excl} {else} - {$cart_rule.value} {/if} </td> </tr> {/foreach} <!-- END CART RULES --> </table> <table style="width: 100%"> {if (($order_invoice->total_paid_tax_incl - $order_invoice->total_paid_tax_excl) > 0)} <tr style="line-height:5px;"> <td style="width: 80%; text-align: right; font-weight: bold">{l s='Product Total (Tax Excl.)' pdf='true'}</td> <td style="width: 20%; text-align: right;">{displayPrice currency=$order->id_currency price=$order_invoice->total_products}</td> </tr> {else} {/if} {if $order_invoice->total_discount_tax_incl > 0} <tr style="line-height:5px;"> <td style="text-align: right; font-weight: bold">{l s='Total Vouchers' pdf='true'}</td> <td style="width: 20%; text-align: right;">-{displayPrice currency=$order->id_currency price=($order_invoice->total_discount_tax_incl + $shipping_discount_tax_incl)}</td> </tr> {/if} {if $order_invoice->total_wrapping_tax_incl > 0} <tr style="line-height:5px;"> <td style="text-align: right; font-weight: bold">{l s='Wrapping Cost' pdf='true'}</td> <td style="width: 20%; text-align: right;"> {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_invoice->total_wrapping_tax_excl} {else} {displayPrice currency=$order->id_currency price=$order_invoice->total_wrapping_tax_incl} {/if} </td> </tr> {/if} {if $order_invoice->total_shipping_tax_incl > 0} <tr style="line-height:5px;"> <td style="text-align: right; font-weight: bold">{l s='Shipping Cost' pdf='true'}</td> <td style="width: 20%; text-align: right;"> {if $tax_excluded_display} {displayPrice currency=$order->id_currency price=$order_invoice->total_shipping_tax_excl} {else} {displayPrice currency=$order->id_currency price=$order_invoice->total_shipping_tax_incl} {/if} </td> </tr> {/if} {if ($order_invoice->total_paid_tax_incl - $order_invoice->total_paid_tax_excl) > 0} <tr style="line-height:5px;"> <td style="text-align: right; font-weight: bold">{l s='Total Tax' pdf='true'}</td> <td style="width: 20%; text-align: right;">{displayPrice currency=$order->id_currency price=($order_invoice->total_paid_tax_incl - $order_invoice->total_paid_tax_excl)}</td> </tr> {/if} <tr style="line-height:5px;"> <td style="text-align: right; font-weight: bold; font-size:14pt">{l s='Total' pdf='true'}</td> <td style="width: 20%; text-align: right; font-size: 14pt; font-weight: bold">{displayPrice currency=$order->id_currency price=$order_invoice->total_paid_tax_incl}</td> </tr> </table> Link to comment Share on other sites More sharing options...
Recommended Posts