// Merge -> revision 8149

This commit is contained in:
rMalie
2011-08-22 16:22:16 +00:00
parent 53d9b1343b
commit 08a8ffdcf9
18 changed files with 103 additions and 34 deletions
+4
View File
@@ -171,6 +171,10 @@ function reloadContent(params_plus)
return false;
});
ajaxCart.overrideButtonsInThePage();
if(typeof(reloadProductComparison) == 'function') {
reloadProductComparison();
}
}
});
ajaxQueries.push(ajaxQuery);
+2 -1
View File
@@ -1247,7 +1247,8 @@ class BlockLayered extends Module
'nArray' => $nArray = (int)Configuration::get('PS_PRODUCTS_PER_PAGE') != 10 ? array((int)Configuration::get('PS_PRODUCTS_PER_PAGE'), 10, 20, 50) : array(10, 20, 50)
);
$this->context->smarty->assign($pagination_infos);
$this->context->smarty->assign('comparator_max_item', (int)Configuration::get('PS_COMPARATOR_MAX_ITEM'));
$this->context->smarty->assign('products', $products);
/* We are sending an array in jSon to the .js controller, it will update both the filters and the products zones */
+1 -1
View File
@@ -2,7 +2,7 @@
<module>
<name>dibs</name>
<displayName><![CDATA[DIBS]]></displayName>
<version><![CDATA[1.0]]></version>
<version><![CDATA[1.1]]></version>
<description><![CDATA[DIBS payment API]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[payments_gateways]]></tab>
+12 -3
View File
@@ -79,6 +79,7 @@ class dibs extends PaymentModule
* @var array
*/
public static $dibs_subscription_link = array(
'fr' => 'http://www.dibspayment.com/order/fr_request/',
'en' => 'http://www.dibspayment.com/order/uk_request_2eng',
'da' => 'http://www.dibs.dk/bestil/internet/',
'sv' => 'http://www.dibs.se/bestall/internet/',
@@ -89,7 +90,7 @@ class dibs extends PaymentModule
{
$this->name = 'dibs';
$this->tab = 'payments_gateways';
$this->version = '1.0';
$this->version = '1.1';
$this->author = 'PrestaShop';
parent::__construct();
@@ -116,6 +117,13 @@ class dibs extends PaymentModule
$this->warning = $this->l('For security reasons, you must set key #1 and key #2 used by MD5 control of DIBS API.');
if (!self::$ID_MERCHANT OR self::$ID_MERCHANT === '')
$this->warning = $this->l('You have to set your merchant ID to use DIBS API.');
/* For 1.4.3 and less compatibility */
$updateConfig = array('PS_OS_CHEQUE', 'PS_OS_PAYMENT', 'PS_OS_PREPARATION', 'PS_OS_SHIPPING', 'PS_OS_CANCELED', 'PS_OS_REFUND', 'PS_OS_ERROR', 'PS_OS_OUTOFSTOCK', 'PS_OS_BANKWIRE', 'PS_OS_PAYPAL', 'PS_OS_WS_PAYMENT');
if (!Configuration::get('PS_OS_PAYMENT'))
foreach ($updateConfig as $u)
if (!Configuration::get($u) && defined('_'.$u.'_'))
Configuration::updateValue($u, constant('_'.$u.'_'));
}
public function install()
@@ -183,8 +191,9 @@ class dibs extends PaymentModule
private function _displayPresentation()
{
$href = '';
if (isset(dibs::$dibs_subscription_link[Configuration::get('PS_LANG_DEFAULT')]))
$href = dibs::$dibs_subscription_link[Configuration::get('PS_LANG_DEFAULT')];
$langIsoCode = Language::getIsoById(Configuration::get('PS_LANG_DEFAULT'));
if (isset(dibs::$dibs_subscription_link[$langIsoCode]))
$href = dibs::$dibs_subscription_link[$langIsoCode];
else
$href = dibs::$dibs_subscription_link['en'];
$out = '
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 679 B

+26 -8
View File
@@ -37,7 +37,7 @@ class Gsitemap extends Module
{
$this->name = 'gsitemap';
$this->tab = 'seo';
$this->version = '1.6';
$this->version = '1.7';
$this->author = 'PrestaShop';
$this->need_instance = 0;
@@ -234,7 +234,7 @@ XML;
LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (p.id_product = pl.id_product AND pl.id_shop ='.$shopID.')
LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (p.id_category_default = cl.id_category AND pl.id_lang = cl.id_lang AND cl.id_shop = '.$shopID.')
LEFT JOIN '._DB_PREFIX_.'image i ON p.id_product = i.id_product
LEFT JOIN '._DB_PREFIX_.'image_lang il ON (i.id_image = il.id_image AND il.id_lang = pl.id_lang)
LEFT JOIN '._DB_PREFIX_.'image_lang il ON (i.id_image = il.id_image)
LEFT JOIN '._DB_PREFIX_.'lang l ON (pl.id_lang = l.id_lang)
WHERE l.`active` = 1
AND p.`active` = 1
@@ -243,7 +243,22 @@ XML;
ORDER BY pl.id_product, pl.id_lang ASC';
$products = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS($sql);
$tmp = null;
$res = null;
foreach($products AS $product)
{
if ($tmp == $product['id_product'])
$res[$tmp]['images'] []= array('id_image' => $product['id_image'], 'legend_image' => $product['legend_image']);
else
{
$tmp = $product['id_product'];
$res[$tmp] = $product;
unset($res[$tmp]['id_image'], $res[$tmp]['legend_image']);
$res[$tmp]['images'] []= array('id_image' => $product['id_image'], 'legend_image' => $product['legend_image']);
}
}
foreach ($res as $product)
{
if (($priority = 0.7 - ($product['level_depth'] / 10)) < 0.1)
$priority = 0.1;
@@ -316,12 +331,15 @@ XML;
private function _addSitemapNodeImage($xml, $product)
{
$image = $xml->addChild('image', null, 'http://www.google.com/schemas/sitemap-image/1.1');
$image->addChild('loc', htmlspecialchars($this->context->link->getImageLink($product['link_rewrite'], (int)$product['id_product'].'-'.(int)$product['id_image'])), 'http://www.google.com/schemas/sitemap-image/1.1');
$legend_image = preg_replace('/(&+)/i', '&amp;', $product['legend_image']);
$image->addChild('caption', $legend_image, 'http://www.google.com/schemas/sitemap-image/1.1');
$image->addChild('title', $legend_image, 'http://www.google.com/schemas/sitemap-image/1.1');
foreach ($product['images'] as $img)
{
$image = $xml->addChild('image', null, 'http://www.google.com/schemas/sitemap-image/1.1');
$image->addChild('loc', htmlspecialchars($this->context->link->getImageLink($product['link_rewrite'], (int)$product['id_product'].'-'.(int)$img['id_image'])), 'http://www.google.com/schemas/sitemap-image/1.1');
$legend_image = preg_replace('/(&+)/i', '&amp;', $img['legend_image']);
$image->addChild('caption', $legend_image, 'http://www.google.com/schemas/sitemap-image/1.1');
$image->addChild('title', $legend_image, 'http://www.google.com/schemas/sitemap-image/1.1');
}
}
private function _displaySitemap()
+2 -2
View File
@@ -79,7 +79,7 @@ class StatsLive extends Module
*/
private function getVisitorsOnline()
{
if (Configuration::get('PS_STATSDATA_CUSTOMER_PAGESVIEWS'))
if (Configuration::get('PS_STATSDATA_CUSTOMER_PAGESVIEWS'))
{
$sql = 'SELECT c.id_guest, c.ip_address, c.date_add, c.http_referer, pt.name as page
FROM `'._DB_PREFIX_.'connections` c
@@ -90,7 +90,7 @@ class StatsLive extends Module
WHERE (g.id_customer IS NULL OR g.id_customer = 0)
'.$this->sqlShopRestriction(false, 'c').'
AND cp.`time_end` IS NULL
AND cp.`time_start` > '.strtotime('-15 minutes').'
AND TIME_TO_SEC(TIMEDIFF(NOW(), cp.`time_start`)) < 900
GROUP BY c.id_connections
ORDER BY c.date_add DESC';
}