This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 4.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 8.8 KiB |
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<module>
|
||||
<name>twenga</name>
|
||||
<displayName>Twenga API</displayName>
|
||||
<version>1.5</version>
|
||||
<description>Module role: export of your products on Twenga and installation of the sales tracking brought by Twenga (requires to sign up to Twenga)</description>
|
||||
<author></author>
|
||||
<tab>smart_shopping</tab>
|
||||
<is_configurable>1</is_configurable>
|
||||
<need_instance>1</need_instance>
|
||||
<limited_countries></limited_countries>
|
||||
</module>
|
||||
@@ -1,94 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{twenga}prestashop>twenga_400b0c914f01bcecf50b936e652695b2'] = 'Twenga API';
|
||||
$_MODULE['<{twenga}prestashop>twenga_64ef67f03ba236aef261078101017d57'] = 'Modul Rolle: Export Ihrer Produkte auf Twenga und Installation der Umsatz Verfolgung von Twenga gebracht (benötigt, um sich auf Twenga)';
|
||||
$_MODULE['<{twenga}prestashop>twenga_2034864b8a4fce12f3621b7ec8912e95'] = 'Das Twenga-Modul funktioniert nur in bestimmten Ländern (ISO-Code-Liste:';
|
||||
$_MODULE['<{twenga}prestashop>twenga_bcfaccebf745acfd5e75351095a5394a'] = 'Deaktivieren';
|
||||
$_MODULE['<{twenga}prestashop>twenga_526d688f37a86d3c3f27d0c5016eb71d'] = 'Reset';
|
||||
$_MODULE['<{twenga}prestashop>twenga_a27dfe771799a09fd55fea73286eb6ab'] = 'Deinstallieren';
|
||||
$_MODULE['<{twenga}prestashop>twenga_f2a6c498fb90ee345d997f888fce3b18'] = 'Löschen';
|
||||
$_MODULE['<{twenga}prestashop>twenga_bf4510198726bc0736e7705e10fffd8b'] = 'Falls Sie bei Twenga angemeldet sind, ist die Aktivierung dieses Moduls obligatorisch. ';
|
||||
$_MODULE['<{twenga}prestashop>twenga_9d156e107098a77332f309c765b72b9c'] = 'Sollte das Modul dennoch nicht funktionieren, desinstallieren Sie das Modul, installieren Sie die neueste Version hier und tragen Sie Ihren Twenga Hashkey und Login ein. ';
|
||||
$_MODULE['<{twenga}prestashop>twenga_a9d7299384e1f3fc346790328ffa8ac3'] = 'Um sich abzumelden oder für Fragen, kontaktieren Sie Twenga über Ihr Konto.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_fb3ecfb2800400fb01b0bfd39903e9fb'] = 'Neueste version';
|
||||
$_MODULE['<{twenga}prestashop>twenga_ea4788705e6873b424c65e91c2846b19'] = 'Abbrechen';
|
||||
$_MODULE['<{twenga}prestashop>twenga_69e591b18e717d483dbaa8e3ce89ce59'] = 'Parameter sind nicht erlaubt (siehe Details):';
|
||||
$_MODULE['<{twenga}prestashop>twenga_75a462904fadc0cc16d084efaef4a9d0'] = 'Ein Fehler ist bei der Twenga API-Methode aufgetreten (siehe Details):';
|
||||
$_MODULE['<{twenga}prestashop>twenga_7edef656ee9e8861e734336a7adba650'] = 'Ihr HashKey ist nicht gültig. Bitte überprüfen Sie die von Twenga gesendete Mail.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_3e6f1d35bdb6d0721c83c0a3f48ae345'] = 'Ihr Benutzername ist nicht gültig. Bitte überprüfen Sie die von Twenga gesendete Mail.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_19183e4de8ddfa3e032c112ba45fdc13'] = 'Ihr Kennwort ist nicht gültig. Bitte überprüfen Sie die von Twenga gesendete Mail.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_802b207b05fe5cea22e11b9db804b33d'] = 'Ihre Authentifizierung ist fehlgeschlagen.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_6702ebde453c9145652c0b007489904c'] = 'Überprüfen Sie die von Twenga gesendete Mail nach Anmeldung. Wenn immer noch Fehler auftreten, wenden Sie sich an den Twenga Service.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_ddedf0f7b923553ef46616375e521381'] = 'Fehler bei Parameterübergabe zu Twenga API aufgetreten';
|
||||
$_MODULE['<{twenga}prestashop>twenga_94a3b708cddc22d83742fdbd0a8970d7'] = 'Ihr Standard-Land';
|
||||
$_MODULE['<{twenga}prestashop>twenga_1f75825a8f4b083cbed0f95efc09abfd'] = 'Bitte wählen Sie eines dieser Länder von Twenga verfügbar genehmigt';
|
||||
$_MODULE['<{twenga}prestashop>twenga_3ea33020a5535b0157de47e53e463633'] = 'Folgen Sie diesem Link, um das Land ändern';
|
||||
$_MODULE['<{twenga}prestashop>twenga_5d79ec5a879860ff8546580001fe80ee'] = 'Bitte aktivieren Sie die PHP-Erweiterung \"curl\" zur Nutzung der Twenga Webservice Bibliothek';
|
||||
$_MODULE['<{twenga}prestashop>twenga_5f77daeb6fc30c87e051e5b5d11b034c'] = 'Einige Fehler traten beim Anmelde-Link des Twenga API auf:';
|
||||
$_MODULE['<{twenga}prestashop>twenga_da8ac71ff9563d9a5dd0f8894c8bc0ac'] = 'Listen Sie Ihre Produkte auf Twenga.de und verfolgen Sie die von Twenga generierten Verkäufe';
|
||||
$_MODULE['<{twenga}prestashop>twenga_0ed6e223384a822859461ca6bab72256'] = 'Sie sind schon bei Twenga Ready to Sell angemeldet ? ';
|
||||
$_MODULE['<{twenga}prestashop>twenga_63f97ef2cb80a6cf0a8fa98453577601'] = 'Schritt 1 : Kopieren Sie Ihren Twenga Hashkey, den Sie per Email von Twenga erhalten haben oder in Ihrem Twenga Ready to Sell Konto unter (tools>tracking>hashkey) finden. Klicken auch auf \"Test das Tracking\".';
|
||||
$_MODULE['<{twenga}prestashop>twenga_5ac315e486b693637a06f490f308dc67'] = 'Schritt 2 : Kehren Sie hier zurück, und kopieren Sie den Hashkey in das Feld „hash key“. Klicken Sie auf Speichern und Aktivieren.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_f5cff2635ec9ecf0249d33a7656f61c5'] = 'Sie sind noch nicht bei Twenga Ready to Sell angemeldet ?';
|
||||
$_MODULE['<{twenga}prestashop>twenga_f9c31cabc1e6928068e7394f5453e759'] = 'Wie listen Sie Ihre Produkte auf Twenga.de:';
|
||||
$_MODULE['<{twenga}prestashop>twenga_87645feb1c92efecd6a6946d1b498fd7'] = 'Schritt 1 : Klicken auf dieses Link um sich bei Twenga Ready to Sell anzumelden.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_b26917587d98330d93f87808fc9d7267'] = 'melden Sie sich an';
|
||||
$_MODULE['<{twenga}prestashop>twenga_1d79f46fad241d4984e47165ca578ee9'] = '(Fehler aufgetreten: Bitte kontaktieren Sie Twenga)';
|
||||
$_MODULE['<{twenga}prestashop>twenga_195b3777fa9dcc91d27b86391e7f9a49'] = 'Schritt 2 : Füllen Sie das Twenga Anmeldeformular aus ';
|
||||
$_MODULE['<{twenga}prestashop>twenga_767a31e960aa760c42722d2e7373b2ad'] = 'Schritt 3 : Sobald Sie den Twenga hash-key per Email erhalten haben, kehren Sie hier zurück, und kopieren kopieren Sie den Hashkey in das Feld „hash key“. Klicken Sie auf Speichern und Aktivieren.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_bc88fe7063d7e7da0bf08003f21a1ad2'] = 'Steigern Sie Ihre Besucherzahlen - 500 geschenkte Klicks';
|
||||
$_MODULE['<{twenga}prestashop>twenga_2d82e5a3931e70d2c94b9ba6e674edbc'] = 'Listen Sie Ihre Produkte kostenlos und erfolgsbasiert auf Twenga: Sie zahlen nur, wenn Sie auch verkaufen ';
|
||||
$_MODULE['<{twenga}prestashop>twenga_f9372612b4e86b53c45d31d7ca3402bb'] = 'Sehen hier Twenga Preisliste';
|
||||
$_MODULE['<{twenga}prestashop>twenga_1b972277504e523b2354830a1cbbf34b'] = 'Installation des Sales-Tracking';
|
||||
$_MODULE['<{twenga}prestashop>twenga_1b8d7e57253e5bdb39a7f8a8e4604a87'] = 'Geben Sie here den Twenga Ready to Sell Schlüssel/hashkey und ihr Einloggen/pass';
|
||||
$_MODULE['<{twenga}prestashop>twenga_a66daa775d445ee7da1bb20667b7c8e6'] = 'Feed URL';
|
||||
$_MODULE['<{twenga}prestashop>twenga_21baf392bfae2dadba6813e9fb843141'] = 'HashKey';
|
||||
$_MODULE['<{twenga}prestashop>twenga_99dea78007133396a7b8ed70578ac6ae'] = 'Login';
|
||||
$_MODULE['<{twenga}prestashop>twenga_dc647eb65e6711e155375218212b3964'] = 'Kennwort';
|
||||
$_MODULE['<{twenga}prestashop>twenga_dcc247ef0aa275168664ec484511ccef'] = 'Wenn Sie ihr Einloggen vergass, holen Sie es hier';
|
||||
$_MODULE['<{twenga}prestashop>twenga_c9cc8cce247e49bae79f15173ce97354'] = 'Speichern';
|
||||
$_MODULE['<{twenga}prestashop>twenga_aacdaeaf96cf431c6364b4dfe314b35c'] = 'Diese Informationen sind zur Vorausfüllung des Twenga Anmeldeformulars bestimmt.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_e4448edd2a6725ad3b1b7ca31eac1ff0'] = 'Die folgenden Informationen dienen der Vorausfüllung Ihrer \"Twenga Ready to Sell\"-Anmeldung. Bitte prüfen Sie die Gültigkeit der Angaben';
|
||||
$_MODULE['<{twenga}prestashop>twenga_87fa3060dcb794dee724d4cb59b13cd6'] = 'Website-URL';
|
||||
$_MODULE['<{twenga}prestashop>twenga_49c0292b84058df9d4ee623efbd680d4'] = 'Feeds Url, die Liste der Produkte in XML.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_9217c70a13a5a37fdef90ed92d18ca1b'] = 'Wert wird automatisch ausgefüllt, bitte nicht ändern.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_59716c97497eb9694541f7c3d37b1a4d'] = 'Land';
|
||||
$_MODULE['<{twenga}prestashop>twenga_95f01a5bae7b4b64a76372538e4fd315'] = 'E-Händler Firmenland. Verwenden Sie das ISO_3166 Alpha-1-2-Ländercode-Format.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_734b599bad38d4210614bc176c53fefe'] = 'Name der Webseite';
|
||||
$_MODULE['<{twenga}prestashop>twenga_77587239bf4c54ea493c7033e1dbf636'] = 'Nachname';
|
||||
$_MODULE['<{twenga}prestashop>twenga_bc910f8bdf70f29374f496f05be0330c'] = 'Vorname';
|
||||
$_MODULE['<{twenga}prestashop>twenga_1e884e3078d9978e216a027ecd57fb34'] = 'E-Mail';
|
||||
$_MODULE['<{twenga}prestashop>twenga_bcc254b55c4a1babdf1dcb82c207506b'] = 'Telefon';
|
||||
$_MODULE['<{twenga}prestashop>twenga_28bea34e08fa23a7d394c93bad717733'] = 'Organisationsbezeichnung';
|
||||
$_MODULE['<{twenga}prestashop>twenga_4ff5049a0938728934387c4d9cf38f94'] = 'Rechtsform';
|
||||
$_MODULE['<{twenga}prestashop>twenga_fc0d317121f61eeb44ede30a6648b9be'] = 'Rechtsform der Gesellschaft';
|
||||
$_MODULE['<{twenga}prestashop>twenga_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse';
|
||||
$_MODULE['<{twenga}prestashop>twenga_8116ea5ccd73f945bb5e260861b0b570'] = 'PLZ';
|
||||
$_MODULE['<{twenga}prestashop>twenga_57d056ed0984166336b7879c2af3657f'] = 'Stadt';
|
||||
$_MODULE['<{twenga}prestashop>twenga_fcb0c2a30548efc7048ea4bdfa4eba05'] = 'Tracking deaktivieren ';
|
||||
$_MODULE['<{twenga}prestashop>twenga_08473b95892d1cb8265ff2716cb81d54'] = 'Klicken Sie auf die folgende Schaltfläche, um das Tracking zu deaktivieren:';
|
||||
$_MODULE['<{twenga}prestashop>twenga_2938a03ab100963b7349d83257fa9333'] = 'Tracking aktivieren';
|
||||
$_MODULE['<{twenga}prestashop>twenga_cd07439a0c70b97a595de73218094a36'] = 'Klicken Sie auf die folgende Schaltfläche, um das Tracking zu aktivieren:';
|
||||
$_MODULE['<{twenga}prestashop>twenga_a13367a8e2a3f3bf4f3409079e3fdf87'] = 'Aktivieren';
|
||||
$_MODULE['<{twenga}prestashop>twenga_09d0c75c525a2cb0bf2310e447ea8a45'] = 'Der Hash Key muss für genutzte Twenga API eingestellt werden.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_12a4f08255155a828e10c2c513595fe1'] = 'Einige Parameter fehlen, ansonsten existiert die Seite nicht';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_2823b98d043387f608f16d5830d63f5f'] = 'Zur Aktivierung des Twenga Plugin muss \"PARTNER_AUTH_KEY\" contant eingestellt werden. Die Standardinstallation von Prestashop enthält diesen Wert.';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_9f7cd403f4ab77ce8c00426d4a01345e'] = 'Das Objekt für Validierfelder muss eine Instanz der TwengaFields Klasse sein';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_b78d4ca3fa82bab9e21c8110511ed947'] = 'HTTP XML-Antwort ist nicht parsierbar:';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_7edc522b57a063ef075b68fdb791af40'] = 'HTTP-Antwort ist leer';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_d00d3f61833c8686be3f0ca7df670e20'] = 'Dieser Aufruf der Twenga Web Services ist fehlgeschlagenund ergab einen HTTP-Status über %. Das bedeutet:';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_5177c3a8e526ccb227441827d43d9583'] = 'Die Funktion, auf die Sie zugreifen wollten, existiert nicht';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_3718cdfdc7439f35aed9f053b5991baf'] = 'Ein Pflichtfeld ist leer';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_f97fd38d65fe891d07fc1a157b0752a2'] = 'Der gesendete Parametertyp ist nicht der gleiche wie der erwartete Parametertyp';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_737b702af5cbf3c4b0e7404592bae85e'] = 'Hashkey ist nicht gültig';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_c54550e963195bd4e80b862f40b8d574'] = 'Hashkey ist erforderlich';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_c4e170c475b0285f284ccb066bcd81f4'] = 'Keine Bestellung gefunden. Bitte überprüfen Sie Ihre gesendeten Parameter ';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_54441256ce04ab07a29463646d0a9931'] = 'Authentifizierung ist erforderlich.';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_802b207b05fe5cea22e11b9db804b33d'] = 'Authentifizierung fehlgeschlagen.';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_629a8cfa226f98886062bfdc9666e266'] = 'Ungültige URL.';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_9fb66ea632c1aff220b180918df3c77c'] = 'Der Server ist auf einen internen Server-Fehler gestoßen';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_6e182f2ba494a6720ce552ed2a255403'] = 'Der Server ist momentan nicht verfügbar';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_4252fb7eb531ed1ec250e5c16f8ced37'] = 'Dieser Aufruf der PrestaShop Web Services ergab einen unerwarteten HTTP Status:';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_5619f08f21127bd8f72ec9bbb25031ac'] = 'Fehler Nr.';
|
||||
@@ -1,94 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{twenga}prestashop>twenga_400b0c914f01bcecf50b936e652695b2'] = 'El API de Twenga';
|
||||
$_MODULE['<{twenga}prestashop>twenga_64ef67f03ba236aef261078101017d57'] = 'función del módulo: exportación de sus productos en Twenga e instalación de las ventas de seguimiento interpuesto por Twenga (requiere registrarse para Twenga)';
|
||||
$_MODULE['<{twenga}prestashop>twenga_2034864b8a4fce12f3621b7ec8912e95'] = 'El módulo Twenga sólo funciona en determinados países (lista de códigos ISO:';
|
||||
$_MODULE['<{twenga}prestashop>twenga_bcfaccebf745acfd5e75351095a5394a'] = 'Desactivar';
|
||||
$_MODULE['<{twenga}prestashop>twenga_526d688f37a86d3c3f27d0c5016eb71d'] = 'Restablecer';
|
||||
$_MODULE['<{twenga}prestashop>twenga_a27dfe771799a09fd55fea73286eb6ab'] = 'Desinstalar';
|
||||
$_MODULE['<{twenga}prestashop>twenga_f2a6c498fb90ee345d997f888fce3b18'] = 'Eliminar';
|
||||
$_MODULE['<{twenga}prestashop>twenga_bf4510198726bc0736e7705e10fffd8b'] = 'Si eres suscriptor en Twenga, la activación de este módulo es obligatorio.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_9d156e107098a77332f309c765b72b9c'] = 'En el caso de la disfunción, desinstale este módulo, instale la versión más reciente aquí y llenar de nuevo hashkey Twenga y entrada.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_a9d7299384e1f3fc346790328ffa8ac3'] = 'Para darse de baja o para cualquier pregunta, póngase en contacto con Twenga en su cuenta.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_fb3ecfb2800400fb01b0bfd39903e9fb'] = 'La versión más reciente';
|
||||
$_MODULE['<{twenga}prestashop>twenga_ea4788705e6873b424c65e91c2846b19'] = 'Cancelar';
|
||||
$_MODULE['<{twenga}prestashop>twenga_69e591b18e717d483dbaa8e3ce89ce59'] = 'Los parámetros no son autorizados (ver detalles):';
|
||||
$_MODULE['<{twenga}prestashop>twenga_75a462904fadc0cc16d084efaef4a9d0'] = 'Se ha producido un error con un método de API Twenga (ver detalles):';
|
||||
$_MODULE['<{twenga}prestashop>twenga_7edef656ee9e8861e734336a7adba650'] = 'Su “Haskell” no es válido: Compruebe el email enviado por Twenga.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_3e6f1d35bdb6d0721c83c0a3f48ae345'] = 'Su nombre de usuario no es válido. Compruebe el email enviado por Twenga.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_19183e4de8ddfa3e032c112ba45fdc13'] = 'Su contraseña no es válida. Compruebe el email enviado por Twenga.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_802b207b05fe5cea22e11b9db804b33d'] = 'Su autentificación ha fracasado.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_6702ebde453c9145652c0b007489904c'] = 'Compruebe el email enviado por Twenga en el momento de la inscripción. Si los errores continúan contacte con el servicio de Twenga.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_ddedf0f7b923553ef46616375e521381'] = 'Se ha producido un error al pasar los parámetros a el API Twenga.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_94a3b708cddc22d83742fdbd0a8970d7'] = 'Su país por defecto es';
|
||||
$_MODULE['<{twenga}prestashop>twenga_1f75825a8f4b083cbed0f95efc09abfd'] = 'Por favor seleccione uno de estos países disponibles y aprobados por Twenga';
|
||||
$_MODULE['<{twenga}prestashop>twenga_3ea33020a5535b0157de47e53e463633'] = 'Siga este enlace para cambiar el país';
|
||||
$_MODULE['<{twenga}prestashop>twenga_5d79ec5a879860ff8546580001fe80ee'] = 'Para utilizar el webservicio de Twenga, debe activar la extensión “curl” de PHP';
|
||||
$_MODULE['<{twenga}prestashop>twenga_5f77daeb6fc30c87e051e5b5d11b034c'] = 'Se han producido errores al llamar al método \"get subscription\" con el API de Twenga';
|
||||
$_MODULE['<{twenga}prestashop>twenga_da8ac71ff9563d9a5dd0f8894c8bc0ac'] = 'Indexación de sus productos en Twenga';
|
||||
$_MODULE['<{twenga}prestashop>twenga_0ed6e223384a822859461ca6bab72256'] = '¿Tienes ya una cuenta Twenga Ready to Sell ? ';
|
||||
$_MODULE['<{twenga}prestashop>twenga_63f97ef2cb80a6cf0a8fa98453577601'] = 'Paso 1 : Copia la hashkey Twenga de tu cuenta Twenga Ready to Sell (puedes encontrarla en: herramientas>tracking>hashkey). Haz clic en \"Test de tracking\". ';
|
||||
$_MODULE['<{twenga}prestashop>twenga_5ac315e486b693637a06f490f308dc67'] = 'Paso 2 : Vuelve a esta página y copia la hashkey en el campo „hash key“. Haz clic en Save y Activate.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_f5cff2635ec9ecf0249d33a7656f61c5'] = '¿Quieres inscribirte en Twenga Ready to Sell ? ';
|
||||
$_MODULE['<{twenga}prestashop>twenga_f9c31cabc1e6928068e7394f5453e759'] = 'Cómo indexar tus productos en Twenga.es (desde junio 2011) :';
|
||||
$_MODULE['<{twenga}prestashop>twenga_87645feb1c92efecd6a6946d1b498fd7'] = 'Paso 1 : Para inscribirte en Twenga Ready to Sell puedes hacer clic en este enlace ';
|
||||
$_MODULE['<{twenga}prestashop>twenga_b26917587d98330d93f87808fc9d7267'] = 'Suscribirse';
|
||||
$_MODULE['<{twenga}prestashop>twenga_1d79f46fad241d4984e47165ca578ee9'] = '(se han producido errores: contacte con Twenga)';
|
||||
$_MODULE['<{twenga}prestashop>twenga_195b3777fa9dcc91d27b86391e7f9a49'] = 'Paso 2 : Rellena los campos necesarios a la inscripción';
|
||||
$_MODULE['<{twenga}prestashop>twenga_767a31e960aa760c42722d2e7373b2ad'] = 'Paso 3 : Cuando recibas la hashkey Twenga por correo electrónico, vuelve a esta página y cópiala en el campo „hash key“. Haz clic en Guardar y Activar.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_bc88fe7063d7e7da0bf08003f21a1ad2'] = 'Aumente su tráfico - 500 clics gratis';
|
||||
$_MODULE['<{twenga}prestashop>twenga_2d82e5a3931e70d2c94b9ba6e674edbc'] = 'Haz clic aquí para ver los costes de cada categoría Twenga';
|
||||
$_MODULE['<{twenga}prestashop>twenga_f9372612b4e86b53c45d31d7ca3402bb'] = 'Twenga Precios';
|
||||
$_MODULE['<{twenga}prestashop>twenga_1b972277504e523b2354830a1cbbf34b'] = 'La instalación de Seguimiento de ventas';
|
||||
$_MODULE['<{twenga}prestashop>twenga_1b8d7e57253e5bdb39a7f8a8e4604a87'] = 'Escriba aquí su Twenga listo para vender hashkey y acceso al sitio / Pase';
|
||||
$_MODULE['<{twenga}prestashop>twenga_a66daa775d445ee7da1bb20667b7c8e6'] = 'Flujo RSS';
|
||||
$_MODULE['<{twenga}prestashop>twenga_21baf392bfae2dadba6813e9fb843141'] = 'Hashkey';
|
||||
$_MODULE['<{twenga}prestashop>twenga_99dea78007133396a7b8ed70578ac6ae'] = 'Login';
|
||||
$_MODULE['<{twenga}prestashop>twenga_dc647eb65e6711e155375218212b3964'] = 'Contraseña';
|
||||
$_MODULE['<{twenga}prestashop>twenga_dcc247ef0aa275168664ec484511ccef'] = 'Su catálogo se referenciará en Twenga en unos diez días';
|
||||
$_MODULE['<{twenga}prestashop>twenga_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar';
|
||||
$_MODULE['<{twenga}prestashop>twenga_aacdaeaf96cf431c6364b4dfe314b35c'] = 'Datos que aparecen rellenados en el formulario de inscripción Twenga';
|
||||
$_MODULE['<{twenga}prestashop>twenga_e4448edd2a6725ad3b1b7ca31eac1ff0'] = 'La siguiente información antes de llenar su \"Twenga dispuestos a vender\" suscripción. Por favor, compruebe la validez de los valores.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_87fa3060dcb794dee724d4cb59b13cd6'] = 'La URL del sitio';
|
||||
$_MODULE['<{twenga}prestashop>twenga_49c0292b84058df9d4ee623efbd680d4'] = 'Flujo RSS, lista de productos en xml.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_9217c70a13a5a37fdef90ed92d18ca1b'] = 'Valor rellenado automáticamente, no cambiar.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_59716c97497eb9694541f7c3d37b1a4d'] = 'País';
|
||||
$_MODULE['<{twenga}prestashop>twenga_95f01a5bae7b4b64a76372538e4fd315'] = 'El país de la empresa E-Comercio. Utilice el código ISO_3166-1 Alpha-2 para el formato del país';
|
||||
$_MODULE['<{twenga}prestashop>twenga_734b599bad38d4210614bc176c53fefe'] = 'Nombre del sitio';
|
||||
$_MODULE['<{twenga}prestashop>twenga_77587239bf4c54ea493c7033e1dbf636'] = 'Apellido';
|
||||
$_MODULE['<{twenga}prestashop>twenga_bc910f8bdf70f29374f496f05be0330c'] = 'Nombre';
|
||||
$_MODULE['<{twenga}prestashop>twenga_1e884e3078d9978e216a027ecd57fb34'] = 'Email';
|
||||
$_MODULE['<{twenga}prestashop>twenga_bcc254b55c4a1babdf1dcb82c207506b'] = 'Teléfono';
|
||||
$_MODULE['<{twenga}prestashop>twenga_28bea34e08fa23a7d394c93bad717733'] = 'Nombre del organismo';
|
||||
$_MODULE['<{twenga}prestashop>twenga_4ff5049a0938728934387c4d9cf38f94'] = 'Información jurídica';
|
||||
$_MODULE['<{twenga}prestashop>twenga_fc0d317121f61eeb44ede30a6648b9be'] = 'Información jurídica de la empresa.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_dd7bf230fde8d4836917806aff6a6b27'] = 'Dirección';
|
||||
$_MODULE['<{twenga}prestashop>twenga_8116ea5ccd73f945bb5e260861b0b570'] = 'Código postal';
|
||||
$_MODULE['<{twenga}prestashop>twenga_57d056ed0984166336b7879c2af3657f'] = 'Ciudad';
|
||||
$_MODULE['<{twenga}prestashop>twenga_fcb0c2a30548efc7048ea4bdfa4eba05'] = 'Anular el tracking';
|
||||
$_MODULE['<{twenga}prestashop>twenga_08473b95892d1cb8265ff2716cb81d54'] = 'Para anular el tracking, pulse en el siguiente link:';
|
||||
$_MODULE['<{twenga}prestashop>twenga_2938a03ab100963b7349d83257fa9333'] = 'Activar el tracking';
|
||||
$_MODULE['<{twenga}prestashop>twenga_cd07439a0c70b97a595de73218094a36'] = 'Para activar el tracking, pulse en el siguiente link:';
|
||||
$_MODULE['<{twenga}prestashop>twenga_a13367a8e2a3f3bf4f3409079e3fdf87'] = 'Activar';
|
||||
$_MODULE['<{twenga}prestashop>twenga_09d0c75c525a2cb0bf2310e447ea8a45'] = 'La clave hash debe estar configurada para utilizar Twenga API.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_12a4f08255155a828e10c2c513595fe1'] = 'Algunos parámetros faltan, o el sitio no existe';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_2823b98d043387f608f16d5830d63f5f'] = 'Para activar el módulo Twenga, la constante \"PARTNER_AUTH_KEY\" debe estar definida. La instalación por defecto de PrestaShop contiene este valor.';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_9f7cd403f4ab77ce8c00426d4a01345e'] = 'El objeto para validar los campos debe ser una instancia de la clase TwengaFields';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_b78d4ca3fa82bab9e21c8110511ed947'] = 'La devolución XML de la respuesta HTTP no puede ser analizada:';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_7edc522b57a063ef075b68fdb791af40'] = 'la respuesta HTTP está vacía';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_d00d3f61833c8686be3f0ca7df670e20'] = 'La llamada a los servicios Web Twenga no se ha obtenido con éxito y a devuelto un estado HTTP de %d. Lo que significa:';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_5177c3a8e526ccb227441827d43d9583'] = 'La función que ha llamado no existe';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_3718cdfdc7439f35aed9f053b5991baf'] = 'Un campo requerido está vacío.';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_f97fd38d65fe891d07fc1a157b0752a2'] = 'El tipo de parámetro que ha enviado es diferente del que se esperaba.';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_737b702af5cbf3c4b0e7404592bae85e'] = 'El hash key no es válido';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_c54550e963195bd4e80b862f40b8d574'] = 'Se requiere el hash key';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_c4e170c475b0285f284ccb066bcd81f4'] = 'No se han encontrado pedidos. Compruebe los parámetros que transmite';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_54441256ce04ab07a29463646d0a9931'] = 'Se requiere una autentificación.';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_802b207b05fe5cea22e11b9db804b33d'] = 'La autentificación ha fracasado.';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_629a8cfa226f98886062bfdc9666e266'] = 'La URL no es válida.';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_9fb66ea632c1aff220b180918df3c77c'] = 'El servidor ha encontrado un \"internal server error\".';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_6e182f2ba494a6720ce552ed2a255403'] = 'El servidor no está accesible por el momento';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_4252fb7eb531ed1ec250e5c16f8ced37'] = 'La llamada a los servicios Web Twenga a devuelto un estado HTTP inesperado:';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_5619f08f21127bd8f72ec9bbb25031ac'] = 'Error n°';
|
||||
@@ -1,39 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA : 6 rue lacepede, 75005 PARIS
|
||||
* @version Release: $Revision: 1.4 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
**/
|
||||
|
||||
/**
|
||||
* @author Nans Pellicari - Prestashop
|
||||
* @version 1.3
|
||||
*/
|
||||
include_once('../../config/config.inc.php');
|
||||
include_once('../../init.php');
|
||||
include_once(dirname(__FILE__).'/twenga.php');
|
||||
$export = new Twenga();
|
||||
$output = $export->buildXML();
|
||||
if (empty($export->_errors))
|
||||
header("Content-type: text/xml; charset=utf-8");
|
||||
echo $output;
|
||||
@@ -1,94 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{twenga}prestashop>twenga_400b0c914f01bcecf50b936e652695b2'] = 'l\'API de Twenga';
|
||||
$_MODULE['<{twenga}prestashop>twenga_64ef67f03ba236aef261078101017d57'] = 'Rôle du module : export de vos produits sur Twenga et installation du suivi des ventes apportées par Twenga (inscription sur Twenga requise)';
|
||||
$_MODULE['<{twenga}prestashop>twenga_2034864b8a4fce12f3621b7ec8912e95'] = 'Le module Twenga marche seulement dans certains pays (liste des iso codes :';
|
||||
$_MODULE['<{twenga}prestashop>twenga_bcfaccebf745acfd5e75351095a5394a'] = 'Désactiver';
|
||||
$_MODULE['<{twenga}prestashop>twenga_526d688f37a86d3c3f27d0c5016eb71d'] = 'Réinitialiser';
|
||||
$_MODULE['<{twenga}prestashop>twenga_a27dfe771799a09fd55fea73286eb6ab'] = 'Désinstaller';
|
||||
$_MODULE['<{twenga}prestashop>twenga_f2a6c498fb90ee345d997f888fce3b18'] = 'Supprimer';
|
||||
$_MODULE['<{twenga}prestashop>twenga_bf4510198726bc0736e7705e10fffd8b'] = 'Si vous êtes inscrit sur Twenga, l’activation de ce module est obligatoire.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_9d156e107098a77332f309c765b72b9c'] = 'En cas de dysfonctionnement, désinstallez ce module, installez la version la plus récente ici puis renseignez à nouveau votre hashkey et login Twenga.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_a9d7299384e1f3fc346790328ffa8ac3'] = 'Pour vous désinscrire ou toute autre question, contactez Twenga sur votre compte.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_fb3ecfb2800400fb01b0bfd39903e9fb'] = 'Version plus récente';
|
||||
$_MODULE['<{twenga}prestashop>twenga_ea4788705e6873b424c65e91c2846b19'] = 'Annuler';
|
||||
$_MODULE['<{twenga}prestashop>twenga_69e591b18e717d483dbaa8e3ce89ce59'] = 'Les paramètres ne sont pas autorisés (voir détails) :';
|
||||
$_MODULE['<{twenga}prestashop>twenga_75a462904fadc0cc16d084efaef4a9d0'] = 'Une erreur s\'est produite avec une méthode de l\'API Twenga (voir détails) :';
|
||||
$_MODULE['<{twenga}prestashop>twenga_7edef656ee9e8861e734336a7adba650'] = 'Votre \"hashkey\" n\'est pas valide. Veuillez vérifier l\'email envoyé par Twenga.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_3e6f1d35bdb6d0721c83c0a3f48ae345'] = 'Votre nom d\'utilisateur n\'est pas valide. Veuillez vérifier l\'email envoyé par Twenga.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_19183e4de8ddfa3e032c112ba45fdc13'] = 'Votre mot de passe n\'est pas valide. Veuillez vérifier l\'email envoyé par Twenga.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_802b207b05fe5cea22e11b9db804b33d'] = 'Votre authentification à échoué.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_6702ebde453c9145652c0b007489904c'] = 'Veuillez vérifier l\'email envoyé par Twenga après souscription. Si une erreur persiste, contactez le service de Twenga.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_ddedf0f7b923553ef46616375e521381'] = 'Une erreur est apparue en passant les paramètres à l\'API Twenga.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_94a3b708cddc22d83742fdbd0a8970d7'] = 'Votre pays par défaut est';
|
||||
$_MODULE['<{twenga}prestashop>twenga_1f75825a8f4b083cbed0f95efc09abfd'] = 'Veuilez sélectionner un des pays disponibles approuvés par Twenga';
|
||||
$_MODULE['<{twenga}prestashop>twenga_3ea33020a5535b0157de47e53e463633'] = 'Suivez ce lien pour changer le pays';
|
||||
$_MODULE['<{twenga}prestashop>twenga_5d79ec5a879860ff8546580001fe80ee'] = 'Pour utiliser le webservice de Twenga, vous devez activer l\'extension \'curl\' de PHP';
|
||||
$_MODULE['<{twenga}prestashop>twenga_5f77daeb6fc30c87e051e5b5d11b034c'] = 'Des erreurs sont apparues lors de l\'appel de la methode \"getSubscription\" avec L\'API de Twenga';
|
||||
$_MODULE['<{twenga}prestashop>twenga_da8ac71ff9563d9a5dd0f8894c8bc0ac'] = 'Référencez vos produits sur Twenga et suivez les ventes générées par Twenga';
|
||||
$_MODULE['<{twenga}prestashop>twenga_0ed6e223384a822859461ca6bab72256'] = 'Vous êtes déjà inscrit à Twenga Ready to Sell ? ';
|
||||
$_MODULE['<{twenga}prestashop>twenga_63f97ef2cb80a6cf0a8fa98453577601'] = 'Etape 1 : Récupérez votre clé Twenga dans l\'email envoyé par Twenga ou sur votre compte Twenga Ready to Sell (tools>tracking>hashkey). Cliquez aussi sur \"Tester le tracking\".';
|
||||
$_MODULE['<{twenga}prestashop>twenga_5ac315e486b693637a06f490f308dc67'] = 'Etape 2 : Retournez ici et coller cette clé dans le champ « hash key ». Cliquez sur sauvegarder et activer.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_f5cff2635ec9ecf0249d33a7656f61c5'] = 'Vous n\'êtes pas inscrit à Twenga Ready to Sell ?';
|
||||
$_MODULE['<{twenga}prestashop>twenga_f9c31cabc1e6928068e7394f5453e759'] = 'Comment tester Twenga et bénéficier des 500 premiers clics offerts';
|
||||
$_MODULE['<{twenga}prestashop>twenga_87645feb1c92efecd6a6946d1b498fd7'] = 'Etape 1 : Cliquez sur ce lien pour vous inscrire à Twenga Ready To Sell';
|
||||
$_MODULE['<{twenga}prestashop>twenga_b26917587d98330d93f87808fc9d7267'] = 's\'inscrire';
|
||||
$_MODULE['<{twenga}prestashop>twenga_1d79f46fad241d4984e47165ca578ee9'] = '(des erreurs sont survenues : merci de contacter Twenga)';
|
||||
$_MODULE['<{twenga}prestashop>twenga_195b3777fa9dcc91d27b86391e7f9a49'] = 'Etape 2 : Compléter le formulaire d\'inscription Twenga';
|
||||
$_MODULE['<{twenga}prestashop>twenga_767a31e960aa760c42722d2e7373b2ad'] = 'Etape 3 : Une fois votre clé Twenga reçue, retournez ici et coller cette clé dans le champs „hash key“. Cliquez pour sauvegarder et activer.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_bc88fe7063d7e7da0bf08003f21a1ad2'] = 'Augmentez votre traffic - 500 clics offerts';
|
||||
$_MODULE['<{twenga}prestashop>twenga_2d82e5a3931e70d2c94b9ba6e674edbc'] = 'Votre catalogue sera référencé sous une dizaine de jours. Une fois les 500 clics consommés, vous serez facturés au clic par catégorie de 0.05€ à 0.15€. Vous aurez accès à une interface de gestion complète et pouvez partir à tout moment.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_f9372612b4e86b53c45d31d7ca3402bb'] = 'Tarifs de Twenga';
|
||||
$_MODULE['<{twenga}prestashop>twenga_1b972277504e523b2354830a1cbbf34b'] = 'Installation du suivi des ventes';
|
||||
$_MODULE['<{twenga}prestashop>twenga_1b8d7e57253e5bdb39a7f8a8e4604a87'] = 'Renseignez ici la clé/hashkey Twenga et votre login/pass Twenga Ready to Sell';
|
||||
$_MODULE['<{twenga}prestashop>twenga_a66daa775d445ee7da1bb20667b7c8e6'] = 'Flux Rss';
|
||||
$_MODULE['<{twenga}prestashop>twenga_21baf392bfae2dadba6813e9fb843141'] = 'Hashkey';
|
||||
$_MODULE['<{twenga}prestashop>twenga_99dea78007133396a7b8ed70578ac6ae'] = 'Login';
|
||||
$_MODULE['<{twenga}prestashop>twenga_dc647eb65e6711e155375218212b3964'] = 'Mot de passe';
|
||||
$_MODULE['<{twenga}prestashop>twenga_dcc247ef0aa275168664ec484511ccef'] = 'En cas d\'oubli de votre login, récupérez le ici';
|
||||
$_MODULE['<{twenga}prestashop>twenga_c9cc8cce247e49bae79f15173ce97354'] = 'Sauvegarder';
|
||||
$_MODULE['<{twenga}prestashop>twenga_aacdaeaf96cf431c6364b4dfe314b35c'] = 'Informations qui pré-rempliront le formulaire d\'inscription Twenga';
|
||||
$_MODULE['<{twenga}prestashop>twenga_e4448edd2a6725ad3b1b7ca31eac1ff0'] = 'Les informations suivantes seront pré remplies dans lors de votre inscription à Twenga Ready to Sell. Merci de vérifier si les informations sont correctes.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_87fa3060dcb794dee724d4cb59b13cd6'] = 'l\'url du site';
|
||||
$_MODULE['<{twenga}prestashop>twenga_49c0292b84058df9d4ee623efbd680d4'] = 'Flux Rss, la liste des produits en xml.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_9217c70a13a5a37fdef90ed92d18ca1b'] = 'Valeur automatiquement remplie, ne la changer pas.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_59716c97497eb9694541f7c3d37b1a4d'] = 'Pays';
|
||||
$_MODULE['<{twenga}prestashop>twenga_95f01a5bae7b4b64a76372538e4fd315'] = 'Le pays de la société E-commerce. Utilisez le code ISO_3166-1 Alpha-2 pour le format de pays ';
|
||||
$_MODULE['<{twenga}prestashop>twenga_734b599bad38d4210614bc176c53fefe'] = 'Nom du site';
|
||||
$_MODULE['<{twenga}prestashop>twenga_77587239bf4c54ea493c7033e1dbf636'] = 'Nom de famille';
|
||||
$_MODULE['<{twenga}prestashop>twenga_bc910f8bdf70f29374f496f05be0330c'] = 'Prénom';
|
||||
$_MODULE['<{twenga}prestashop>twenga_1e884e3078d9978e216a027ecd57fb34'] = 'E-mail';
|
||||
$_MODULE['<{twenga}prestashop>twenga_bcc254b55c4a1babdf1dcb82c207506b'] = 'Téléphone';
|
||||
$_MODULE['<{twenga}prestashop>twenga_28bea34e08fa23a7d394c93bad717733'] = 'Nom de l\'organisation';
|
||||
$_MODULE['<{twenga}prestashop>twenga_4ff5049a0938728934387c4d9cf38f94'] = 'Infos juridiques';
|
||||
$_MODULE['<{twenga}prestashop>twenga_fc0d317121f61eeb44ede30a6648b9be'] = 'Infos juridiques de la société.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_dd7bf230fde8d4836917806aff6a6b27'] = 'Adresse';
|
||||
$_MODULE['<{twenga}prestashop>twenga_8116ea5ccd73f945bb5e260861b0b570'] = 'Code postale';
|
||||
$_MODULE['<{twenga}prestashop>twenga_57d056ed0984166336b7879c2af3657f'] = 'Ville';
|
||||
$_MODULE['<{twenga}prestashop>twenga_fcb0c2a30548efc7048ea4bdfa4eba05'] = 'Annuler le tracking';
|
||||
$_MODULE['<{twenga}prestashop>twenga_08473b95892d1cb8265ff2716cb81d54'] = 'Pour annuler le tracking, cliquez sur le lien suivant :';
|
||||
$_MODULE['<{twenga}prestashop>twenga_2938a03ab100963b7349d83257fa9333'] = 'Activer le tracking';
|
||||
$_MODULE['<{twenga}prestashop>twenga_cd07439a0c70b97a595de73218094a36'] = 'Pour activer le tracking, cliquez sur le lien suivant :';
|
||||
$_MODULE['<{twenga}prestashop>twenga_a13367a8e2a3f3bf4f3409079e3fdf87'] = 'Activer';
|
||||
$_MODULE['<{twenga}prestashop>twenga_09d0c75c525a2cb0bf2310e447ea8a45'] = 'La clé de hachage doit être définie pour utiliser Twenga API.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_12a4f08255155a828e10c2c513595fe1'] = 'Certains paramètres sont manquants ou le site n\'existe pas';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_2823b98d043387f608f16d5830d63f5f'] = 'Pour activer le module Twenga, la constante \"PARTNER_AUTH_KEY\" doit être définit. L\'installation par défault de Prestashop contient cette valeur.';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_9f7cd403f4ab77ce8c00426d4a01345e'] = 'L\'object pour valider les champs doit être une instance de la classe TwengaFields';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_b78d4ca3fa82bab9e21c8110511ed947'] = 'Le retour XML de la réponse HTTP n\'est pas analysable :';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_7edc522b57a063ef075b68fdb791af40'] = 'la réponse HTTP est vide';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_d00d3f61833c8686be3f0ca7df670e20'] = 'Cet appel aux Services Web Twenga à échoué et à retourné un statut HTTP de %d. Ce qui veut dire :';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_5177c3a8e526ccb227441827d43d9583'] = 'La fonction que vous appelez n\'existe pas';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_3718cdfdc7439f35aed9f053b5991baf'] = 'Un champ requis est vide.';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_f97fd38d65fe891d07fc1a157b0752a2'] = 'Le type du paramètre qui est envoyé est différent du type attendu.';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_737b702af5cbf3c4b0e7404592bae85e'] = 'Le hash key n\'est pas valide';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_c54550e963195bd4e80b862f40b8d574'] = 'Le hash key est requis';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_c4e170c475b0285f284ccb066bcd81f4'] = 'Aucune commandes trouvées. Regardez les parmètres que vous transmettez';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_54441256ce04ab07a29463646d0a9931'] = 'Une authentification est requise.';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_802b207b05fe5cea22e11b9db804b33d'] = 'L\'authentification a échoué.';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_629a8cfa226f98886062bfdc9666e266'] = 'L\'url n\'est pas valide.';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_9fb66ea632c1aff220b180918df3c77c'] = 'Le serveur à rencontrer une \"internal server error\".';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_6e182f2ba494a6720ce552ed2a255403'] = 'Le serveur n\'est pas accessible pour le moment';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_4252fb7eb531ed1ec250e5c16f8ced37'] = 'Cet appel aux Services Web Twenga a retourné un statut HTTP inattendu :';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_5619f08f21127bd8f72ec9bbb25031ac'] = 'Erreur n°';
|
||||
@@ -1 +0,0 @@
|
||||
<p>Si vous êtes inscrit sur Twenga, l’activation de ce module est obligatoire.<br /><br />En cas de dysfonctionnement, désinstallez ce module,installez la version la plus récente ici puis renseignez à nouveau votre hashkey et login Twenga.<br /><br/> Pour vous désinscrire ou toute autre question, contactez Twenga sur votre compte. <div><a href=\"#\" onclick=\"$fancybox.close(\'toto\')\">Désinstaller</a> Version plus récente Annuler</div></p>
|
||||
@@ -1,27 +0,0 @@
|
||||
<?php
|
||||
|
||||
$configPath = '../../config/config.inc.php';
|
||||
|
||||
if (file_exists($configPath))
|
||||
{
|
||||
include('../../config/config.inc.php');
|
||||
|
||||
$controller = new FrontController();
|
||||
$controller->init();
|
||||
|
||||
if (file_exists(dirname(__FILE__).'/twenga.php'))
|
||||
{
|
||||
include(dirname(__FILE__).'/twenga.php');
|
||||
|
||||
$t = new twenga();
|
||||
$t->ajaxRequestType();
|
||||
unset($t);
|
||||
}
|
||||
else
|
||||
echo 'Class module wasn\'t found';
|
||||
}
|
||||
else
|
||||
echo 'Config file is missing';
|
||||
|
||||
?>
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
<?php
|
||||
|
||||
global $_MODULE;
|
||||
$_MODULE = array();
|
||||
$_MODULE['<{twenga}prestashop>twenga_400b0c914f01bcecf50b936e652695b2'] = 'Twenga API';
|
||||
$_MODULE['<{twenga}prestashop>twenga_64ef67f03ba236aef261078101017d57'] = 'ruolo Modulo: esportazione dei vostri prodotti su Twenga ed installazione delle vendite di monitoraggio proposto da Twenga (richiede di registrarsi per Twenga)';
|
||||
$_MODULE['<{twenga}prestashop>twenga_2034864b8a4fce12f3621b7ec8912e95'] = 'Il modulo Twenga funziona solo in determinati paesi (elenco dei codici ISO:';
|
||||
$_MODULE['<{twenga}prestashop>twenga_bcfaccebf745acfd5e75351095a5394a'] = 'Disattiva';
|
||||
$_MODULE['<{twenga}prestashop>twenga_526d688f37a86d3c3f27d0c5016eb71d'] = 'Reset';
|
||||
$_MODULE['<{twenga}prestashop>twenga_a27dfe771799a09fd55fea73286eb6ab'] = 'Disinstalla';
|
||||
$_MODULE['<{twenga}prestashop>twenga_f2a6c498fb90ee345d997f888fce3b18'] = 'Elimina';
|
||||
$_MODULE['<{twenga}prestashop>twenga_bf4510198726bc0736e7705e10fffd8b'] = 'Se sei abbonato a Twenga, l\'attivazione di questo modulo è obbligatoria.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_9d156e107098a77332f309c765b72b9c'] = 'In caso di disfunzione, disinstallare questo modulo, installare la nuova versione qui e riempire di nuovo hashkey Twenga ed effettuare il login.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_a9d7299384e1f3fc346790328ffa8ac3'] = 'Per annullare l\'iscrizione o per qualsiasi domanda, si prega di contattare Twenga sul tuo conto.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_fb3ecfb2800400fb01b0bfd39903e9fb'] = 'Nuova versione';
|
||||
$_MODULE['<{twenga}prestashop>twenga_ea4788705e6873b424c65e91c2846b19'] = 'Annulla';
|
||||
$_MODULE['<{twenga}prestashop>twenga_69e591b18e717d483dbaa8e3ce89ce59'] = 'Param. non sono ammessi (vedi dettagli):';
|
||||
$_MODULE['<{twenga}prestashop>twenga_75a462904fadc0cc16d084efaef4a9d0'] = 'Si è verificato un errore con il metodo Twenga API (vedi dettagli):';
|
||||
$_MODULE['<{twenga}prestashop>twenga_7edef656ee9e8861e734336a7adba650'] = 'Il tuo hashkey non è valido. Si prega di controllare la mail già inviata da Twenga.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_3e6f1d35bdb6d0721c83c0a3f48ae345'] = 'Il tuo nome utente non è valido. Si prega di controllare la mail già inviata da Twenga.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_19183e4de8ddfa3e032c112ba45fdc13'] = 'La tua password non è valida. Si prega di controllare la mail già inviata da Twenga.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_802b207b05fe5cea22e11b9db804b33d'] = 'La tua autenticazione non è riuscita.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_6702ebde453c9145652c0b007489904c'] = 'Controllare la mail inviata da Twenga dopo l\'iscrizione. Se continua a verificarsi un errore, contatta il servizio di Twenga.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_ddedf0f7b923553ef46616375e521381'] = 'Si è verificato un errore durante il passaggio dei param. in Twenga API';
|
||||
$_MODULE['<{twenga}prestashop>twenga_94a3b708cddc22d83742fdbd0a8970d7'] = 'Il vostro Paese di default è';
|
||||
$_MODULE['<{twenga}prestashop>twenga_1f75825a8f4b083cbed0f95efc09abfd'] = 'Si prega di selezionare uno di questi paesi a disposizione approvata dal Twenga';
|
||||
$_MODULE['<{twenga}prestashop>twenga_3ea33020a5535b0157de47e53e463633'] = 'Segui questo link per cambiare il Paese';
|
||||
$_MODULE['<{twenga}prestashop>twenga_5d79ec5a879860ff8546580001fe80ee'] = 'Si prega di attivare l\'estensione PHP \'curl\' per permettere l\'uso della libreria webservice Twenga';
|
||||
$_MODULE['<{twenga}prestashop>twenga_5f77daeb6fc30c87e051e5b5d11b034c'] = 'Alcuni errori si sono verificati con il Twenga API \"ottenere link di sottoscrizione\":';
|
||||
$_MODULE['<{twenga}prestashop>twenga_da8ac71ff9563d9a5dd0f8894c8bc0ac'] = 'Indicizza i tuoi prodotti su Twenga';
|
||||
$_MODULE['<{twenga}prestashop>twenga_0ed6e223384a822859461ca6bab72256'] = 'Sei già inscritto a Twenga Ready to Sell ? ';
|
||||
$_MODULE['<{twenga}prestashop>twenga_63f97ef2cb80a6cf0a8fa98453577601'] = 'Step 1 : Recupera la hashkey Twenga dal tuo conto Twenga Ready to Sell (tools>tracking>hashkey). Clicca su \"Testare il tracking\". ';
|
||||
$_MODULE['<{twenga}prestashop>twenga_5ac315e486b693637a06f490f308dc67'] = 'Step 2 : Ritorna su questa pagina copia la hashkey nel campo „hash key“. Clicca su Save e Activate.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_f5cff2635ec9ecf0249d33a7656f61c5'] = 'Vuoi iscriverti a Twenga Ready to Sell ? ';
|
||||
$_MODULE['<{twenga}prestashop>twenga_f9c31cabc1e6928068e7394f5453e759'] = 'Come indicizzare i tuoi prodotti su Twenga.it';
|
||||
$_MODULE['<{twenga}prestashop>twenga_87645feb1c92efecd6a6946d1b498fd7'] = 'Step 1 : Per iscriverti a Twenga Ready to Sell clicca su questo link';
|
||||
$_MODULE['<{twenga}prestashop>twenga_b26917587d98330d93f87808fc9d7267'] = 'Iscriviti';
|
||||
$_MODULE['<{twenga}prestashop>twenga_1d79f46fad241d4984e47165ca578ee9'] = '(Errore/i: si prega di contattare Twenga)';
|
||||
$_MODULE['<{twenga}prestashop>twenga_195b3777fa9dcc91d27b86391e7f9a49'] = 'Step 2 : Compila i campi richiesti per l’iscrizione ';
|
||||
$_MODULE['<{twenga}prestashop>twenga_767a31e960aa760c42722d2e7373b2ad'] = 'Step 3 : Una volta ricevuta la hashkey Twenga via email, ritorna su questa pagina e copiala nel campo „hash key“. Clicca su Salva e poi su Attivare';
|
||||
$_MODULE['<{twenga}prestashop>twenga_bc88fe7063d7e7da0bf08003f21a1ad2'] = 'Aumenta il tuo traffico - 500 click offerti';
|
||||
$_MODULE['<{twenga}prestashop>twenga_2d82e5a3931e70d2c94b9ba6e674edbc'] = 'Clicca qui per visonare i costi per categoria Twenga';
|
||||
$_MODULE['<{twenga}prestashop>twenga_f9372612b4e86b53c45d31d7ca3402bb'] = 'Prezzi Twenga ';
|
||||
$_MODULE['<{twenga}prestashop>twenga_1b972277504e523b2354830a1cbbf34b'] = 'Installazione di Sales Tracking';
|
||||
$_MODULE['<{twenga}prestashop>twenga_1b8d7e57253e5bdb39a7f8a8e4604a87'] = 'Inserisci qui il tuo Ready Twenga per vendere e hashkey login e password';
|
||||
$_MODULE['<{twenga}prestashop>twenga_a66daa775d445ee7da1bb20667b7c8e6'] = 'Feed URL';
|
||||
$_MODULE['<{twenga}prestashop>twenga_21baf392bfae2dadba6813e9fb843141'] = 'HashKey';
|
||||
$_MODULE['<{twenga}prestashop>twenga_99dea78007133396a7b8ed70578ac6ae'] = 'Login';
|
||||
$_MODULE['<{twenga}prestashop>twenga_dc647eb65e6711e155375218212b3964'] = 'Password';
|
||||
$_MODULE['<{twenga}prestashop>twenga_dcc247ef0aa275168664ec484511ccef'] = 'Il tuo catalogo sarà referenziato entro dieci giorni su Twenga.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_c9cc8cce247e49bae79f15173ce97354'] = 'Salva';
|
||||
$_MODULE['<{twenga}prestashop>twenga_aacdaeaf96cf431c6364b4dfe314b35c'] = 'Queste informazioni faranno parte del modulo di sottoscrizione Twenga';
|
||||
$_MODULE['<{twenga}prestashop>twenga_e4448edd2a6725ad3b1b7ca31eac1ff0'] = 'Le seguenti informazioni faranno parte della tua iscrizione \"Twenga ready to sell\". Si prega di verificare la validità dei dati';
|
||||
$_MODULE['<{twenga}prestashop>twenga_87fa3060dcb794dee724d4cb59b13cd6'] = 'url del sito';
|
||||
$_MODULE['<{twenga}prestashop>twenga_49c0292b84058df9d4ee623efbd680d4'] = 'Feed Url, l\'elenco dei prodotti in XML.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_9217c70a13a5a37fdef90ed92d18ca1b'] = 'Il valore viene automaticamente riempito, non cambiarlo.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_59716c97497eb9694541f7c3d37b1a4d'] = 'Paese';
|
||||
$_MODULE['<{twenga}prestashop>twenga_95f01a5bae7b4b64a76372538e4fd315'] = 'Il paese della società e-commerce. Utilizza il codice ISO_3166-1 Alpha-2 per il formato del paese';
|
||||
$_MODULE['<{twenga}prestashop>twenga_734b599bad38d4210614bc176c53fefe'] = 'il nome del sito';
|
||||
$_MODULE['<{twenga}prestashop>twenga_77587239bf4c54ea493c7033e1dbf636'] = 'Cognome';
|
||||
$_MODULE['<{twenga}prestashop>twenga_bc910f8bdf70f29374f496f05be0330c'] = 'Nome';
|
||||
$_MODULE['<{twenga}prestashop>twenga_1e884e3078d9978e216a027ecd57fb34'] = 'E-mail';
|
||||
$_MODULE['<{twenga}prestashop>twenga_bcc254b55c4a1babdf1dcb82c207506b'] = 'Telefono';
|
||||
$_MODULE['<{twenga}prestashop>twenga_28bea34e08fa23a7d394c93bad717733'] = 'Nome organizzazione';
|
||||
$_MODULE['<{twenga}prestashop>twenga_4ff5049a0938728934387c4d9cf38f94'] = 'Informazioni legali';
|
||||
$_MODULE['<{twenga}prestashop>twenga_fc0d317121f61eeb44ede30a6648b9be'] = 'Informazioni legali sulla società';
|
||||
$_MODULE['<{twenga}prestashop>twenga_dd7bf230fde8d4836917806aff6a6b27'] = 'Indirizzo';
|
||||
$_MODULE['<{twenga}prestashop>twenga_8116ea5ccd73f945bb5e260861b0b570'] = 'CAP';
|
||||
$_MODULE['<{twenga}prestashop>twenga_57d056ed0984166336b7879c2af3657f'] = 'Città';
|
||||
$_MODULE['<{twenga}prestashop>twenga_fcb0c2a30548efc7048ea4bdfa4eba05'] = 'Disabilita Tracking';
|
||||
$_MODULE['<{twenga}prestashop>twenga_08473b95892d1cb8265ff2716cb81d54'] = 'Per disabilitare il tracking, clicca sul pulsante seguente:';
|
||||
$_MODULE['<{twenga}prestashop>twenga_2938a03ab100963b7349d83257fa9333'] = 'Attiva tracking';
|
||||
$_MODULE['<{twenga}prestashop>twenga_cd07439a0c70b97a595de73218094a36'] = 'Per attivare il tracking, clicca sul pulsante sottostante:';
|
||||
$_MODULE['<{twenga}prestashop>twenga_a13367a8e2a3f3bf4f3409079e3fdf87'] = 'Attivare';
|
||||
$_MODULE['<{twenga}prestashop>twenga_09d0c75c525a2cb0bf2310e447ea8a45'] = 'La hashkey deve essere impostata per utilizzare Twenga API.';
|
||||
$_MODULE['<{twenga}prestashop>twenga_12a4f08255155a828e10c2c513595fe1'] = 'Alcuni parametri mancanti, o il sito non esiste';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_2823b98d043387f608f16d5830d63f5f'] = 'Per attivare il plugin Twenga, la costante \"PARTNER_AUTH_KEY\" deve essere impostata. L\'installazione di default di Prestashop contiene questo valore.';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_9f7cd403f4ab77ce8c00426d4a01345e'] = 'L\'oggetto per convalidare i campi deve essere un\'istanza della classe TwengaFields';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_b78d4ca3fa82bab9e21c8110511ed947'] = 'La risposta HTTP XML non è analizzabile:';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_7edc522b57a063ef075b68fdb791af40'] = 'risposta HTTP vuota';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_d00d3f61833c8686be3f0ca7df670e20'] = 'Questa chiamata alla Twenga Web Services non è riuscita e ha rinviato uno stato HTTP di% d. Ciò significa:';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_5177c3a8e526ccb227441827d43d9583'] = 'La funzione a cui hai tentato di accedere non esiste';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_3718cdfdc7439f35aed9f053b5991baf'] = 'Un campo obbligatorio è vuoto';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_f97fd38d65fe891d07fc1a157b0752a2'] = 'Il tipo di parametro che è stato inviato è diverso dal tipo di parametro previsto';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_737b702af5cbf3c4b0e7404592bae85e'] = 'Hash key non valido';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_c54550e963195bd4e80b862f40b8d574'] = 'Hash key richiesto';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_c4e170c475b0285f284ccb066bcd81f4'] = 'Nessun ordine trovato. Verifica i parametri che hai inviato';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_54441256ce04ab07a29463646d0a9931'] = 'È richiesta l\'autenticazione.';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_802b207b05fe5cea22e11b9db804b33d'] = 'Autenticazione non riuscita.';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_629a8cfa226f98886062bfdc9666e266'] = 'URL non valido.';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_9fb66ea632c1aff220b180918df3c77c'] = 'Il server ha rilevato un errore interno del server';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_6e182f2ba494a6720ce552ed2a255403'] = 'Il server non è disponibile per il momento';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_4252fb7eb531ed1ec250e5c16f8ced37'] = 'Questa chiamata a PrestaShop Web Services ha rinviato uno stato HTTP inaspettato:';
|
||||
$_MODULE['<{twenga}prestashop>twengaobj_5619f08f21127bd8f72ec9bbb25031ac'] = 'Errore n.';
|
||||
@@ -1,128 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA : 6 rue lacepede, 75005 PARIS
|
||||
* @version Release: $Revision: 1.4 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
**/
|
||||
|
||||
/**
|
||||
* @author Nans Pellicari - Prestashop
|
||||
* @version 1.3
|
||||
*/
|
||||
class PrestashopStats
|
||||
{
|
||||
/**
|
||||
* @var array of urls to use for using method
|
||||
*/
|
||||
private static $arr_ps_stats_url;
|
||||
|
||||
/**
|
||||
* @var string url of the shop
|
||||
*/
|
||||
private static $site_url;
|
||||
|
||||
/**
|
||||
* Constructor save all necessaries infos to make transaction with tracker page.
|
||||
* @param string $site_url to identify the shop
|
||||
*/
|
||||
public function __construct($site_url)
|
||||
{
|
||||
if (self::$arr_ps_stats_url === NULL)
|
||||
{
|
||||
self::$arr_ps_stats_url = array();
|
||||
self::$arr_ps_stats_url['actSubscription'] = 'http://www.prestashop.com/modules/tracker_twenga.php?act_subscription=1';
|
||||
self::$arr_ps_stats_url['validateSubscription'] = 'http://www.prestashop.com/modules/tracker_twenga.php?validate_subscription=1';
|
||||
self::$arr_ps_stats_url['cancelOrder'] = 'http://www.prestashop.com/modules/tracker_twenga.php?cancel_order=1';
|
||||
self::$arr_ps_stats_url['validateOrder'] = 'http://www.prestashop.com/modules/tracker_twenga.php?validate_order=1';
|
||||
self::$site_url = $site_url;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Build url for curl use with good params and good encode.
|
||||
* @param string $url url which defined the method to use for the tracker.
|
||||
* @param array $params params to passed for the tracker.
|
||||
*/
|
||||
private static function buildUrlToQuery($url, array $params = array())
|
||||
{
|
||||
$params['url'] = self::$site_url;
|
||||
$params['module'] = 'twenga';
|
||||
if(Configuration::get('PS_TWENGA_KEY') !== false && Configuration::get('PS_TWENGA_KEY') !== '') $params['key'] = Configuration::get('PS_TWENGA_KEY');
|
||||
$str_params = http_build_query($params);
|
||||
$str_url = $url.(($str_params !== '') ? '&'.$str_params : '');
|
||||
return $str_url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use cURL to connect with the tracker.
|
||||
* @param string $query_string
|
||||
* @throws Exception if error occurred.
|
||||
* @return array with the statut code and the response return from curl connection.
|
||||
*/
|
||||
private static function executeQuery($query_string)
|
||||
{
|
||||
$defaultParams = array(
|
||||
CURLOPT_HEADER => TRUE,
|
||||
CURLOPT_RETURNTRANSFER => TRUE,
|
||||
CURLINFO_HEADER_OUT => TRUE,
|
||||
CURLOPT_HTTPAUTH => CURLAUTH_BASIC,
|
||||
);
|
||||
$session = curl_init($query_string);
|
||||
curl_setopt_array($session, $defaultParams);
|
||||
$response = curl_exec($session);
|
||||
$response = explode("\r\n\r\n", $response);
|
||||
|
||||
$header = $response[0];
|
||||
$response = $response[1];
|
||||
|
||||
$status_code = (int)curl_getinfo($session, CURLINFO_HTTP_CODE);
|
||||
if ($status_code === 0)
|
||||
throw new Exception('CURL Error: '.curl_error($session));
|
||||
curl_close($session);
|
||||
return array('status_code' => $status_code, 'response' => $response);
|
||||
}
|
||||
public function actSubscription ()
|
||||
{
|
||||
$str = self::buildUrlToQuery(self::$arr_ps_stats_url[__FUNCTION__]);
|
||||
$return = $this->executeQuery($str);
|
||||
if(trim($return['response']) !== '' && Validate::isMd5($return['response']))
|
||||
Configuration::updateValue('PS_TWENGA_KEY', $return['response']);
|
||||
}
|
||||
public function validateSubscription ()
|
||||
{
|
||||
$str = self::buildUrlToQuery(self::$arr_ps_stats_url[__FUNCTION__]);
|
||||
$this->executeQuery($str);
|
||||
}
|
||||
public function cancelOrder ()
|
||||
{
|
||||
$str = self::buildUrlToQuery(self::$arr_ps_stats_url[__FUNCTION__]);
|
||||
$this->executeQuery($str);
|
||||
}
|
||||
public function validateOrder ($amount_ht, $amount_ttc)
|
||||
{
|
||||
$params = array('order_amount_ttc' => (float)$amount_ttc, 'order_amount_ht' => (float)$amount_ht);
|
||||
$str = self::buildUrlToQuery(self::$arr_ps_stats_url[__FUNCTION__], $params);
|
||||
$this->executeQuery($str);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA : 6 rue lacepede, 75005 PARIS
|
||||
* @version Release: $Revision: 1.4 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
**/
|
||||
|
||||
class TwengaFieldsAddFeed extends TwengaFields
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
if(!is_array($this->fields) && empty($this->fields))
|
||||
{
|
||||
$this->fields['key'] = array(32, array('is_string', 'isCleanHtml'), true);
|
||||
$this->fields['PARTNER_AUTH_KEY'] = array(56, array('is_string', 'isCleanHtml'), true);
|
||||
$this->fields['feed_url'] = array(255, array('is_string', 'isCleanHtml'), true);
|
||||
}
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function __destruct()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,329 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA : 6 rue lacepede, 75005 PARIS
|
||||
* @version Release: $Revision: 1.4 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
**/
|
||||
|
||||
/**
|
||||
* This class works with the Twenga class to control params
|
||||
* used for Twenga API method.
|
||||
*
|
||||
* This class allow to :
|
||||
* - set fields with validators, the length of value, if field is required,
|
||||
* - check each fields if they saved according to params (see above),
|
||||
* - compare an array of values to check if required fields are set.
|
||||
* - use the twenga API method and throw exceptions if error or exceptions occurred.
|
||||
* - Transform the xml response into PHP values.
|
||||
* @author Nans Pellicari - Prestashop
|
||||
* @version 1.3
|
||||
*/
|
||||
abstract class TwengaFields
|
||||
{
|
||||
/**
|
||||
* This var must be filled by inherited constructor.
|
||||
*
|
||||
* Each item must look like :
|
||||
* item[(string)'name-of-the-field'] = array(#param1, #param2, #param3);
|
||||
* #param1 : (int) length of the field 0 for no restrictions
|
||||
* #param2 : (array) possibles validators. A validator could be a
|
||||
* - basic php function,
|
||||
* - Validate class method,
|
||||
* - Subclass method
|
||||
* #param3 : [optionnal](boolean) if is required or not.
|
||||
* @var array which saved possible fields with their specification
|
||||
* @see TwengaFields::checkFields() AND TwengaFields::checkFieldAttributs()
|
||||
*/
|
||||
protected $fields;
|
||||
|
||||
/**
|
||||
* @var string Need to save the class name for used with validators
|
||||
* @see TwengaFields::isValidate();
|
||||
*/
|
||||
protected $className;
|
||||
|
||||
/**
|
||||
* @var array which save each required fields
|
||||
* @see TwengaFields::checkFields() for know how it's filled
|
||||
*/
|
||||
protected $requiredFields;
|
||||
|
||||
/**
|
||||
* @var boolean
|
||||
*/
|
||||
protected $noRequiredFields = false;
|
||||
|
||||
/**
|
||||
* @var array Each item is value for field which are defined by subclass.
|
||||
* Key of the item must be the name of the field.
|
||||
*/
|
||||
protected $params;
|
||||
|
||||
/**
|
||||
* Constructor control each fields filled by subclass.
|
||||
* /!\ must be used by subclass after filled TwengaFields::$fields.
|
||||
* @see TwengaFields::checkFields()
|
||||
* @throws TwengaFieldsException throwing by TwengaFields::checkFields()
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->className = get_class($this);
|
||||
try {
|
||||
$this->checkFields();
|
||||
} catch (TwengaFieldsException $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check fields attributs.
|
||||
* @throws TwengaFieldsException if TwengaFields::$fields was not filled.
|
||||
* @throws TwengaFieldsException throwing by TwengaFields::checkFieldAttributs()
|
||||
*/
|
||||
private function checkFields()
|
||||
{
|
||||
if (!is_array($this->fields))
|
||||
throw new TwengaFieldsException('Some fields must be set');
|
||||
|
||||
// if $noRequiredFields is set to false, means that we don't need to check fields.
|
||||
if(!is_array($this->requiredFields) AND $this->noRequiredFields === false)
|
||||
{
|
||||
$this->requiredFields = array();
|
||||
foreach ($this->fields as $name=>$attributs)
|
||||
{
|
||||
try {
|
||||
$this->checkFieldAttributs($name, $attributs);
|
||||
} catch (TwengaFieldsException $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
if(empty($this->requiredFields))
|
||||
$this->noRequiredFields = true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check attributs validity and in case of field is required,
|
||||
* save it in (array)TwengaFields::$requiredFields.
|
||||
* @param string $name of the field
|
||||
* @param array field attributs
|
||||
* @throws TwengaFieldsException if an attribut of a field is not set correctly
|
||||
* (much more debugging rather than production).
|
||||
*/
|
||||
private function checkFieldAttributs ($name, array $field_attributs)
|
||||
{
|
||||
// attribut at key 0 is the length of the required value
|
||||
if(!Validate::isInt($field_attributs[0]))
|
||||
throw new TwengaFieldsException(Tools::displayError('To add a field, you have to set a maximum length for checking the value. Error occurred for the value').' : '.$name);
|
||||
|
||||
// attribut at key 1 is an array list of the validator
|
||||
if(!is_array($field_attributs[1]))
|
||||
throw new TwengaFieldsException(Tools::displayError('To add a field, you have to set validators for checking value. Error occurred for the value').' : '.$name);
|
||||
|
||||
// Check if validators setted are valid.
|
||||
foreach ($field_attributs[1] as $validator)
|
||||
{
|
||||
if(!function_exists($validator) && !method_exists('Validate', $validator) && !method_exists($this->className, $validator))
|
||||
throw new TwengaFieldsException (Tools::displayError('The Validator').' '.$validator.' '.Tools::displayError('does\'nt exist'));
|
||||
}
|
||||
|
||||
// attribut at key 2 means that this fields is required or not
|
||||
if(isset($field_attributs[2]) AND Validate::isBool($field_attributs[2]))
|
||||
$this->requiredFields[$name] = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a field by his name and return his atribut to check his validity.
|
||||
* @param string $name
|
||||
* @throws TwengaFieldsException if a TwengaFields::$field is an array,
|
||||
* @throws TwengaFieldsException if the choosen field is not set.
|
||||
* @return array field attributs
|
||||
*/
|
||||
public function getField($name)
|
||||
{
|
||||
if (!is_array($this->fields))
|
||||
throw new TwengaFieldsException(Tools::displayError('To get a field you have to saved some fields !'));
|
||||
if(!key_exists($name, $this->fields))
|
||||
throw new TwengaFieldsException(Tools::displayError('The field').' <b>'.$name.'</b> '.Tools::displayError('doesn\'t exist.'));
|
||||
return $this->fields[$name];
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the value of one field by his name
|
||||
* @param string $key is field name to check.
|
||||
* @param string $value is field value.
|
||||
* @return string empty if it's ok, otherwise a string of errors.
|
||||
*/
|
||||
private function isValidate($key, $value)
|
||||
{
|
||||
$fieldValidate = $this->getField($key);
|
||||
$str_return = '';
|
||||
// check the length
|
||||
if(strlen((string)$value) > $fieldValidate[0] AND $fieldValidate[0] !== 0)
|
||||
return Tools::displayError('Wrong length of the value. Must be set between 1 and ').$fieldValidate[0].'<br />'."\n";
|
||||
|
||||
// check each validators.
|
||||
foreach ($fieldValidate[1] as $validator)
|
||||
{
|
||||
$user_function = function_exists($validator) ? $validator : '';
|
||||
$user_function = method_exists('Validate', $validator) ? array('Validate', $validator) : $user_function;
|
||||
$user_function = method_exists($this->className, $validator) ? array($this->className, $validator) : $user_function;
|
||||
try {
|
||||
$bool = call_user_func($user_function, $value);
|
||||
if(!$bool)
|
||||
$str_return .= Tools::displayError('Value don\'t respect the validator : ').'<b>'.$validator.'</b><br />'."\n";;
|
||||
} catch (TwengaFieldsException $e) {
|
||||
$str_return .= $e->getMessage();
|
||||
}
|
||||
}
|
||||
return $str_return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare an array of values to each required fields.
|
||||
*
|
||||
* The method doesn't work if they are no required fields.
|
||||
*
|
||||
* No return value for this method, if compared array key
|
||||
* and TwengaFields::$requiredFields key match,
|
||||
* the TwengaFields::$requiredFields value become true.
|
||||
*
|
||||
* In this way if false value is found in TwengaFields::$requiredFields array,
|
||||
* it means that compared array is not filled enough.
|
||||
* @see TwengaFields::requiredFieldsAreSet() is the one using TwengaFields::compareFields().
|
||||
*/
|
||||
private function compareFields()
|
||||
{
|
||||
if(is_array($this->requiredFields) AND !empty($this->requiredFields))
|
||||
{
|
||||
$arr_compare = array_intersect_key($this->requiredFields, $this->params);
|
||||
foreach ($this->requiredFields as $key=>&$value)
|
||||
$value = key_exists($key, $arr_compare);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if each required fields are set
|
||||
* see TwengaFields::compareFields().
|
||||
* Else the method throw an error message.
|
||||
* @return boolean if it's ok
|
||||
* @throws TwengaFieldsException in case of a required field missing.
|
||||
*/
|
||||
private function requiredFieldsAreSet()
|
||||
{
|
||||
if(is_array($this->requiredFields) AND !empty($this->requiredFields))
|
||||
{
|
||||
$fields_not_set = array_keys($this->requiredFields, false);
|
||||
if(!empty($fields_not_set))
|
||||
throw new TwengaFieldsException (Tools::displayError('Some fields must be set').' : <b>'.implode(', ', $fields_not_set).'</b>');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set values params
|
||||
* @param array $params
|
||||
* @return TwengaFields current instance for chainability
|
||||
*/
|
||||
public function setParams(array $params)
|
||||
{
|
||||
if(empty($params))
|
||||
throw new TwengaFieldsException(Tools::displayError('Params must be filled'));
|
||||
$this->params = $params;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check params validity (length, validators, is required)
|
||||
* for each TwengaFields::$params value.
|
||||
* @see TwengaFields::compareFields() and TwengaFields::requiredFieldsAreSet()
|
||||
* to know required fields checking method.
|
||||
* @see TwengaFields::isValidate() to know the checking behaviour (length and Validators).
|
||||
* @throws TwengaFieldsException if TwengaFields::$params not set before.
|
||||
* @throws TwengaFieldsException with list of not validated values.
|
||||
* Using TwengaFields::isValidate() method to work.
|
||||
* @throws TwengaFieldsException occurred while compared
|
||||
* TwengaFields::$params and TwengaFields::$fields
|
||||
* * to check if required fields are filled.
|
||||
*/
|
||||
public function checkParams()
|
||||
{
|
||||
if(!is_array($this->params) || empty($this->params))
|
||||
throw new TwengaFieldsException(Tools::displayError('Params must be setted before check it'));
|
||||
try {
|
||||
$this->compareFields();
|
||||
$this->requiredFieldsAreSet();
|
||||
} catch (TwengaFieldsException $e) {
|
||||
throw $e;
|
||||
}
|
||||
$str_message = '';
|
||||
foreach ($this->params as $key=>$value)
|
||||
{
|
||||
$validate = $this->isValidate($key, $value);
|
||||
if($validate !== '')
|
||||
$str_message .= Tools::displayError('The field').' <b>'.$key.'</b> '.Tools::displayError('is a wrong value, see details :').'<br />'."\n<em>".$validate.'</em>';
|
||||
}
|
||||
if($str_message !== '')
|
||||
throw new TwengaFieldsException($str_message);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array TwengaFields::$params
|
||||
*/
|
||||
public function getParams()
|
||||
{
|
||||
return $this->params;
|
||||
}
|
||||
/**
|
||||
* Get translation for a given module text
|
||||
*
|
||||
* @param string $string String to translate
|
||||
* @return string Translation
|
||||
*/
|
||||
public function l($string, $specific = false)
|
||||
{
|
||||
global $_MODULES, $_MODULE, $cookie;
|
||||
|
||||
$id_lang = (!isset($cookie) OR !is_object($cookie)) ? (int)(Configuration::get('PS_LANG_DEFAULT')) : (int)($cookie->id_lang);
|
||||
$file = _PS_MODULE_DIR_.$this->name.'/'.Language::getIsoById($id_lang).'.php';
|
||||
if (Tools::file_exists_cache($file) AND include_once($file))
|
||||
$_MODULES = !empty($_MODULES) ? array_merge($_MODULES, $_MODULE) : $_MODULE;
|
||||
|
||||
if (!is_array($_MODULES))
|
||||
return (str_replace('"', '"', $string));
|
||||
|
||||
$source = Tools::strtolower($specific ? $specific : get_class($this));
|
||||
$string2 = str_replace('\'', '\\\'', $string);
|
||||
$currentKey = '<{'.$this->name.'}'._THEME_NAME_.'>'.$source.'_'.md5($string2);
|
||||
$defaultKey = '<{'.$this->name.'}prestashop>'.$source.'_'.md5($string2);
|
||||
|
||||
if (key_exists($currentKey, $_MODULES))
|
||||
$ret = stripslashes($_MODULES[$currentKey]);
|
||||
elseif (key_exists($defaultKey, $_MODULES))
|
||||
$ret = stripslashes($_MODULES[$defaultKey]);
|
||||
else
|
||||
$ret = $string;
|
||||
return str_replace('"', '"', $ret);
|
||||
}
|
||||
}
|
||||
class TwengaFieldsException extends Exception {}
|
||||
@@ -1,59 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA : 6 rue lacepede, 75005 PARIS
|
||||
* @version Release: $Revision: 1.4 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
**/
|
||||
|
||||
/**
|
||||
* @author Nans Pellicari - Prestashop
|
||||
* @version 1.3
|
||||
*/
|
||||
class TwengaFieldsGetSubscriptionLink extends TwengaFields
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
if(!is_array($this->fields) AND empty($this->fields))
|
||||
{
|
||||
$this->fields['PARTNER_AUTH_KEY'] = array(56, array('is_string', 'isCleanHtml'), true);
|
||||
$this->fields['site_url'] = array(200, array('is_string', 'isUrl'), true);
|
||||
$this->fields['feed_url'] = array(200, array('is_string', 'isUrl'), true);
|
||||
$this->fields['country'] = array(2, array('is_string', 'isCountryName'), true);
|
||||
$this->fields['site_id'] = array(32, array('is_string', 'isCleanHtml'));
|
||||
$this->fields['site_name'] = array(100, array('is_string', 'isCleanHtml'));
|
||||
$this->fields['firstname'] = array(100, array('is_string', 'isCleanHtml'));
|
||||
$this->fields['lastname'] = array(100, array('is_string', 'isCleanHtml'));
|
||||
$this->fields['civility'] = array(40, array('is_string', 'isCleanHtml'));
|
||||
$this->fields['position'] = array(100, array('is_string', 'isCleanHtml'));
|
||||
$this->fields['email'] = array(100, array('is_string', 'isEmail'));
|
||||
$this->fields['phone'] = array(30, array('is_string', 'isPhoneNumber'));
|
||||
$this->fields['mobile'] = array(30, array('is_string', 'isPhoneNumber'));
|
||||
$this->fields['organisation_name'] = array(100, array('is_string', 'isCleanHtml'));
|
||||
$this->fields['legaltype'] = array(30, array('is_string', 'isCleanHtml'));
|
||||
$this->fields['address'] = array(100, array('is_string', 'isCleanHtml'));
|
||||
$this->fields['postal_code'] = array(10, array('is_string', 'isCleanHtml'));
|
||||
$this->fields['city'] = array(30, array('is_string', 'isCityName'));
|
||||
}
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA : 6 rue lacepede, 75005 PARIS
|
||||
* @version Release: $Revision: 1.4 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
**/
|
||||
|
||||
/**
|
||||
* @author Nans Pellicari - Prestashop
|
||||
* @version 1.3
|
||||
*/
|
||||
class TwengaFieldsGetTrackingScript extends TwengaFields
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
if(!is_array($this->fields) AND empty($this->fields))
|
||||
{
|
||||
// required
|
||||
$this->fields['PARTNER_AUTH_KEY'] = array(56, array('is_string', 'isCleanHtml'), true);
|
||||
$this->fields['key'] = array(32, array('is_string','isCleanHtml'), true);
|
||||
$this->fields['total_ht'] = array(0, array('isFloat'), true);
|
||||
$this->fields['order_id'] = array(40, array('isInt'));
|
||||
$this->fields['user_id'] = array(40, array('isInt'));
|
||||
$this->fields['cli_email'] = array(100, array('isEmail'));
|
||||
$this->fields['basket_id'] = array(40, array('isInt'));
|
||||
|
||||
// optionnals
|
||||
$this->fields['currency'] = array(40, array('is_string','isCleanHtml'));
|
||||
$this->fields['total_ttc'] = array(0, array('isFloat'));
|
||||
$this->fields['shipping'] = array(0, array('isFloat'));
|
||||
$this->fields['tax'] = array(0, array('isFloat'));
|
||||
$this->fields['tva'] = array(0, array('isFloat'));
|
||||
$this->fields['cli_firstname'] = array(0, array('is_string','isCleanHtml'));
|
||||
$this->fields['cli_lastname'] = array(0, array('is_string','isCleanHtml'));
|
||||
$this->fields['cli_city'] = array(0, array('is_string','isCleanHtml'));
|
||||
$this->fields['cli_state'] = array(0, array('is_string','isCleanHtml'));
|
||||
$this->fields['cli_country'] = array(0, array('is_string','isCleanHtml'));
|
||||
$this->fields['cli_segment'] = array(0, array('is_string','isCleanHtml'));
|
||||
$this->fields['payement_method'] = array(0, array('is_string','isCleanHtml'));
|
||||
|
||||
|
||||
// Array of items
|
||||
$this->fields['items'] = array(0, array('is_array', 'isItemsOrder'));
|
||||
}
|
||||
parent::__construct();
|
||||
}
|
||||
public static function isItemsOrder (array $value)
|
||||
{
|
||||
$str_error = Tools::displayError('For the items');
|
||||
foreach ($value as $key=>$item)
|
||||
{
|
||||
$str_error .= ' '.$key.' ';
|
||||
$str_error .= isset($item['name']) ? $item['name'].' ' : '';
|
||||
$str_error .= ' :';
|
||||
if(isset($item['total_ht']) && !Validate::isFloat($item['total_ht']))
|
||||
throw new TwengaFieldsException($str_error.Tools::displayError('The total HT must be a float value.'));
|
||||
if(isset($item['quantity']) && !Validate::isInt($item['quantity']))
|
||||
throw new TwengaFieldsException($str_error.Tools::displayError('The quantity must be a integer value.'));
|
||||
if(isset($item['sku']) && !is_string($item['sku']) && strlen($item['sku']) > 40)
|
||||
throw new TwengaFieldsException($str_error.Tools::displayError('The sku must be a string with length less than 40 chars.'));
|
||||
if(isset($item['name']) && !is_string($item['name']))
|
||||
throw new TwengaFieldsException($str_error.Tools::displayError('The name must be a string with length less than 100 chars.'));
|
||||
if(isset($item['category_name']) && !is_string($item['category_name']))
|
||||
throw new TwengaFieldsException($str_error.Tools::displayError('The category name must be a string with length less than 100 chars.'));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA : 6 rue lacepede, 75005 PARIS
|
||||
* @version Release: $Revision: 1.4 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
**/
|
||||
/**
|
||||
* @author Nans Pellicari - Prestashop
|
||||
* @version 1.3
|
||||
*/
|
||||
class TwengaFieldsOrderCancel extends TwengaFieldsOrderValidate
|
||||
{}
|
||||
@@ -1,33 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA : 6 rue lacepede, 75005 PARIS
|
||||
* @version Release: $Revision: 1.4 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
**/
|
||||
|
||||
/**
|
||||
* @author Nans Pellicari - Prestashop
|
||||
* @version 1.3
|
||||
*/
|
||||
class TwengaFieldsOrderExist extends TwengaFieldsOrderValidate
|
||||
{}
|
||||
@@ -1,47 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA : 6 rue lacepede, 75005 PARIS
|
||||
* @version Release: $Revision: 1.4 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
**/
|
||||
|
||||
/**
|
||||
* @author Nans Pellicari - Prestashop
|
||||
* @version 1.3
|
||||
*/
|
||||
class TwengaFieldsOrderValidate extends TwengaFields
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
if(!is_array($this->fields) AND empty($this->fields))
|
||||
{
|
||||
$this->fields['key'] = array(32, array('is_string','isCleanHtml'), true);
|
||||
$this->fields['PARTNER_AUTH_KEY'] = array(56, array('is_string', 'isCleanHtml'), true);
|
||||
$this->fields['order_id'] = array(40, array('isInt'));
|
||||
$this->fields['user_id'] = array(40, array('isInt'));
|
||||
$this->fields['cli_email'] = array(100, array('isEmail'));
|
||||
$this->fields['basket_id'] = array(40, array('isInt'));
|
||||
}
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA : 6 rue lacepede, 75005 PARIS
|
||||
* @version Release: $Revision: 1.4 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
**/
|
||||
|
||||
/**
|
||||
* @author Nans Pellicari - Prestashop
|
||||
* @version 1.3
|
||||
*/
|
||||
class TwengaFieldsSiteActivate extends TwengaFieldsSiteExist
|
||||
{}
|
||||
@@ -1,43 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA : 6 rue lacepede, 75005 PARIS
|
||||
* @version Release: $Revision: 1.4 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
**/
|
||||
|
||||
/**
|
||||
* @author Nans Pellicari - Prestashop
|
||||
* @version 1.3
|
||||
*/
|
||||
class TwengaFieldsSiteExist extends TwengaFields
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
if(!is_array($this->fields) AND empty($this->fields))
|
||||
{
|
||||
$this->fields['key'] = array(32, array('is_string', 'isCleanHtml'), true);
|
||||
$this->fields['PARTNER_AUTH_KEY'] = array(56, array('is_string', 'isCleanHtml'), true);
|
||||
}
|
||||
parent::__construct();
|
||||
}
|
||||
}
|
||||
@@ -1,577 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* 2007-2011 PrestaShop
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Academic Free License (AFL 3.0)
|
||||
* that is bundled with this package in the file LICENSE.txt.
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* http://opensource.org/licenses/afl-3.0.php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to license@prestashop.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
|
||||
* versions in the future. If you wish to customize PrestaShop for your
|
||||
* needs please refer to http://www.prestashop.com for more information.
|
||||
*
|
||||
* @author PrestaShop SA <contact@prestashop.com>
|
||||
* @copyright 2007-2011 PrestaShop SA : 6 rue lacepede, 75005 PARIS
|
||||
* @version Release: $Revision: 1.4 $
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
**/
|
||||
|
||||
/**
|
||||
* This Class allow to use Twenga API.
|
||||
* See details for more infos.
|
||||
*
|
||||
* @author Nans Pellicari - Prestashop
|
||||
* @version 1.3
|
||||
*/
|
||||
class TwengaObj
|
||||
{
|
||||
/**
|
||||
* path to load each needed files
|
||||
* @var string
|
||||
*/
|
||||
public static $base_dir;
|
||||
|
||||
/**
|
||||
* Set the object which use the translation method for the specific module.
|
||||
* @var AbsTrustedShops
|
||||
*/
|
||||
private static $translation_object;
|
||||
|
||||
/**
|
||||
* @var string for authentication on Twenga API
|
||||
*/
|
||||
private static $user_name;
|
||||
|
||||
/**
|
||||
* @var string for authentication on Twenga API
|
||||
*/
|
||||
private static $password;
|
||||
|
||||
/**
|
||||
* This partner_id is the same for each prestashop/twenga module.
|
||||
* You don't have to change it.
|
||||
*/
|
||||
const PARTNER_AUTH_KEY = 'NTM3YTU1MTJjNTZhODg3OWI2Y2FhNDgyZjU4Njc0ZWU5NDMyNjgxNA==';
|
||||
|
||||
/**
|
||||
* @var array is build in constructor, save all url method of twenga API
|
||||
*/
|
||||
private static $arr_api_url;
|
||||
|
||||
/**
|
||||
* @var string is the twenga hashkey, use to identify the merchant.
|
||||
* this value is saved in the configuration table in database.
|
||||
* @see TwengaObj::saveMerchantLogin()
|
||||
* @see TwengaObj::__constructor()
|
||||
*/
|
||||
public static $hashkey;
|
||||
|
||||
public function getUserName()
|
||||
{
|
||||
return self::$user_name;
|
||||
}
|
||||
public function setUserName($user_name)
|
||||
{
|
||||
if($user_name !== '' && is_string($user_name))
|
||||
{
|
||||
self::$user_name = $user_name;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
public function getPassword()
|
||||
{
|
||||
return self::$password;
|
||||
}
|
||||
public function setPassword($password)
|
||||
{
|
||||
if($password !== '' && Validate::isCleanHtml($password) && is_string($password) && strlen($password) <= 32)
|
||||
{
|
||||
self::$password = $password;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
public function getHashkey()
|
||||
{
|
||||
return self::$hashkey;
|
||||
}
|
||||
/**
|
||||
* Set the hashkey
|
||||
* @param string $hashkey
|
||||
* @return boolean true if it's a valid key false otherwise.
|
||||
*/
|
||||
public function setHashkey($hashkey)
|
||||
{
|
||||
if($hashkey !== '' && Validate::isCleanHtml($hashkey) && is_string($hashkey) && strlen($hashkey) <= 32)
|
||||
{
|
||||
self::$hashkey = $hashkey;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
public static function deleteMerchantLogin()
|
||||
{
|
||||
Configuration::deleteByName('TWENGA_USER_NAME');
|
||||
self::$user_name = null;
|
||||
Configuration::deleteByName('TWENGA_PASSWORD');
|
||||
self::$password = null;
|
||||
Configuration::deleteByName('TWENGA_HASHKEY');
|
||||
self::$hashkey = null;
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* Save the Login access and hashkey in database
|
||||
* Use TwengaObj::siteExist() method to check the hashkey validity and login
|
||||
*/
|
||||
public function saveMerchantLogin()
|
||||
{
|
||||
if(self::$user_name !== NULL
|
||||
&& self::$password !== NULL
|
||||
&& self::$hashkey !== NULL)
|
||||
{
|
||||
$site_exist = false;
|
||||
|
||||
try {
|
||||
$site_exist = $this->siteExist();
|
||||
} catch (Exception $e) {
|
||||
self::deleteMerchantLogin();
|
||||
throw $e;
|
||||
}
|
||||
if (!$site_exist)
|
||||
{
|
||||
self::deleteMerchantLogin();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Configuration::updateValue('TWENGA_USER_NAME', self::$user_name);
|
||||
Configuration::updateValue('TWENGA_PASSWORD', self::$password);
|
||||
Configuration::updateValue('TWENGA_HASHKEY', self::$hashkey);
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public function getArrApiUrl ()
|
||||
{
|
||||
return self::$arr_api_url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor get all necessary infos for the API.
|
||||
* - urls for API methods
|
||||
* - the hashkey, login & password for authentication
|
||||
* Else method check
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
require_once realpath(self::$base_dir.'/TwengaFields.php');
|
||||
|
||||
if (self::$arr_api_url === NULL)
|
||||
{
|
||||
self::$arr_api_url = array();
|
||||
self::$arr_api_url['getSubscriptionLink'] = 'http://rts.twenga.com/api/Site/GetSubscriptionLink';
|
||||
self::$arr_api_url['siteExist'] = 'http://rts.twenga.com/api/Site/Exist';
|
||||
self::$arr_api_url['siteActivate'] = 'http://rts.twenga.com/api/Site/Activate';
|
||||
self::$arr_api_url['getTrackingScript'] = 'http://rts.twenga.com/api/Site/GetTrackingScript';
|
||||
self::$arr_api_url['orderExist'] = 'http://rts.twenga.com/api/Order/Exist';
|
||||
self::$arr_api_url['orderValidate'] = 'http://rts.twenga.com/api/Order/Validate';
|
||||
self::$arr_api_url['orderCancel'] = 'http://rts.twenga.com/api/Order/Cancel';
|
||||
self::$arr_api_url['addFeed'] = 'https://rts.twenga.com/api/Site/AddFeed';
|
||||
|
||||
if(self::PARTNER_AUTH_KEY === NULL)
|
||||
throw new TwengaException(self::$translation_object->l('To activate the Twenga plugin, "PARTNER_AUTH_KEY" contant must be set. Default installation of Prestashop contains this value.', basename(__FILE__, '.php')));
|
||||
|
||||
if (Configuration::get('TWENGA_HASHKEY') !== false && self::$hashkey === NULL)
|
||||
self::$hashkey = Configuration::get('TWENGA_HASHKEY');
|
||||
if (Configuration::get('TWENGA_USER_NAME') !== false && self::$user_name === NULL)
|
||||
self::$user_name = Configuration::get('TWENGA_USER_NAME');
|
||||
if (Configuration::get('TWENGA_PASSWORD') !== false && self::$password === NULL)
|
||||
self::$password = Configuration::get('TWENGA_PASSWORD');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Build correct URl for cURL, using array of params
|
||||
* @param string $url
|
||||
* @param array $params
|
||||
*/
|
||||
private static function buildUrlToQuery($url, array $params)
|
||||
{
|
||||
$str_params = http_build_query($params);
|
||||
$str_url = $url.(($str_params !== '') ? '?'.$str_params : '');
|
||||
return $str_url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute cURL to access of the Twenga API.
|
||||
* @param string $query
|
||||
* @param array $params
|
||||
* @param boolean $authentication
|
||||
* @throws TwengaException in case of cURL error.
|
||||
* @return array with status code and response of the cURL request.
|
||||
*/
|
||||
private static function executeQuery($query, array $params = array(), $authentication = true)
|
||||
{
|
||||
$defaultParams = array(
|
||||
CURLOPT_HEADER => TRUE,
|
||||
CURLOPT_RETURNTRANSFER => TRUE,
|
||||
CURLINFO_HEADER_OUT => TRUE,
|
||||
CURLOPT_HTTPAUTH => CURLAUTH_BASIC,
|
||||
);
|
||||
if($authentication)
|
||||
$defaultParams[CURLOPT_USERPWD] = md5(self::$user_name).':'.md5(self::$password);
|
||||
$session = curl_init($query);
|
||||
$arr_opt = $defaultParams + $params;
|
||||
curl_setopt_array($session, $arr_opt);
|
||||
$response = curl_exec($session);
|
||||
$response = explode("\r\n\r\n", $response);
|
||||
|
||||
$header = $response[0];
|
||||
$response = $response[1];
|
||||
|
||||
$status_code = (int)curl_getinfo($session, CURLINFO_HTTP_CODE);
|
||||
if ($status_code === 0)
|
||||
throw new TwengaException('CURL Error: '.curl_error($session));
|
||||
curl_close($session);
|
||||
|
||||
return array('status_code' => $status_code, 'response' => $response);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $method_name use to instanciate the good TwengaFields subclass.
|
||||
* @param array $params to check
|
||||
* @throws TwengaException if the object instanciate by the method name to check $params is a TwengaFields subclass.
|
||||
* @throws TwengaFieldsException thrown by the TwengaFields::checkParams() method.
|
||||
*/
|
||||
public static function checkParams($method_name, array $params)
|
||||
{
|
||||
$classname = 'TwengaFields'.ucfirst($method_name);
|
||||
if(class_exists($classname))
|
||||
{
|
||||
$fields = new $classname();
|
||||
if(!$fields instanceof TwengaFields)
|
||||
throw new TwengaException(self::$translation_object->l('Object for validate fields must be an instance of TwengaFields class', basename(__FILE__, '.php')));
|
||||
try {
|
||||
$fields->setParams($params)->checkParams();
|
||||
} catch (TwengaFieldsException $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @throws TwengaFieldsException
|
||||
* @throws TwengaException
|
||||
*/
|
||||
public function getSubscriptionLink(array $params = array())
|
||||
{
|
||||
require_once realpath(self::$base_dir.'/TwengaFieldsGetSubscriptionLink.php');
|
||||
// $params['site_id'] = self::$site_id;
|
||||
$params['PARTNER_AUTH_KEY'] = self::PARTNER_AUTH_KEY;
|
||||
try {
|
||||
self::checkParams(__FUNCTION__, $params);
|
||||
} catch (TwengaFieldsException $e) {
|
||||
throw $e;
|
||||
}
|
||||
$str_params = self::buildUrlToQuery(self::$arr_api_url[__FUNCTION__],$params);
|
||||
|
||||
try {
|
||||
$response = self::executeQuery($str_params, array(), false);
|
||||
self::checkStatusCode($response['status_code']);
|
||||
$obj_xml = self::parseXml($response['response']);
|
||||
} catch (TwengaException $e) {
|
||||
throw $e;
|
||||
} catch (Exception $e) {
|
||||
throw new TwengaException(self::$translation_object->l($e->getMessage(),basename(__FILE__, '.php')), $e->getCode());
|
||||
}
|
||||
return (array)$obj_xml;
|
||||
}
|
||||
|
||||
public function addFeed($params = array())
|
||||
{
|
||||
require_once realpath(self::$base_dir.'/TwengaAddFeed.php');
|
||||
$params['key'] = self::$hashkey;
|
||||
$params['PARTNER_AUTH_KEY'] = self::PARTNER_AUTH_KEY;
|
||||
try {
|
||||
self::checkParams(__FUNCTION__, $params);
|
||||
} catch (TwengaFieldsException $e) {
|
||||
throw $e;
|
||||
}
|
||||
$str_params = self::buildUrlToQuery(self::$arr_api_url[__FUNCTION__],$params);
|
||||
try {
|
||||
$response = self::executeQuery($str_params);
|
||||
self::checkStatusCode($response['status_code']);
|
||||
$obj_xml = self::parseXml($response['response']);
|
||||
} catch (TwengaException $e) {
|
||||
throw $e;
|
||||
} catch (Exception $e) {
|
||||
throw new TwengaException(self::$translation_object->l($e->getMessage(),basename(__FILE__, '.php')), $e->getCode());
|
||||
}
|
||||
return ((string)$obj_xml->message === 'true') ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @throws TwengaFieldsException
|
||||
* @throws TwengaException
|
||||
*/
|
||||
public function siteExist(array $params = array())
|
||||
{
|
||||
require_once realpath(self::$base_dir.'/TwengaFieldsSiteExist.php');
|
||||
$params['key'] = self::$hashkey;
|
||||
$params['PARTNER_AUTH_KEY'] = self::PARTNER_AUTH_KEY;
|
||||
|
||||
try {
|
||||
self::checkParams(__FUNCTION__, $params);
|
||||
} catch (TwengaFieldsException $e) {
|
||||
throw $e;
|
||||
}
|
||||
$str_params = self::buildUrlToQuery(self::$arr_api_url[__FUNCTION__],$params);
|
||||
try {
|
||||
$response = self::executeQuery($str_params);
|
||||
self::checkStatusCode($response['status_code']);
|
||||
$obj_xml = self::parseXml($response['response']);
|
||||
} catch (TwengaException $e) {
|
||||
throw $e;
|
||||
} catch (Exception $e) {
|
||||
throw new TwengaException(self::$translation_object->l($e->getMessage(),basename(__FILE__, '.php')), $e->getCode());
|
||||
}
|
||||
return ((string)$obj_xml->message === 'true') ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @throws TwengaFieldsException
|
||||
* @throws TwengaException
|
||||
*/
|
||||
public function siteActivate(array $params = array())
|
||||
{
|
||||
require_once realpath(self::$base_dir.'/TwengaFieldsSiteExist.php');
|
||||
require_once realpath(self::$base_dir.'/TwengaFieldsSiteActivate.php');
|
||||
$params['key'] = self::$hashkey;
|
||||
$params['PARTNER_AUTH_KEY'] = self::PARTNER_AUTH_KEY;
|
||||
try {
|
||||
self::checkParams(__FUNCTION__, $params);
|
||||
} catch (TwengaFieldsException $e) {
|
||||
throw $e;
|
||||
}
|
||||
$str_params = self::buildUrlToQuery(self::$arr_api_url[__FUNCTION__],$params);
|
||||
|
||||
try {
|
||||
$response = self::executeQuery($str_params);
|
||||
self::checkStatusCode($response['status_code']);
|
||||
$obj_xml = self::parseXml($response['response']);
|
||||
} catch (TwengaException $e) {
|
||||
throw $e;
|
||||
} catch (Exception $e) {
|
||||
throw new TwengaException(self::$translation_object->l($e->getMessage(),basename(__FILE__, '.php')), $e->getCode());
|
||||
}
|
||||
return ((string)$obj_xml->message === 'true') ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @throws TwengaFieldsException
|
||||
* @throws TwengaException
|
||||
*/
|
||||
public function getTrackingScript(array $params = array())
|
||||
{
|
||||
require_once realpath(self::$base_dir.'/TwengaFieldsGetTrackingScript.php');
|
||||
$params['key'] = self::$hashkey;
|
||||
$params['PARTNER_AUTH_KEY'] = self::PARTNER_AUTH_KEY;
|
||||
try {
|
||||
self::checkParams(__FUNCTION__, $params);
|
||||
} catch (TwengaFieldsException $e) {
|
||||
throw $e;
|
||||
}
|
||||
$str_params = self::buildUrlToQuery(self::$arr_api_url[__FUNCTION__],$params);
|
||||
try {
|
||||
$response = self::executeQuery($str_params);
|
||||
self::checkStatusCode($response['status_code']);
|
||||
$obj_xml = self::parseXml($response['response']);
|
||||
} catch (TwengaException $e) {
|
||||
throw $e;
|
||||
} catch (Exception $e) {
|
||||
throw new TwengaException(self::$translation_object->l($e->getMessage(),basename(__FILE__, '.php')), $e->getCode());
|
||||
}
|
||||
return (string)$obj_xml->message;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @throws TwengaFieldsException
|
||||
* @throws TwengaException
|
||||
*/
|
||||
public function orderExist(array $params = array())
|
||||
{
|
||||
require_once realpath(self::$base_dir.'/TwengaFieldsOrderValidate.php');
|
||||
require_once realpath(self::$base_dir.'/TwengaFieldsOrderExist.php');
|
||||
$params['key'] = self::$hashkey;
|
||||
$params['PARTNER_AUTH_KEY'] = self::PARTNER_AUTH_KEY;
|
||||
try {
|
||||
self::checkParams(__FUNCTION__, $params);
|
||||
} catch (TwengaFieldsException $e) {
|
||||
throw $e;
|
||||
}
|
||||
$str_params = self::buildUrlToQuery(self::$arr_api_url[__FUNCTION__],$params);
|
||||
try {
|
||||
$response = self::executeQuery($str_params);
|
||||
self::checkStatusCode($response['status_code']);
|
||||
$obj_xml = self::parseXml($response['response']);
|
||||
} catch (TwengaException $e) {
|
||||
throw $e;
|
||||
} catch (Exception $e) {
|
||||
throw new TwengaException(self::$translation_object->l($e->getMessage(),basename(__FILE__, '.php')), $e->getCode());
|
||||
}
|
||||
return ((string)$obj_xml->message === 'true') ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @throws TwengaFieldsException
|
||||
* @throws TwengaException
|
||||
*/
|
||||
public function orderValidate(array $params = array())
|
||||
{
|
||||
require_once realpath(self::$base_dir.'/TwengaFieldsOrderValidate.php');
|
||||
$params['key'] = self::$hashkey;
|
||||
$params['PARTNER_AUTH_KEY'] = self::PARTNER_AUTH_KEY;
|
||||
try {
|
||||
self::checkParams(__FUNCTION__, $params);
|
||||
} catch (TwengaFieldsException $e) {
|
||||
throw $e;
|
||||
}
|
||||
$str_params = self::buildUrlToQuery(self::$arr_api_url[__FUNCTION__],$params);
|
||||
try {
|
||||
$response = self::executeQuery($str_params);
|
||||
self::checkStatusCode($response['status_code']);
|
||||
$obj_xml = self::parseXml($response['response']);
|
||||
} catch (TwengaException $e) {
|
||||
throw $e;
|
||||
} catch (Exception $e) {
|
||||
throw new TwengaException(self::$translation_object->l($e->getMessage(),basename(__FILE__, '.php')), $e->getCode());
|
||||
}
|
||||
return ((string)$obj_xml->message === 'true') ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @throws TwengaFieldsException
|
||||
* @throws TwengaException
|
||||
*/
|
||||
public function orderCancel(array $params = array())
|
||||
{
|
||||
require_once realpath(self::$base_dir.'/TwengaFieldsOrderValidate.php');
|
||||
require_once realpath(self::$base_dir.'/TwengaFieldsOrderCancel.php');
|
||||
$params['key'] = self::$hashkey;
|
||||
try {
|
||||
self::checkParams(__FUNCTION__, $params);
|
||||
} catch (TwengaFieldsException $e) {
|
||||
throw $e;
|
||||
}
|
||||
$str_params = self::buildUrlToQuery(self::$arr_api_url[__FUNCTION__],$params);
|
||||
try {
|
||||
$response = self::executeQuery($str_params);
|
||||
self::checkStatusCode($response['status_code']);
|
||||
$obj_xml = self::parseXml($response['response']);
|
||||
} catch (TwengaException $e) {
|
||||
throw $e;
|
||||
} catch (Exception $e) {
|
||||
throw new TwengaException(self::$translation_object->l($e->getMessage(),basename(__FILE__, '.php')), $e->getCode());
|
||||
}
|
||||
return ((string)$obj_xml->message === 'true') ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $resource to parse
|
||||
* @throws TwengaException
|
||||
*/
|
||||
public static function parseXml($resource)
|
||||
{
|
||||
if ($resource != '')
|
||||
{
|
||||
libxml_use_internal_errors(true);
|
||||
$xml = simplexml_load_string($resource);
|
||||
if (libxml_get_errors())
|
||||
throw new TwengaException(self::$translation_object->l('HTTP XML response is not parsable : ', basename(__FILE__, '.php')).'<br />'.var_export(libxml_get_errors(), true));
|
||||
if($xml->getName() === 'error')
|
||||
throw new TwengaException(self::$translation_object->l((string)$xml->message,basename(__FILE__, '.php')), (int)$xml->code);
|
||||
return $xml;
|
||||
}
|
||||
else
|
||||
throw new TwengaException(self::$translation_object->l('HTTP response is empty'));
|
||||
}
|
||||
/**
|
||||
* @param int $status_code
|
||||
* @throws TwengaException message depends on the error code
|
||||
*/
|
||||
protected static function checkStatusCode($status_code)
|
||||
{
|
||||
switch($status_code)
|
||||
{
|
||||
case 200:case 201:break;
|
||||
default: throw new TwengaException('', (int)$status_code);
|
||||
}
|
||||
}
|
||||
|
||||
static public function setTranslationObject(Module $object)
|
||||
{
|
||||
self::$translation_object = $object;
|
||||
}
|
||||
}
|
||||
class TwengaException extends Exception
|
||||
{
|
||||
/**
|
||||
* Set the object which use the translation method for the specific module.
|
||||
* @var AbsTrustedShops
|
||||
*/
|
||||
private static $translation_object;
|
||||
static public function setTranslationObject(Module $object)
|
||||
{
|
||||
self::$translation_object = $object;
|
||||
}
|
||||
public function __construct($message, $code = 0)
|
||||
{
|
||||
if($code !== 0)
|
||||
{
|
||||
$error_label = self::$translation_object->l('This call to Twenga Web Services failed and returned an HTTP status of %d. That means:', basename(__FILE__, '.php'))."\n";
|
||||
$error_label = sprintf($error_label, $code);
|
||||
if($message === '' || empty($message) || $message === NULL)
|
||||
{
|
||||
switch ($code)
|
||||
{
|
||||
case 11: $message .= self::$translation_object->l('The function you tried to access does not exist', basename(__FILE__, '.php'));break;
|
||||
case 12: $message .= self::$translation_object->l('A required field is empty', basename(__FILE__, '.php'));break;
|
||||
case 13: $message .= self::$translation_object->l('The type of the parameter that has been sent is different from parameter expected type', basename(__FILE__, '.php'));break;
|
||||
case 21: $message .= self::$translation_object->l('Hash key is not valid', basename(__FILE__, '.php'));break;
|
||||
case 24: $message .= self::$translation_object->l('Hash key is required', basename(__FILE__, '.php'));break;
|
||||
case 31: $message .= self::$translation_object->l('No order found. Please check parameters you sent', basename(__FILE__, '.php'));break;
|
||||
case 401: $message .= self::$translation_object->l('Authentication is required.', basename(__FILE__, '.php'));break;
|
||||
case 403: $message .= self::$translation_object->l('Authentication failed.', basename(__FILE__, '.php'));break;
|
||||
case 404: $message .= self::$translation_object->l('Invalid url.', basename(__FILE__, '.php'));break;
|
||||
case 500: $message .= self::$translation_object->l('The server encountered an internal server error', basename(__FILE__, '.php'));break;
|
||||
case 503: $message .= self::$translation_object->l('The server is unavailable for the moment', basename(__FILE__, '.php'));break;
|
||||
default: $message .= self::$translation_object->l('This call to PrestaShop Web Services returned an unexpected HTTP status of:', basename(__FILE__, '.php')).$code;
|
||||
}
|
||||
}
|
||||
$message = self::$translation_object->l('Error #', basename(__FILE__, '.php')).$code." : \n".$error_label.$message.'';
|
||||
}
|
||||
parent::__construct($message, $code);
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.8 KiB |
@@ -1,14 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Site prestashop {shop_country} ayant supprimé le module</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Le site suivant {shop_url} a désactivé/supprimé son module Twenga.</p>
|
||||
<p>Pays concerné {shop_country} Prestashop du marchand.</p>
|
||||
<p>Le marchand est {trader_email}</p>
|
||||
<br />
|
||||
<p>L’équipe Prestashop</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +0,0 @@
|
||||
Le site suivant {shop_url} a désactivé/supprimé son module Twenga.
|
||||
Pays concerné {shop_country} Prestashop du marchand.
|
||||
|
||||
Le marchand est {trader_email}.
|
||||
|
||||
L’équipe Prestashop
|
||||
@@ -1,14 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Site prestashop {shop_country} ayant supprimé le module</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Le site suivant {shop_url} a désactivé/supprimé son module Twenga.</p>
|
||||
<p>Pays concerné {shop_country} Prestashop du marchand.</p>
|
||||
<p>Le marchand est {trader_email}</p>
|
||||
<br />
|
||||
<p>L’équipe Prestashop</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +0,0 @@
|
||||
Le site suivant {shop_url} a désactivé/supprimé son module Twenga.
|
||||
Pays concerné {shop_country} Prestashop du marchand.
|
||||
|
||||
Le marchand est {trader_email}.
|
||||
|
||||
L’équipe Prestashop
|
||||
@@ -1,14 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Site prestashop {shop_country} ayant supprimé le module</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Le site suivant {shop_url} a désactivé/supprimé son module Twenga.</p>
|
||||
<p>Pays concerné {shop_country} Prestashop du marchand.</p>
|
||||
<p>Le marchand est {trader_email}</p>
|
||||
<br />
|
||||
<p>L’équipe Prestashop</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +0,0 @@
|
||||
Le site suivant {shop_url} a désactivé/supprimé son module Twenga.
|
||||
Pays concerné {shop_country} Prestashop du marchand.
|
||||
|
||||
Le marchand est {trader_email}.
|
||||
|
||||
L’équipe Prestashop
|
||||
@@ -1,14 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Site prestashop, {shop_country}, ayant supprimé le module</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Le site suivant {shop_url} a désactivé/supprimé son module Twenga.</p>
|
||||
<p>Pays concerné {shop_country} Prestashop du marchand.</p>
|
||||
<p>Le marchand est {trader_email}</p>
|
||||
<br />
|
||||
<p>L’équipe Prestashop</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +0,0 @@
|
||||
Le site suivant {shop_url} a désactivé/supprimé son module Twenga.
|
||||
Pays concerné {shop_country} Prestashop du marchand.
|
||||
|
||||
Le marchand est {trader_email}.
|
||||
|
||||
L’équipe Prestashop
|
||||
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
$configPath = '../../config/config.inc.php';
|
||||
|
||||
if (file_exists($configPath))
|
||||
{
|
||||
include('../../config/config.inc.php');
|
||||
include(dirname(__FILE__).'/twenga.php');
|
||||
|
||||
$controller = new FrontController();
|
||||
$controller->init();
|
||||
|
||||
$country = Twenga::getCurrentCountryName();
|
||||
|
||||
$to = 'rts_support@twenga.com';
|
||||
$subject = 'Site prestashop '.$country.' ayant supprimé le module';
|
||||
|
||||
$template = 'mail';
|
||||
|
||||
$template_vars = array(
|
||||
'{shop_url}' => Tools::getShopDomain(true),
|
||||
'{trader_email}' => Configuration::get('PS_SHOP_EMAIL'),
|
||||
'{shop_country}' => $country);
|
||||
|
||||
Mail::Send($_POST['id_lang'], $template, $subject, $template_vars,
|
||||
$to, NULL, NULL, NULL, NULL, NULL, dirname(__FILE__).'/mails/');
|
||||
}
|
||||
|
||||
?>
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user