// MERGE with 1.4 r7770
This commit is contained in:
@@ -56,7 +56,7 @@ class TSBPException extends Exception
|
||||
// @todo : don't forget to change email in translation
|
||||
$mail = self::$translation_object->l('Please contact Trusted Shops at service@trustedshops.co.uk.', TSBPException::$translate_key);
|
||||
$errors = array(
|
||||
-10001 => self::$translation_object->l('Username or password invalid.', TSBPException::$translate_key),
|
||||
-10001 => self::$translation_object->l('Invalid username or password.', TSBPException::$translate_key),
|
||||
-10002 => self::$translation_object->l('You have reached your credit limit.', TSBPException::$translate_key),
|
||||
-10011 => self::$translation_object->l('No credit available from Trusted Shops.', TSBPException::$translate_key),
|
||||
-11111 => self::$translation_object->l('The data could not be saved.', TSBPException::$translate_key),
|
||||
|
||||
@@ -150,7 +150,7 @@ class TSBuyerProtection extends AbsTrustedShops
|
||||
'MONEYBOOKERS' => $this->l('moneybookers.com'),
|
||||
'OTHER' => $this->l('Other method of payment'),
|
||||
);
|
||||
$this->tab_name = $this->l('Seal of Approval and Buyer Protection');
|
||||
$this->tab_name = $this->l('Trusted Shops quality seal and buyer protection');
|
||||
$this->site_url = Tools::htmlentitiesutf8('http://'.$_SERVER['HTTP_HOST'].__PS_BASE_URI__);
|
||||
TSBPException::setTranslationObject($this);
|
||||
if (!method_exists('Tools', 'jsonDecode') || !method_exists('Tools', 'jsonEncode'))
|
||||
@@ -675,6 +675,15 @@ class TSBuyerProtection extends AbsTrustedShops
|
||||
$product->name[(int)Configuration::get('PS_LANG_DEFAULT')] = 'Trustedshops';
|
||||
$product->link_rewrite[(int)Configuration::get('PS_LANG_DEFAULT')] = 'trustedshops';
|
||||
}
|
||||
|
||||
// Add specifics translations
|
||||
$id_lang = Language::getIdByIso('de');
|
||||
if ((int)$id_lang > 0) $product->name[$id_lang] = 'Trusted Shops Käuferschutz';
|
||||
$id_lang = Language::getIdByIso('en');
|
||||
if ((int)$id_lang > 0) $product->name[$id_lang] = 'Trusted Shops buyer protection';
|
||||
$id_lang = Language::getIdByIso('fr');
|
||||
if ((int)$id_lang > 0) $product->name[$id_lang] = 'Trusted Shops protection acheteur';
|
||||
|
||||
$product->quantity = 1000;
|
||||
$product->price = ToolsCore::convertPrice($item->grossFee,Currency::getIdByIsoCode($item->currency));
|
||||
$product->id_category_default = TSBuyerProtection::$CAT_ID;
|
||||
@@ -922,6 +931,16 @@ class TSBuyerProtection extends AbsTrustedShops
|
||||
}
|
||||
private function _displayPresentation()
|
||||
{
|
||||
global $cookie;
|
||||
$link = '';
|
||||
|
||||
if (strtolower(Language::getIsoById((int)$cookie->id_lang)) == 'de')
|
||||
$link = '<p><b><a style="text-decoration: underline; font-weight: bold; color: #0000CC;" target="_blank" href="http://www.trustedshops.de/shopbetreiber/mitgliedschaft.html?et_cid=14&et_lid=29069" target="_blank">Jetzt bei Trusted Shops anmelden!</a></b></p><br />';
|
||||
if (strtolower(Language::getIsoById((int)$cookie->id_lang)) == 'en')
|
||||
$link = '<p><b><a style="text-decoration: underline; font-weight: bold; color: #0000CC;" target="_blank" href="http://www.trustedshops.com/merchants/membership.html?shopsw=PRESTA&et_cid=53&et_lid=3361" target="_blank">Appy now!</a></b></p><br />';
|
||||
if (strtolower(Language::getIsoById((int)$cookie->id_lang)) == 'fr')
|
||||
$link = '<p><b><a style="text-decoration: underline; font-weight: bold; color: #0000CC;" target="_blank" href="http://www.trustedshops.fr/marchands/tarifs.html?shopsw=PRESTA&et_cid=53&et_lid=3362" target="_blank">Enregistrement Trusted Shops</a></b></p><br />';
|
||||
|
||||
return '
|
||||
<div style="text-align:right; margin:10px 20px 10px 0">
|
||||
<img src="'.__PS_BASE_URI__.'modules/'.self::$module_name.'/img/siegel.gif" alt="logo"/>
|
||||
@@ -935,7 +954,7 @@ class TSBuyerProtection extends AbsTrustedShops
|
||||
<h3>'.$this->l('Profitable and long-term customer relationship').'</h3>
|
||||
<p>'.$this->l('For many online shoppers, the Trusted Shops Seal of Approval with Buyer Protection is an effective sign of quality for safe shopping on the internet. One-time buyers become regular customers.').'</p><br />
|
||||
<h3>'.$this->l('Environment type').'</h3>
|
||||
<p>'.$this->l('You are currently using the mode :').' <b>'.TSBuyerProtection::$ENV_API.'</b></p><br />';
|
||||
<p>'.$this->l('You are currently using the mode :').' <b>'.TSBuyerProtection::$ENV_API.'</b></p><br />'.$link;
|
||||
}
|
||||
|
||||
private function _displayFormRegistrationLink($link = false)
|
||||
@@ -1172,9 +1191,9 @@ class TSBuyerProtection extends AbsTrustedShops
|
||||
$out = '<fieldset>
|
||||
<legend><img src="../img/admin/warning.gif" alt="" />'.$this->l('Cronjob configuration').'</legend>';
|
||||
$out .= '<p>'
|
||||
.$this->l('You need to set a cron Task on your server, working with your EXCELLENT certificate.').'<br />'
|
||||
.$this->l('The file you need to call:').' <b style="color:red;">'.$this->getCronFilePath().'</b><br />'
|
||||
.$this->l('Trusted Shops recommends that the request should be automated by a cronjob with an interval of 10 minutes.')
|
||||
.$this->l('If you are using a Trusted Shops EXCELLENCE cetificate in your shop, set up a cron job on your web server.').'<br />'
|
||||
.$this->l('Run the script file ').' <b style="color:red;">'.$this->getCronFilePath().'</b> '.$this->l('with an interval of 10 minutes.').'<br /><br />'
|
||||
.$this->l('The corresponding line in your cron file may look like this:').' <br /><b style="color:red;">*/10 * * * * '.$this->getCronFilePath().'>/dev/null 2>&1</b><br />'
|
||||
.'</p>';
|
||||
$out .= '</fieldset>';
|
||||
return $out;
|
||||
@@ -1250,6 +1269,9 @@ class TSBuyerProtection extends AbsTrustedShops
|
||||
|
||||
TSBuyerProtection::$smarty->assign(array(
|
||||
'tax_label' => 'TTC',
|
||||
'shop_id' => TSBuyerProtection::$CERTIFICATE[$lang]['tsID'],
|
||||
'price' => Product::getPriceStatic((int)$items[0]['id_product']),
|
||||
'currency_iso_code' => $items[0]['currency'],
|
||||
'buyer_protection_items' => $items)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ class TrustedShopsRating extends AbsTrustedShops
|
||||
'fr' => '&et_cid=53&et_lid=3362');
|
||||
public function __construct()
|
||||
{
|
||||
$this->tab_name = $this->l('Customer Rating');
|
||||
$this->tab_name = $this->l('Trusted Shops customer rating');
|
||||
|
||||
// @todo : That gonna be change - Be worry it's false, countries have not the same ISO code as Languages, waiting Truste Shop's answer
|
||||
$this->limited_countries = $this->available_languages;
|
||||
@@ -107,7 +107,7 @@ class TrustedShopsRating extends AbsTrustedShops
|
||||
}
|
||||
|
||||
|
||||
static public function getHttpHost($http = false, $entities = false)
|
||||
public static function getHttpHost($http = false, $entities = false)
|
||||
{
|
||||
if (method_exists('Tools', 'getHttpHost'))
|
||||
return call_user_func(array('Tools', 'getHttpHost'), array($http, $entities));
|
||||
@@ -360,6 +360,14 @@ class TrustedShopsRating extends AbsTrustedShops
|
||||
{
|
||||
global $cookie;
|
||||
|
||||
$link = '';
|
||||
if (strtolower(Language::getIsoById((int)$cookie->id_lang)) == 'de')
|
||||
$link = '<p><b><a style="text-decoration: underline; font-weight: bold; color: #0000CC;" target="_blank" href="https://www.trustedshops.de/shopbetreiber/kundenbewertung_anmeldung.html?partnerPackage=PrestaShop&ratingProduct=RATING_PRO&et_cid=14en&et_lid=29069" target="_blank">Jetzt bei Trusted Shops anmelden!</a></b></p><br />';
|
||||
if (strtolower(Language::getIsoById((int)$cookie->id_lang)) == 'en')
|
||||
$link = '<p><b><a style="text-decoration: underline; font-weight: bold; color: #0000CC;" target="_blank" href="http://www.trustedshops.com/merchants/membership.html?shopsw=PRESTA&et_cid=53&et_lid=3361" target="_blank">Apply now!</a></b></p><br />';
|
||||
if (strtolower(Language::getIsoById((int)$cookie->id_lang)) == 'fr')
|
||||
$link = '<p><b><a style="text-decoration: underline; font-weight: bold; color: #0000CC;" target="_blank" href="http://www.trustedshops.fr/marchands/tarifs.html?shopsw=PRESTA&et_cid=53&et_lid=3362" target="_blank">Enregistrement Trusted Shops</a></b></p><br />';
|
||||
|
||||
return '<fieldset>
|
||||
<legend><img src="'.__PS_BASE_URI__.'modules/'.self::$module_name.'/logo.gif" alt="" />'.$this->l('Learn More').'</legend>
|
||||
|
||||
@@ -377,7 +385,7 @@ class TrustedShopsRating extends AbsTrustedShops
|
||||
<h4>'.$this->l('Increase reach via Facebook, Twitter and Google').'</h4>
|
||||
<p>'.$this->l('Your customers spread reviews and rating on Facebook and Twitter directly to friends and followers. Ratings are automatically listed in the Google-Index and are displayed in Google Shopping.').'</p>
|
||||
<br />
|
||||
<a style="text-decoration: underline; font-weight: bold; color: #0000CC;" target="_blank" href="'.$this->getApplyUrl().'">'.$this->l('Register for Trusted Shops Customer Rating').'</a>
|
||||
'.$link.'
|
||||
</fieldset>
|
||||
<br />';
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ class WidgetCache
|
||||
public function isFresh($timeout = 10800)
|
||||
{
|
||||
if (file_exists($this->_fileName))
|
||||
return ((mktime() - filemtime($this->_fileName)) < $timeout);
|
||||
return ((time() - filemtime($this->_fileName)) < $timeout);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
@@ -5,8 +5,8 @@ var TSPayment = (function()
|
||||
payment_module : {},
|
||||
alert_message : '',
|
||||
module_box : {
|
||||
html : '<b class="payment-module-label"></b>',
|
||||
class : '.payment-module-label',
|
||||
html : '<b class=\'payment-module-label\'></b>',
|
||||
ui_class : '.payment-module-label',
|
||||
id :'label-module-',
|
||||
css : {
|
||||
display : 'none',
|
||||
@@ -38,10 +38,10 @@ var TSPayment = (function()
|
||||
};
|
||||
function hoverEffect()
|
||||
{
|
||||
$(TSPayment.module_box.class).live('mouseover', function(){
|
||||
$(TSPayment.module_box.ui_class).live('mouseover', function(){
|
||||
$(this).css({backgroundColor:'#CF0000', opacity:0.6});
|
||||
});
|
||||
$(TSPayment.module_box.class).live('mouseout', function(){
|
||||
$(TSPayment.module_box.ui_class).live('mouseout', function(){
|
||||
$(this).css({backgroundColor:TSPayment.module_box.css.backgroundColor, opacity:1});
|
||||
|
||||
});
|
||||
@@ -65,6 +65,8 @@ var TSPayment = (function()
|
||||
var boolean = true;
|
||||
var payment_type = $('select[name=payment_type]').val();
|
||||
var payment_module = $('select[name=payment_module]').val();
|
||||
if (payment_type != null && payment_module != null)
|
||||
{
|
||||
$('.choosen_payment_type').each(function() {
|
||||
var reg = new RegExp(payment_type, 'i');
|
||||
if ($(this).val() == payment_module)
|
||||
@@ -78,6 +80,7 @@ var TSPayment = (function()
|
||||
TSPayment.alert_message = 'A payment module can be choosen for only one payment type';
|
||||
|
||||
TSPayment.alertMessage();
|
||||
}
|
||||
});
|
||||
}
|
||||
function clickRemoveFunction()
|
||||
|
||||
Reference in New Issue
Block a user