// MERGE with 1.4 r7770

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7776 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-07-28 09:20:57 +00:00
parent df255f66c1
commit a875fecb20
968 changed files with 26082 additions and 3937 deletions
+2 -2
View File
@@ -2,11 +2,11 @@
<module>
<name>twenga</name>
<displayName><![CDATA[Twenga API]]></displayName>
<version><![CDATA[1.6]]></version>
<version><![CDATA[1.8]]></version>
<description><![CDATA[Module role: export of your products on Twenga and installation of the sales tracking brought by Twenga (requires sign up to Twenga)]]></description>
<author><![CDATA[]]></author>
<tab><![CDATA[smart_shopping]]></tab>
<is_configurable>1</is_configurable>
<need_instance>1</need_instance>
<limited_countries></limited_countries>
</module>
</module>
-5
View File
@@ -18,14 +18,11 @@ $_MODULE['<{twenga}prestashop>twenga_5f77daeb6fc30c87e051e5b5d11b034c'] = 'Einig
$_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';
@@ -62,5 +59,3 @@ $_MODULE['<{twenga}prestashop>twenga_cd07439a0c70b97a595de73218094a36'] = 'Klick
$_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';
?>
+4 -1
View File
@@ -36,8 +36,11 @@ include_once(dirname(__FILE__).'/twenga.php');
if ((sha1(Configuration::get('TWENGA_TOKEN')._COOKIE_KEY_)) != Tools::getValue('twenga_token'))
die('FATAL ERROR : INVALID TOKEN');
if (!ini_get('safe_mode'))
@set_time_limit(300);
$export = new Twenga();
$output = $export->buildXML();
if (empty($export->_errors))
header("Content-type: text/xml; charset=utf-8");
echo $output;
echo $output;
+36
View File
@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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
* @version Release: $Revision$
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;
+2 -2
View File
@@ -530,7 +530,7 @@ class TwengaObj
}
}
static public function setTranslationObject(Module $object)
public static function setTranslationObject(Module $object)
{
self::$translation_object = $object;
}
@@ -542,7 +542,7 @@ class TwengaException extends Exception
* @var AbsTrustedShops
*/
private static $translation_object;
static public function setTranslationObject(Module $object)
public static function setTranslationObject(Module $object)
{
self::$translation_object = $object;
}
+36
View File
@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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
* @version Release: $Revision$
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;
+36
View File
@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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
* @version Release: $Revision$
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;
+36
View File
@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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
* @version Release: $Revision$
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;
+36
View File
@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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
* @version Release: $Revision$
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;
+36
View File
@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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
* @version Release: $Revision$
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;
+36
View File
@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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
* @version Release: $Revision$
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;
+36
View File
@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 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/osl-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
* @version Release: $Revision$
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;
+18 -6
View File
@@ -94,7 +94,7 @@ class Twenga extends PaymentModule
* need to be in lowercase
* @var array
*/
public $limited_countries = array('fr', 'de', 'gb', 'uk', 'it', 'es');
public $limited_countries = array('fr', 'de', 'gb', 'uk', 'it', 'es', 'nl');
private $_allowToWork = true;
@@ -122,7 +122,7 @@ class Twenga extends PaymentModule
$this->token = Tools::getValue('token');
$this->name = 'twenga';
$this->tab = 'smart_shopping';
$this->version = '1.6';
$this->version = '1.8';
parent::__construct();
@@ -210,6 +210,8 @@ class Twenga extends PaymentModule
(($_POST['type'] == 'reset') ? $this->l('Reset') :
(($_POST['type'] == 'uninstall') ? $this->l('Uninstall') : $this->l('Delete'))));
if ($_POST['type'] == 'delete')
$_POST['type'] = 'deleteModule';
$url = $_POST['base'].'&token='.$_POST['token'].'&module_name='.
$_POST['module_name'].'&tab_module='.$_POST['tab_module'].'&'.
$_POST['type'].'='.$_POST['module_name'];
@@ -413,7 +415,7 @@ class Twenga extends PaymentModule
self::$obj_ps_stats->cancelOrder();
}
} catch (Exception $e) {
die($e->getMessage());
// die($e->getMessage());
}
}
}
@@ -444,7 +446,7 @@ class Twenga extends PaymentModule
self::$obj_ps_stats->validateOrder($obj_order->total_products_wt, $obj_order->total_paid);
}
} catch (Exception $e) {
die($e->getMessage());
// die($e->getMessage());
}
}
}
@@ -524,7 +526,7 @@ class Twenga extends PaymentModule
/*
** Get the current country name used literaly
*/
static public function getCurrentCountryName()
public static function getCurrentCountryName()
{
global $cookie;
@@ -1010,7 +1012,7 @@ class Twenga extends PaymentModule
$category_path = (Configuration::get('PS_NAVIGATION_PIPE') != false && Configuration::get('PS_NAVIGATION_PIPE') !== '>' ) ? str_replace(Configuration::get('PS_NAVIGATION_PIPE'), '>', $category_path) : $category_path;
// image tag
$id_image = (isset($combination['id_image'])) ? $combination['id_image'] : 0;
if($id_image === 0)
if($id_image === 0 || $id_image < 0)
{
$image = $product->getCover((int)$product->id);
$id_image = $image['id_image'];
@@ -1031,8 +1033,18 @@ class Twenga extends PaymentModule
$arr_return['designation'] = Tools::htmlentitiesUTF8($product->name[$lang].' '.Manufacturer::getNameById($product->id_manufacturer).' '.implode(' ', $model));
$arr_return['price'] = $price;
$arr_return['category'] = Tools::htmlentitiesUTF8(strip_tags($category_path));
if (substr(_PS_VERSION_, 0, 3) == '1.3')
{
if (!Configuration::get('PS_SHOP_DOMAIN'))
Configuration::updateValue('PS_SHOP_DOMAIN', $_SERVER['HTTP_HOST']);
$prefix = 'http://'.Configuration::get('PS_SHOP_DOMAIN').'/';
$arr_return['image_url'] = $prefix.$link->getImageLink('', $product->id.'-'.$id_image, 'large');
}
else
$arr_return['image_url'] = $link->getImageLink($product->link_rewrite[$lang], $product->id.'-'.$id_image, 'large');
// Must description added since Twenga-module v1.1
$arr_return['description'] = is_array($product->description) ? strip_tags($product->description[$lang]) : strip_tags($product->description);
$arr_return['description'] = trim($arr_return['description'].' '.strip_tags(implode(', ', $str_features)));