Fires04 Posted April 25, 2019 Share Posted April 25, 2019 Hi , I need to add order total to my template but I can't figure out why it is not work. Template theme/xxx/templates/checkout/order-confirmation.tpl I print_r whole $order.details and see all variables what I want. So I try print required variables to page: {$order.details.payment} <- this works {$order.details.id_customer} <- this do NOT works {$order.details.total_paid_tax_incl} <- this do NOT works also All variables with no underscore character work good, all variables with underscore not works :( I need just add variable (total_paid_tax_incl) to theme page. Any advice ? thanks a lot guys Link to comment Share on other sites More sharing options...
tdsoft Posted April 25, 2019 Share Posted April 25, 2019 Are you sure Order.details have total_paid_tax_incl variable ? You can use statement to view all variables from $order.details {$order.details|var_dump} Link to comment Share on other sites More sharing options...
Fires04 Posted April 25, 2019 Author Share Posted April 25, 2019 58 minutes ago, tdsoft said: Are you sure Order.details have total_paid_tax_incl variable ? You can use statement to view all variables from $order.details {$order.details|var_dump} Hi, there is output of {$order.details|@print_r} Quote PrestaShop\PrestaShop\Adapter\Presenter\Order\OrderDetailLazyArray Object ( [order:PrestaShop\PrestaShop\Adapter\Presenter\Order\OrderDetailLazyArray:private] => Order Object ( [id_address_delivery] => 21013 [id_address_invoice] => 21013 [id_shop_group] => 1 [id_shop] => 1 [id_cart] => 1189 [id_currency] => 1 [id_lang] => 1 [id_customer] => 8673 [id_carrier] => 43 [current_state] => 10 [secure_key] => a69d00482b1df2d13bd9a424c3a71f08 [payment] => Platba bankovním převodem [module] => ps_wirepayment [conversion_rate] => 1.000000 [recyclable] => 0 [gift] => 0 [gift_message] => [mobile_theme] => 0 [shipping_number] => [total_discounts] => 0.000000 [total_discounts_tax_incl] => 0.000000 [total_discounts_tax_excl] => 0.000000 [total_paid] => 312.000000 [total_paid_tax_incl] => 312.000000 [total_paid_tax_excl] => 274.000000 [total_paid_real] => 0.000000 [total_products] => 179.000000 [total_products_wt] => 217.000000 [total_shipping] => 95.000000 [total_shipping_tax_incl] => 95.000000 [total_shipping_tax_excl] => 95.000000 [carrier_tax_rate] => 0.000 [total_wrapping] => 0.000000 [total_wrapping_tax_incl] => 0.000000 [total_wrapping_tax_excl] => 0.000000 [invoice_number] => 0 [delivery_number] => 0 [invoice_date] => 0000-00-00 00:00:00 [delivery_date] => 0000-00-00 00:00:00 [valid] => 0 [date_add] => 2019-04-25 08:00:32 [date_upd] => 2019-04-25 08:00:33 [reference] => 427-2019 [round_mode] => 2 [round_type] => 3 [webserviceParameters:protected] => Array ( [objectMethods] => Array ( [add] => addWs ) [objectNodeName] => order [objectsNodeName] => orders [fields] => Array ( [id_address_delivery] => Array ( [xlink_resource] => addresses ) [id_address_invoice] => Array ( [xlink_resource] => addresses ) [id_cart] => Array ( [xlink_resource] => carts ) [id_currency] => Array ( [xlink_resource] => currencies ) [id_lang] => Array ( [xlink_resource] => languages ) [id_customer] => Array ( [xlink_resource] => customers ) [id_carrier] => Array ( [xlink_resource] => carriers ) [current_state] => Array ( [xlink_resource] => order_states [setter] => setWsCurrentState ) [module] => Array ( [required] => 1 ) [invoice_number] => Array ( ) [invoice_date] => Array ( ) [delivery_number] => Array ( ) [delivery_date] => Array ( ) [valid] => Array ( ) [date_add] => Array ( ) [date_upd] => Array ( ) [shipping_number] => Array ( [getter] => getWsShippingNumber [setter] => setWsShippingNumber ) ) [associations] => Array ( [order_rows] => Array ( [resource] => order_row [setter] => [virtual_entity] => 1 [fields] => Array Link to comment Share on other sites More sharing options...
Fires04 Posted April 26, 2019 Author Share Posted April 26, 2019 Any knows? All data should be here available but I'm still unable to point why is not possible to print order total. Link to comment Share on other sites More sharing options...
silver Posted April 5, 2020 Share Posted April 5, 2020 Hello Have you solved your problem? If so, how? Link to comment Share on other sites More sharing options...
Luisandrea Posted June 4, 2020 Share Posted June 4, 2020 Hi! I have this same problem, not only in order confirmation, but in order detail table and detail by order. I could not find how to get the right variable to call the total with tax included, so I made a sum : I add this line {$line3 = $line.amount + $line3} and show in {$line3|string_format:"%.2f"} {l s=' $'} replacing $order.totals.total.label <tfoot> {foreach $order.subtotals as $line} {if $line.value} {$line3 = $line.amount + $line3} <tr class="text-right line-{$line.type}"> <td colspan="3">{$line.label}</td> <td class="price">{$line.value}</td> </tr> {/if} {/foreach} <tr class="text-right line-{$order.totals.total.type}"> <td colspan="3">{$order.totals.total.label}</td> <td class="price">{$line3|string_format:"%.2f"} {l s=' $'}</td> </tr> </tfoot> I would prefer the variable, but at the moment I could fix with this Link to comment Share on other sites More sharing options...
Luisandrea Posted June 4, 2020 Share Posted June 4, 2020 Hi! Me again. I just find this post https://www.prestashop.com/forums/topic/1012224-how-to-show-the-total-with-tax-in-the-order-history-any-variables/ In this post he change <tr class="text-right line-{$order.totals.total.type}"> <td colspan="3">{$order.totals.total.label}</td> <td>{$order.totals.total.value}</td> </tr> for <tr class="text-right line-{$order.totals.total.type}"> <td colspan="3">{$cart.totals.total_including_tax.label}</td> <td class="price">{$order.totals.total_paid.value}</td> </tr> Is more easy this one to modify Link to comment Share on other sites More sharing options...
thymus Posted June 8, 2020 Share Posted June 8, 2020 Correct variables required are... {$order.totals.total_including_tax.label} {$order.totals.total_including_tax.value} 1 Link to comment Share on other sites More sharing options...
ideaindividual Posted August 25, 2020 Share Posted August 25, 2020 On 8/6/2020 at 0:33, thymus said: Las variables correctas requeridas son ... {$ order.totals.total_including_tax.label} {$ order.totals.total_including_tax.value} Hola! Me funciono!!, una pregunta, solo de información, sabes como se crean esas variables? cual es la logica y porque funciona. Link to comment Share on other sites More sharing options...
Shwetab55 Posted March 19, 2021 Share Posted March 19, 2021 (edited) Hi, I'm using PS 1.7.5 I want to show id_order and one custom field to order history page. Template themes/xxx/templates/customer/history.tpl both the values are in ps_orders table, can someone please tell me how to get those values and show on the order-history page? I tried the following - $order.details.id_order but not working. Thanks in advance Edited March 19, 2021 by Shweta Bhatia (see edit history) 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