Jump to content

Ajouter récapitulatif commande sur order-confirmation.tpl


Recommended Posts

Bonjour à tous,
 
Je cherche à ajouter sur le fichier order-confirmation.tpl le récapitulatif de la commande qui vient d'être enregistrée.
 
J'arrive à récupérer le contenu du panier, mais le montant est toujours à zéro.
 
J'ai inséré le code suivant dans order-confirmation.tpl :
 

<h1 id="cart_title" style="font-size:18px">{l s='Rappel de ma commande'}</h1>
        <div id="votre_commande">
            <p class="merci">Merci pour votre commande  {$id_order} d'un montant de <strong>{displayPrice price=$total_price}</strong> payé par CB.</p>
    <div id="votre_commande">
    <table id="cart_resume">
        {foreach from=$products item=product name=productLoop}
            <tr>
                <td class="img_produit"><a 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, 'home')}" alt="{$product.name|escape:'htmlall':'UTF-8'}" width="60" height="60" /></a></td>
                <td class="description_produit">
                <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}
                <br /><span class="quantite_produit">[spam-filter]l s='Quantity :'[spam-filter] 
                    <span class="laquantite" id="laquantite_{$product.id_product}_{$product.id_product_attribute}">
                {if isset($customizedDatas.$productId.$productAttributeId) AND $quantityDisplayed == 0}{$product.customizationQuantityTotal}{/if}
                {if !isset($customizedDatas.$productId.$productAttributeId) OR $quantityDisplayed > 0}
                {if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}{$customizedDatas.$productId.$productAttributeId|@count}{else}{$product.cart_quantity-$quantityDisplayed}{/if}
                    </span>
                    {assign var='price_gen' value=$link->getPriceGenProduct($product.id_product,$product.id_product_attribute)}
                    {if $price_gen > $product.price}
                        {assign var='reducDiff' value=($price_gen-$product.price)}
                        <input type="hidden" class="economie_real2" id="economie_real_{$product.id_product}_{$product.id_product_attribute}" value="{$reducDiff}" />
                    {/if}
                {/if}
                </span>
                </td>
                <td class="montant_produit">
                {if $quantityDisplayed == 0 AND isset($customizedDatas.$productId.$productAttributeId)}
                {if !$priceDisplay}{displayPrice price=$product.total_customization_wt}{else}{displayPrice price=$product.total_customization}{/if}
                {else}
                    {if !$priceDisplay}{displayPrice price=$product.total_wt}{else}{displayPrice price=$product.total}{/if}
                {/if}
                </td>
            </tr>
        {/foreach}
        
        {assign var='price_gen_total' value=$link->getPriceGenTotal()}
        {if $price_gen_total > 0}
        <tr class="eco_real">
            <!--<td colspan="1"></td>-->
            <td colspan="3" style="white-space: normal;">{l s='Economie realisee sur l ensemble de votre commande soit :'} <strong id="idecoreal2">{displayPrice price=$price_gen_total}</strong></td>
        </tr>
        {/if}
        
        <tr class="cart_total_delivery_gratuit"{if $shippingCost > 0} style="display:none;"{/if}>
            <td colspan="3">{l s='Participation aux frais de preparation et de livraison'}{l s=':'} <strong>Gratuit!</strong></td>
        </tr>
        
        <tr class="cart_free_shipping" {if $free_ship <= 0 || $isVirtualCart} style="display: none;" {/if}>
            <td colspan="3">
                <p>Il vous manque <strong id="free_shipping" class="price">{displayPrice price=$free_ship}</strong> pour profiter de la LIVRAISON OFFERTE</p>
            </td>
        </tr>
        
        {if $use_taxes}
            {if $priceDisplay}
                <tr class="cart_total_delivery" {if $shippingCost <= 0} style="display:none;"{/if}>
                    <td colspan="3">{l s='Participation aux frais de preparation et de livraison'}{l s=':'} <strong id="total_shipping">{displayPrice price=$shippingCostTaxExc}</strong></td>
                </tr>
            {else}
                <tr class="cart_total_delivery"{if $shippingCost <= 0} style="display:none;"{/if}>
                    <td colspan="3">{l s='Participation aux frais de preparation et de livraison'}{l s=':'} <strong id="total_shipping">{displayPrice price=$shippingCost}</strong></td>
                </tr>
            {/if}
        {else}
            <tr class="cart_total_delivery"{if $shippingCost <= 0} style="display:none;"{/if}>
                <td colspan="3">{l s='Participation aux frais de preparation et de livraison'}{l s=':'} <strong id="total_shipping">{displayPrice price=$shippingCostTaxExc}</strong></td>
            </tr>
        {/if}
        
        <tr class="cart_total_voucher" {if $total_discounts == 0}style="display: none;"{/if}>
            <td colspan="3">
            {if $use_taxes}
                {if $priceDisplay}
                    {l s='Total vouchers'} {l s=':'}
                {else}
                    {l s='Total vouchers'} {l s=':'}
                {/if}
            {else}
                {l s='Total vouchers:'}
            {/if}
            <strong>
            {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}
            </strong>
            </td>
        </tr>
        <tr class="cart_total_voucher" {if $total_wrapping == 0}style="display: none;"{/if}>
            <td colspan="3">
            {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}
            <strong>
            {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}
            </strong>
            </td>
        </tr>
        
        
        {if $use_taxes}
        <tr class="cart_total_price">
            <!--<td colspan="1"></td>-->
            <td colspan="2"><span id="lib_lettc">{l s='Total (tax incl.):'}</span></td>
            <td colspan="1" class="price" id="total_price">{displayPrice price=$total_price}</td>
        </tr>
        {else}
        <tr class="cart_total_price">
            <!--<td colspan="1"></td>-->
            <td colspan="2">{l s='Total:'}</td>
            <td colspan="1" class="price" id="total_price">{displayPrice price=$total_price_without_tax}</td>
        </tr>
        {/if}
        
    </table>
    </div>

Si quelqu'un peux me dire ce qu'il me manque ce serait super.

 

Merci d'avance à tous ceux qui regarderont.

 

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...