kayako Posted January 31, 2010 Report Share Posted January 31, 2010 Hallo liebe Community, bisher habe ich mit meinen beschränkten php Kenntnissen immer selbst alles geschafft, aber nun brauche ich wohl Hilfe vom Profi Also ich verwende den Shopzilla Performance (ROI) Tracker in meinem Shop. Dort müssen einige Daten übergeben werden. Unter anderem: Die Bestellungsanzahl (var units_ordered) Beispiel: Jemand bestellt 2x Äpfel und 2x Birnen Bei Bestellungsanzahl müsste nun eine 4 eingetragen werden. Das alles wird per JavaScript übergeben und kann durch eine simple echo $bestellanzahl; Anweisung eingetragen werden. Problem ist nur das ich net weiß wie ich an diese zahl komme. Vielleicht hat ja jemand eine gute Idee Kundentyp = neu-oder bestehender Kunde (var cust_type) Das Feld kann ich auch nicht füllen. Weil sobald ein Kunde was bestellt ist er ja automatisch bestehender Kunde oder nicht? Neuer Kunde = 1 Bestehender Kunde = 0 Wäre wirklich klasse wenn mir jemand helfen könnte. Schonmal vielen vielen Dank im Voraus. LG Michael Link to comment Share on other sites More sharing options...
Mr. Joki Posted September 9, 2011 Report Share Posted September 9, 2011 Hallo, würde gerne nochmals das "Problem" von Michael aufgreifen. Kann uns denn niemand mitteilen, welche Variablen wir nehmen müssen, wenn wir bei den Roi Tracker z.B. von Shopzilla.de, Shopping.com, Nextag.de oder ähnlich folgende Werte eintragen sollten? Bestellwert / Gesamtsumme der Bestellungen Auftrags-ID / Order-ID Produktname Die Bestellungsanzahl Es gibt da noch weitere Daten, aber ich denke das wären mal die wichtigsten. Evtl. hat das ja schon mal jemand in seinem Shop eingetragen, wäre schön wenn man das veröffentlichen könnte. Vielleicht kann uns ja auch ein Erfahrener Benutzer weiterhelfen :-) Vielen Dank vorab. Gruß Joki Link to comment Share on other sites More sharing options...
Pawhi Posted September 27, 2011 Report Share Posted September 27, 2011 Ich würde gerne wissen, wie ihr den Shopzilla Tracking Code einbindet in die checkout_success ohne dabei das Template zu zerschießen? Als Gegenleistung hier die Variable $success_order. Hier könnt ihr euch raussuchen was ihr braucht! Quantity etc... order Object ( [customer] => 2 [oID] => 1 [order_customer] => Array ( [customers_id] => 2 [external_id] => [customers_cid] => [customers_vat_id] => [email protected] [customers_vat_id_status] => 0 [customers_status] => 2 [customers_email_address] => [email protected] [account_type] => 0 [password_request_key] => xxxxxxxxxxxxxxx [payment_unallowed] => NULL [shipping_unallowed] => NULL [date_added] => 2010-04-30 00:00:00 [last_modified] => 2011-02-04 15:16:53 [shop_id] => 1 [customers_default_currency] => EUR [customers_default_language] => de [campaign_id] => 0 [allow_newsletter] => 1 [affiliate_referrer] => [affiliate_date] => [affiliate_duration] => [customers_age] => 9 [customers_dob] => 02.02.2002 ) [order_data] => Array ( [orders_id] => 2222 [customers_id] => 2 [customers_cid] => [customers_vat_id] => [email protected] [customers_status] => 2 [customers_email_address] => [email protected] [delivery_gender] => m [delivery_phone] => [delivery_fax] => [email protected] [delivery_firstname] => Peter [delivery_lastname] => Muster [delivery_company] => [delivery_company_2] => [delivery_company_3] => [delivery_street_address] => Musterstr.1 [delivery_suburb] => [delivery_city] => Musterstadt [delivery_postcode] => 00000 [delivery_zone] => 31 [delivery_zone_code] => [delivery_country] => Deutschland [delivery_country_code] => DE [delivery_address_book_id] => 2 [billing_gender] => m [billing_phone] => [billing_fax] => [email protected] [billing_firstname] => Peter [billing_lastname] => Muster [billing_company] => [billing_company_2] => [billing_company_3] => [billing_street_address] => Musterstr.1 [billing_suburb] => [billing_city] => Musterstadt [billing_postcode] => 00000 [billing_zone] => 31 [billing_zone_code] => [billing_country] => Deutschland [billing_country_code] => DE [billing_address_book_id] => 2 [payment_code] => xt_prepayment [subpayment_code] => [shipping_code] => Standard [currency_code] => EUR [currency_value] => 1.0000 [language_code] => de [comments] => [last_modified] => 2011-09-27 18:42:51 [date_purchased] => 27.09.2011 [orders_status] => Offen [orders_date_finished] => [account_type] => 0 [allow_tax] => 1 [customers_ip] => xx.xx.xxx.xx [shop_id] => 1 [orders_data] => [awake_id] => 0 [campaign_id] => 0 [cleverreach_id] => 0 [allow_newsletter] => 1 [comments2] => [tduid] => [date_purchased_plain] => 2011-09-27 18:42:51 ) [order_products] => Array ( [0] => Array ( [orders_products_id] => 18889 [orders_id] => 2222 [products_id] => 222 [products_model] => 1111 [products_name] => Testprodukt Standard [products_price] => Array ( [formated] => 12,95 € [plain] => 12.95 [plain_otax] => 10.5285 ) [products_discount] => [products_tax] => Array ( [formated] => 2,42 € [plain] => 2.421555 [plain_otax] => 0 ) [products_tax_class] => 1 [products_quantity] => 1.00 [products_data] => [allow_tax] => 1 [products_shipping_time] => [products_add_price] => Array ( [formated] => 0,00 € [plain] => 0 [plain_otax] => 0 ) [products_final_price] => Array ( [formated] => 12,95 € [plain] => 12.95 [plain_otax] => 10.5285 ) [products_tax_rate] => 23 [products_final_tax] => Array ( [formated] => 2,42 € [plain] => 2.421555 [plain_otax] => 0 ) [add_Muster_tax] => Array ( [formated] => 0,00 € [plain] => 0 [plain_otax] => 0 ) ) ) [order_total_data] => Array ( [0] => Array ( [orders_total_id] => 2222 [orders_id] => 2222 [orders_total_key] => shipping [orders_total_key_id] => 1 [orders_total_model] => Standard [ orders_total_name] => Versicherter Versand [orders_total_price] => Array ( [formated] => 5,90 € [plain] => 5.9 [plain_otax] => 4.7967 ) [orders_total_tax] => Array ( [formated] => 1,10 € [plain] => 1.103241 [plain_otax] => 0 ) [orders_total_tax_class] => 1 [orders_total_quantity] => 1.00 [allow_tax] => 1 [orders_total_final_price] => Array ( [ formated] => 5,90 € [plain] => 5.9 [plain_otax] => 4.7967 ) [orders_total_tax_rate] => 23 [orders_total_final_tax] => Array ( [formated] => 1,10 € [plain] => 1.103241 [plain_otax] => 0 ) ) ) [order_total] => Array ( [product_tax] => Array ( [1] => Array ( [tax_value] => Array ( [formated] => 2,42 € [plain] => 2.421555 [plain_otax] => 0 ) [tax_key] => 23 ) ) [product_total] => Array ( [formated] => 12,95 € [plain] => 12.95 [plain_otax] => 0 ) [product_total_otax] => Array ( [formated] => 10,53 € [plain] => 10.5285 [plain_otax] => 0 ) [product_tax_rate] => Array ( [1] => 23 ) [data_tax] => Array ( [1] => Array ( [tax_value] => Array ( [formated] => 1,10 € [plain] => 1.103241 [plain_otax] => 0 ) [tax_key] => 23 ) ) [data_total] => Array ( [formated] => 5,90 € [plain] => 5.9 [plain_otax] => 0 ) [data_total_otax] => Array ( [formated] => 4,80 € [plain] => 4.7967 [plain_otax] => 0 ) [data_tax_rate] => Array ( [1] => 23 ) [total_tax] => Array ( [1] => Array ( [tax_value] => Array ( [formated] => 3,52 € [plain] => 3.524796 [plain_otax] => 0 ) [tax_key] => 23 ) ) [total] => Array ( [formated] => 18,85 € [plain] => 18.85 [plain_otax] => 0 ) [total_otax] => Array ( [formated] => 15,33 € [plain] => 15.3252 [plain_otax] => 0 ) [total_tax_rate] => Array ( [1] => 23 [/PHP] Ok konnte das ganze mit {literal} {/literal} einbinden nur kommt man in Smarty schwerer an die Variablen. Wenn man in den Hook PHP schieß ist es einfacher. So gehts schonmal nicht: [PHP] {literal} <script language="javascript"> <!-- /* Performance Tracking Data */ var mid = '00000'; var cust_type = ''; var order_value = '{/literal}{php} echo $total_net{/php}{literal}'; var order_id = '{/literal}{php} echo $success_order->order_data['orders_id']{/php}{literal}'; var units_ordered = ''; //--> </script>{/literal}[/PHP] Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.