dsgnmind Posted November 23, 2013 Share Posted November 23, 2013 (edited) We have our site up and running (but not officially launched) and while the check-out process itself is fine we have a completely non-consistent order summery from one page/invoice to the next. You will see in the .jpg that the way the order summery (on the shopping cart page) order summer (on the payment page) order history (after order) on the 'details' page and the generated .pdf invoice as well as the e-mail invoice ALL use different calculations and formats and even headings. ITS ALL VERY CONFUSING and should all just be the same. Our preference would simply to be this: (the voucher showing the total discount plus shipping is fine in this case it is $7.10) Total Products: $3.00 Product voucher discount: -$1.50 Total Tax: $0.13 Total Shipping: FREE! Total: $1.63 The first part is that I need to know what files control each of the (5) different outputs. If you can point me where to edit, at least that is a start. Then if you know what exactly I need to edit - that would be even great!!! Thanks!! Edited November 24, 2013 by dsgnmind (see edit history) Link to comment Share on other sites More sharing options...
dsgnmind Posted November 24, 2013 Author Share Posted November 24, 2013 (edited) Any help with the following changes would be brilliant!! 1) Order Summery (Root/themes/your-theme/shopping-cart.tpl) This layout is fine. Would in the future like shipping to say 'FREE!' when the voucher includes free shipping. 2) Payment Summery (Root/modules/egrpaypalpaymentsadvanced/confirm-payment.tpl) i TRUMPED THIS BY DELETING THE TABLE AND LEAVING JUST THE TOTAL. 3a) Root/themes/your-theme/order-detail.tpl Again, just want to match the others Need to remove 'tax excl.' from Total Products (can do this with translations i guess) Remove Total products (tax incl.) ADD line for tax Here is what I believe is the potion of code for those changes: {if $priceDisplay && $use_tax} <tr class="item"> <td colspan="{if $return_allowed || $order->hasProductReturned()}{if $order->hasProductReturned() && $return_allowed}7{else}6{/if}{else}5{/if}"> {l s='Total products (tax excl.):'} <span class="price">{displayWtPriceWithCurrency price=$order->getTotalProductsWithoutTaxes() currency=$currency}</span> </td> </tr> {/if} <tr class="item"> <td colspan="{if $return_allowed || $order->hasProductReturned()}{if $order->hasProductReturned() && $return_allowed}7{else}6{/if}{else}5{/if}"> {l s='Total products'} {if $use_tax}{l s='(tax incl.)'}{/if}: <span class="price">{displayWtPriceWithCurrency price=$order->getTotalProductsWithTaxes() currency=$currency}</span> </td> </tr> {if $order->total_discounts > 0} <tr class="item"> <td colspan="{if $return_allowed || $order->hasProductReturned()}{if $order->hasProductReturned() && $return_allowed}7{else}6{/if}{else}5{/if}"> {l s='Total vouchers:'} <span class="price-discount">{displayWtPriceWithCurrency price=$order->total_discounts currency=$currency convert=1}</span> </td> </tr> {/if} {if $order->total_wrapping > 0} <tr class="item"> <td colspan="{if $return_allowed || $order->hasProductReturned()}{if $order->hasProductReturned() && $return_allowed}7{else}6{/if}{else}5{/if}"> {l s='Total gift-wrapping:'} <span class="price-wrapping">{displayWtPriceWithCurrency price=$order->total_wrapping currency=$currency}</span> </td> </tr> {/if} <tr class="item"> <td colspan="{if $return_allowed || $order->hasProductReturned()}{if $order->hasProductReturned() && $return_allowed}7{else}6{/if}{else}5{/if}"> {l s='Total shipping'} {if $use_tax}{l s='(tax incl.)'}{/if}: <span class="price-shipping">{displayWtPriceWithCurrency price=$order->total_shipping currency=$currency}</span> </td> </tr> <tr class="totalprice item"> <td colspan="{if $return_allowed || $order->hasProductReturned()}{if $order->hasProductReturned() && $return_allowed}7{else}6{/if}{else}5{/if}"> {l s='Total:'} <span class="price">{displayWtPriceWithCurrency price=$order->total_paid currency=$currency}</span> </td> </tr> </tfoot> </table> </div> 3b)Root/classes/PDF.php I image that the code change for the above might be the same for the invoice to reflect the same info in PDF.php? 4) BO>Translations>E-mailtemplatetranslations I will work on this. Edited November 26, 2013 by dsgnmind (see edit history) Link to comment Share on other sites More sharing options...
dsgnmind Posted November 25, 2013 Author Share Posted November 25, 2013 (edited) UPDATE ON #4 (In essence want to replace the gift wrapping line item with the tax on the e-mail conf) I added this to Payment_Module.php '{total_tax}' => Tools::displayPrice($order$->total_tax, $this->context->currency, false)); And added {total_tax} where I wanted it to show up on the e-mail, but not getting anything. Edited November 26, 2013 by dsgnmind (see edit history) Link to comment Share on other sites More sharing options...
tuk66 Posted November 26, 2013 Share Posted November 26, 2013 I would avoid vouchers if you can. Vouchers (and sometimes discounts) cause problems in calculations (invoice and email). Are you using the last version of PrestaShop? Link to comment Share on other sites More sharing options...
dsgnmind Posted November 27, 2013 Author Share Posted November 27, 2013 We are running 1.5.3.1 as the site was built when that came out, at this point i'm afraid it will have to stick. Too many small changes on files. What do you mean invoice and email calc problems? I've been trying to add sales tax to the e-mail confirmation but it doesn't want to stick. If I replace in the order_conf.html and {value} that is defined in classes/PaymentModule.php and already in use on the e-mail it will duplicate the value but even if I put a different {values} not currently being used on the order_conf.html it just pops up in the e-mail as hard text. Link to comment Share on other sites More sharing options...
tuk66 Posted November 27, 2013 Share Posted November 27, 2013 I have analyzed invoices a bit - http://www.prestashop.com/forums/topic/166816-pdf-invoice-in-different-prestashop-versions-wrong-amounts-updated/ Link to comment Share on other sites More sharing options...
dsgnmind Posted November 27, 2013 Author Share Posted November 27, 2013 I haven't come across any irregularities yet as far as calculations. All I really want to do here is add to the e-mail confirmation the sales tax as a separate line item OR make it match the INVOICE / DETAILS output. Link to comment Share on other sites More sharing options...
dsgnmind Posted November 27, 2013 Author Share Posted November 27, 2013 adding tax to e-mail confirmation isn't taking. I followed: https://github.com/PrestaShop/PrestaShop/commit/d8f5caee7b8af096d2a0dc73ddf22d031abdf355 but yet I get this (see attached jpg) any ideas? Link to comment Share on other sites More sharing options...
tuk66 Posted November 27, 2013 Share Posted November 27, 2013 You have no {total_tax_paid} value created in code and available in the email template. Link to comment Share on other sites More sharing options...
dsgnmind Posted November 27, 2013 Author Share Posted November 27, 2013 forgot about PaymentModule.php in the overide classes folder... I get a number now - but it is not the correct number. It is the tax before voucher when I need the tax AFTER voucher. This is also an issue on the Order Details and the Invoice calculations. for those two how can I change <tr class="item"> <td colspan="{if $return_allowed || $order->hasProductReturned()}{if $order->hasProductReturned() && $return_allowed}7{else}6{/if}{else}5{/if}"> {l s='Total products'} {if $use_tax}{l s='(tax incl.)'}{/if}: <span class="price">{displayWtPriceWithCurrency price=$order->getTotalProductsWithTaxes() currency=$currency}</span> </td> </tr> to show the correct tax? The goal is to get all of this to show exactly as it does on the cart summary. Total Products (no tax) - Vouchers Plus Tax Plus Shipping = Total Even though the MATH is correct for the total the displays are confusing. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now