Jump to content
  • 0

Prestashop 1.7 zmienne do skryptu


dsxsoft

Question

Dzień dobry potrzebuje wyciągnąć zmienne do js który to synchronizuje z zewnętrznym systemem marketingowym. Zmienne które potrzebuje to numer zamówienia, ilość produktów, id zakupionych produktów oraz sumę zamówienie brutto bez dostawy. 

 

Puki co testuję i myślę żeby to wrzucić do końcowej strony zamówienia podsumowania. ~/order-confirmation.tpl

 

Dumpuje sobie zmienne dla testów ale ciągle otrzymuje nieporawne dane lub wartości null. 

 

{$order.details['reference']|var_dump} zamiast numery zamówienia typu 23463 otrzymuje?

array(2) { ["tax_short"]=> string(8) "(brutto)" ["tax_long"]=> string(8) "(brutto)" } string(5) "23463"

{$order.totals.total.amount|var_dump}

Otrzymuje całkowitą sumę wraz z dostawą...

{$order.subtotals|var_dump} otrzymuje 

 

object(PrestaShop\PrestaShop\Adapter\Presenter\Order\OrderSubtotalLazyArray)#204 (9) { ["order":"PrestaShop\PrestaShop\Adapter\Presenter\Order\OrderSubtotalLazyArray":private]=> object(Order)#186 (67) { ["id_address_delivery"]=> string(5) "43068" ["id_address_invoice"]=> string(5) "43068" ["id_shop_group"]=> string(1) "1" ["id_shop"]=> string(1) "1" ["id_cart"]=> string(5) "60113" ["id_currency"]=> string(1) "1" ["id_lang"]=> string(1) "1" ["id_customer"]=> string(5) "23387" ["id_carrier"]=> string(3) "214" ["current_state"]=> string(1) "9" ["secure_key"]=> string(32) "ec11ee675d89334490811487e0b6bc5f" ["payment"]=> string(25) "Płatność przy odbiorze" ["module"]=> string(17) "ps_cashondelivery" ["conversion_rate"]=> string(8) "1.000000" ["recyclable"]=> string(1) "0" ["gift"]=> string(1) "0" ["gift_message"]=> string(0) "" ["mobile_theme"]=> string(1) "0" ["shipping_number"]=> string(0) "" ["total_discounts"]=> string(8) "0.000000" ["total_discounts_tax_incl"]=> string(8) "0.000000" ["total_discounts_tax_excl"]=> string(8) "0.000000" ["total_paid"]=> string(10) "101.940000" ["total_paid_tax_incl"]=> string(10) "101.940000" ["total_paid_tax_excl"]=> string(9) "82.880000" ["total_paid_real"]=> string(10) "101.940000" ["total_products"]=> string(9) "62.560000"..............

w tym interesuje mnie ["total_paid_tax_excl"]=> string(9) "82.880000" TU MAM KWOTE SAMYCH PRODUKTÓW z TAX bez WYSYŁKI

Jak dumpuje {$order.subtotals["total_paid_tax_excl"]|var_dump}

lub

{$order.subtotals['total_paid_tax_excl']|var_dump}

 

To otrzymuje null Jak mogę wyciągnąć te wartość? oraz pozostałe?

 

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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...