@@ -63,9 +63,12 @@ public function run()
6363 $ gaTagHandler = new GanalyticsJsHandler ($ this ->module , $ this ->context );
6464 $ productWrapper = new ProductWrapper ($ this ->context );
6565
66+ // Prepare currency information
67+ $ currency = new Currency ((int ) $ order ->id_currency );
68+
6669 // Add payment data
6770 $ eventData = [
68- 'currency ' => $ this -> context -> currency ->iso_code ,
71+ 'currency ' => $ currency ->iso_code ,
6972 'payment_type ' => $ order ->payment ,
7073 ];
7174 $ gaScripts = $ this ->module ->getTools ()->renderEvent (
@@ -76,13 +79,13 @@ public function run()
7679 // Prepare transaction data
7780 $ transaction = [
7881 'id ' => (int ) $ order ->id ,
79- 'affiliation ' => ( Shop::isFeatureActive () ) ? $ this ->context ->shop ->name : Configuration::get ('PS_SHOP_NAME ' ),
82+ 'affiliation ' => Shop::isFeatureActive () ? $ this ->context ->shop ->name : Configuration::get ('PS_SHOP_NAME ' ),
8083 'revenue ' => (float ) $ order ->total_paid ,
8184 'shipping ' => (float ) $ order ->total_shipping ,
8285 'tax ' => (float ) $ order ->total_paid_tax_incl - $ order ->total_paid_tax_excl ,
8386 'url ' => $ this ->context ->link ->getModuleLink ('ps_googleanalytics ' , 'ajax ' , [], true ),
8487 'customer ' => (int ) $ order ->id_customer ,
85- 'currency ' => $ this -> context -> currency ->iso_code ,
88+ 'currency ' => $ currency ->iso_code ,
8689 ];
8790
8891 // Prepare order products
0 commit comments