// Merge -> 8910
This commit is contained in:
@@ -67,7 +67,8 @@ class UpgraderCore
|
||||
if (empty($this->link))
|
||||
$this->checkPSVersion();
|
||||
|
||||
if (@copy($this->link, realpath($dest).DIRECTORY_SEPARATOR.$filename))
|
||||
$destPath = realpath($dest).DIRECTORY_SEPARATOR.$filename;
|
||||
if (@copy($this->link, $destPath) && md5_file($destPath) == $this->md5 )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
||||
@@ -5,7 +5,7 @@ class Autoupgrade extends Module
|
||||
function __construct()
|
||||
{
|
||||
$this->name = 'autoupgrade';
|
||||
$this->tab = 'admin';
|
||||
$this->tab = 'administration';
|
||||
$this->version = 0.1;
|
||||
|
||||
if (!defined('_PS_ADMIN_DIR_'))
|
||||
@@ -58,10 +58,13 @@ class Autoupgrade extends Module
|
||||
$res &= @mkdir($autoupgradeDir);
|
||||
if(file_exists($autoupgradeDir.DIRECTORY_SEPARATOR.'ajax-upgradetab.php'))
|
||||
$res &= unlink($autoupgradeDir.DIRECTORY_SEPARATOR.'ajax-upgradetab.php');
|
||||
$path = dirname(__FILE__).'/';
|
||||
if (!defined('_PS_MODULE_DIR_'))
|
||||
{
|
||||
define('_PS_MODULE_DIR_', _PS_ROOT_DIR_.'/modules/');
|
||||
}
|
||||
|
||||
$res &= copy($path.'ajax-upgradetab.php',$autoupgradeDir . DIRECTORY_SEPARATOR . 'ajax-upgradetab.php');
|
||||
$res &= copy($path.'logo.gif',_PS_ROOT_DIR_. DIRECTORY_SEPARATOR . 'img/t/AdminSelfUpgrade.gif');
|
||||
$res &= copy(_PS_MODULE_DIR_.'autoupgrade/ajax-upgradetab.php',$autoupgradeDir . DIRECTORY_SEPARATOR . 'ajax-upgradetab.php');
|
||||
$res &= copy(_PS_MODULE_DIR_.'autoupgrade/logo.gif',_PS_ROOT_DIR_. DIRECTORY_SEPARATOR . 'img/t/AdminSelfUpgrade.gif');
|
||||
|
||||
if (!$res
|
||||
OR !Tab::getIdFromClassName('AdminSelfUpgrade')
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<version><![CDATA[0.1]]></version>
|
||||
<description><![CDATA[Provides an automated method to upgrade your shop to the last PrestaShop version]]></description>
|
||||
<author><![CDATA[]]></author>
|
||||
<tab><![CDATA[admin]]></tab>
|
||||
<tab><![CDATA[administration]]></tab>
|
||||
<is_configurable>0</is_configurable>
|
||||
<need_instance>1</need_instance>
|
||||
<limited_countries></limited_countries>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<module>
|
||||
<name>ebay</name>
|
||||
<displayName><![CDATA[eBay]]></displayName>
|
||||
<version><![CDATA[1.2.6]]></version>
|
||||
<version><![CDATA[1.2.8]]></version>
|
||||
<description><![CDATA[Open your shop on the eBay market place !]]></description>
|
||||
<author><![CDATA[PrestaShop]]></author>
|
||||
<tab><![CDATA[market_place]]></tab>
|
||||
|
||||
@@ -1096,7 +1096,8 @@ class eBayRequest
|
||||
foreach ($this->response->OrderArray->Order as $order)
|
||||
{
|
||||
$name = str_replace(array('_', ',', ' '), array('', '', ' '), (string)$order->ShippingAddress->Name);
|
||||
$name = explode(' ', $name);
|
||||
$name = preg_replace('/\-?\d+/', '', $name);
|
||||
$name = explode(' ', $name, 2);
|
||||
$itemList = array();
|
||||
for ($i = 0; isset($order->TransactionArray->Transaction[$i]); $i++)
|
||||
{
|
||||
@@ -1110,6 +1111,8 @@ class eBayRequest
|
||||
$tmp = explode('-', (string)$transaction->Item->SKU);
|
||||
if (isset($tmp[1]))
|
||||
$id_product = $tmp[1];
|
||||
if (isset($tmp[2]))
|
||||
$id_product_attribute = $tmp[2];
|
||||
}
|
||||
if (isset($transaction->Variation->SKU))
|
||||
{
|
||||
@@ -1160,8 +1163,8 @@ class eBayRequest
|
||||
'status' => (string)$order->CheckoutStatus->Status,
|
||||
'date' => substr((string)$order->CreatedTime, 0, 10).' '.substr((string)$order->CreatedTime, 11, 8),
|
||||
'name' => (string)$order->ShippingAddress->Name,
|
||||
'firstname' => $name[0],
|
||||
'familyname' => (isset($name[1]) ? $name[1] : $name[0]),
|
||||
'firstname' => trim($name[0]),
|
||||
'familyname' => (isset($name[1]) ? trim($name[1]) : trim($name[0])),
|
||||
'address1' => (string)$order->ShippingAddress->Street1,
|
||||
'address2' => (string)$order->ShippingAddress->Street2,
|
||||
'city' => (string)$order->ShippingAddress->CityName,
|
||||
|
||||
+14
-3
@@ -59,7 +59,7 @@ class Ebay extends Module
|
||||
{
|
||||
$this->name = 'ebay';
|
||||
$this->tab = 'market_place';
|
||||
$this->version = '1.2.6';
|
||||
$this->version = '1.2.8';
|
||||
$this->author = 'PrestaShop';
|
||||
parent::__construct ();
|
||||
$this->displayName = $this->l('eBay');
|
||||
@@ -656,7 +656,7 @@ class Ebay extends Module
|
||||
success: function(data)
|
||||
{
|
||||
if (data == \'OK\')
|
||||
window.location.href = \''.Tools::safeOutput($_SERVER['REQUEST_URI']).'&action=validateToken\';
|
||||
window.location.href = \'index.php?tab='.Tools::safeOutput($_GET['tab']).'&configure='.Tools::safeOutput($_GET['configure']).'&token='.Tools::safeOutput($_GET['token']).'&tab_module='.Tools::safeOutput($_GET['tab_module']).'&module_name='.Tools::safeOutput($_GET['module_name']).'&action=validateToken\';
|
||||
else
|
||||
setTimeout ("checkToken()", 5000);
|
||||
}
|
||||
@@ -1111,10 +1111,11 @@ class Ebay extends Module
|
||||
$ad = dirname($_SERVER["PHP_SELF"]);
|
||||
|
||||
// Display Form
|
||||
$forbiddenJs = array('textarea', 'script', 'onmousedown', 'onmousemove', 'onmmouseup', 'onmouseover', 'onmouseout', 'onload', 'onunload', 'onfocus', 'onblur', 'onchange', 'onsubmit', 'ondblclick', 'onclick', 'onkeydown', 'onkeyup', 'onkeypress', 'onmouseenter', 'onmouseleave', 'onerror');
|
||||
$html = '<form action="index.php?tab='.Tools::safeOutput($_GET['tab']).'&configure='.Tools::safeOutput($_GET['configure']).'&token='.Tools::safeOutput($_GET['token']).'&tab_module='.Tools::safeOutput($_GET['tab_module']).'&module_name='.Tools::safeOutput($_GET['module_name']).'&id_tab=3§ion=template" method="post" class="form" id="configForm3">
|
||||
<fieldset style="border: 0">
|
||||
<h4>'.$this->l('You can customise the template for your products page on eBay').' :</h4>
|
||||
<textarea class="rte" cols="100" rows="50" name="ebay_product_template">'.Tools::safeOutput(Tools::getValue('ebay_product_template', Configuration::get('EBAY_PRODUCT_TEMPLATE'))).'</textarea><br />
|
||||
<textarea class="rte" cols="100" rows="50" name="ebay_product_template">'.str_replace($forbiddenJs, '', Tools::getValue('ebay_product_template', Configuration::get('EBAY_PRODUCT_TEMPLATE'))).'</textarea><br />
|
||||
|
||||
'.(substr(_PS_VERSION_, 0, 3) == '1.3' ? '
|
||||
<script type="text/javascript" src="'.__PS_BASE_URI__.'js/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
|
||||
@@ -1498,6 +1499,14 @@ class Ebay extends Module
|
||||
}
|
||||
}
|
||||
|
||||
public function findIfCategoryParentIsMultiSku($id_category_ref)
|
||||
{
|
||||
$row = Db::getInstance()->getRow('SELECT `id_category_ref_parent`, `is_multi_sku` FROM `'._DB_PREFIX_.'ebay_category` WHERE `id_category_ref` = '.(int)$id_category_ref);
|
||||
if ($row['id_category_ref_parent'] != $id_category_ref)
|
||||
return $this->findIfCategoryParentIsMultiSku($row['id_category_ref_parent']);
|
||||
return $row['is_multi_sku'];
|
||||
}
|
||||
|
||||
private function _syncProducts($productsList)
|
||||
{
|
||||
$fees = 0;
|
||||
@@ -1529,6 +1538,8 @@ class Ebay extends Module
|
||||
// Load default category matched in cache
|
||||
if (!isset($categoryDefaultCache[$product->id_category_default]))
|
||||
$categoryDefaultCache[$product->id_category_default] = Db::getInstance()->getRow('SELECT ec.`id_category_ref`, ec.`is_multi_sku`, ecc.`percent` FROM `'._DB_PREFIX_.'ebay_category` ec LEFT JOIN `'._DB_PREFIX_.'ebay_category_configuration` ecc ON (ecc.`id_ebay_category` = ec.`id_ebay_category`) WHERE ecc.`id_category` = '.(int)$product->id_category_default);
|
||||
if ($categoryDefaultCache[$product->id_category_default]['is_multi_sku'] != 1)
|
||||
$categoryDefaultCache[$product->id_category_default]['is_multi_sku'] = $this->findIfCategoryParentIsMultiSku($categoryDefaultCache[$product->id_category_default]['id_category_ref']);
|
||||
|
||||
// Load Pictures
|
||||
$pictures = array();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<module>
|
||||
<name>mondialrelay</name>
|
||||
<displayName><![CDATA[Mondial Relay]]></displayName>
|
||||
<version><![CDATA[1.7]]></version>
|
||||
<version><![CDATA[1.7.4]]></version>
|
||||
<description><![CDATA[Deliver in Relay points]]></description>
|
||||
<author><![CDATA[]]></author>
|
||||
<tab><![CDATA[shipping_logistics]]></tab>
|
||||
|
||||
@@ -37,13 +37,13 @@ class PaypalLib extends Paypal
|
||||
unset($response[$k]);
|
||||
}
|
||||
}
|
||||
if (!Configuration::get('PAYPAL_MODE_DEBUG'))
|
||||
if (!Configuration::get('PAYPAL_DEBUG_MODE'))
|
||||
$this->_logs = array();
|
||||
$toExclude = array('TOKEN', 'SUCCESSPAGEREDIRECTREQUESTED', 'VERSION', 'BUILD', 'ACK', 'CORRELATIONID');
|
||||
$this->_logs[] = '<b>'.$this->l('PayPal response:').'</b>';
|
||||
foreach ($response as $k => $res)
|
||||
{
|
||||
if (!Configuration::get('PAYPAL_MODE_DEBUG') AND in_array($k, $toExclude))
|
||||
if (!Configuration::get('PAYPAL_DEBUG_MODE') AND in_array($k, $toExclude))
|
||||
continue;
|
||||
$this->_logs[] = $k.' -> '.$res;
|
||||
}
|
||||
|
||||
@@ -886,7 +886,7 @@ class PayPal extends PaymentModule
|
||||
Configuration::updateValue('PAYPAL_API_PASSWORD', trim(Tools::getValue('api_password')));
|
||||
Configuration::updateValue('PAYPAL_API_SIGNATURE', trim(Tools::getValue('api_signature')));
|
||||
Configuration::updateValue('PAYPAL_EXPRESS_CHECKOUT', (int)(Tools::isSubmit('paypal_express')));
|
||||
Configuration::updateValue('PAYPAL_MODE_DEBUG', (int)(Tools::isSubmit('paypal_debug')));
|
||||
Configuration::updateValue('PAYPAL_DEBUG_MODE', (int)(Tools::isSubmit('paypal_debug')));
|
||||
Configuration::updateValue('PAYPAL_CAPTURE', (int)(Tools::getValue('paypal_capture')));
|
||||
Configuration::updateValue('PAYPAL_PAYMENT_METHOD', (int)(Tools::getValue('payment_method')));
|
||||
Configuration::updateValue('PAYPAL_TEMPLATE', Tools::getValue('template_paypal'));
|
||||
|
||||
@@ -7,7 +7,7 @@ ini_set('display_errors', 'off');
|
||||
|
||||
$moduleName = Tools::getValue('moduleName');
|
||||
|
||||
if (!Tools::getValue('ajax') || Tools::getValue('token') != sha1(_COOKIE_KEY_.'ajaxShopImporter') || !ctype_alnum($moduleName))
|
||||
if (!Tools::getValue('ajax') || Tools::getValue('token') != sha1(_COOKIE_KEY_.'ajaxShopImporter') || (!empty($moduleName) && !ctype_alnum($moduleName)))
|
||||
die;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user