From 7a89d0596f8f478c7b5189f6aafb792399e55433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Gaillard?= Date: Mon, 15 Apr 2013 11:17:17 +0200 Subject: [PATCH 01/13] [-] BO: Don't delete the directory of modules before upgrade them --- controllers/admin/AdminModulesController.php | 32 +++++++++----------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/controllers/admin/AdminModulesController.php b/controllers/admin/AdminModulesController.php index 091a51b8b..5ce5d6a59 100644 --- a/controllers/admin/AdminModulesController.php +++ b/controllers/admin/AdminModulesController.php @@ -600,25 +600,14 @@ class AdminModulesControllerCore extends AdminController foreach ($modules as $name) { $full_report = null; - if ($key == 'update') - { - if (ConfigurationTest::test_dir('modules/'.$name, true, $full_report)) - Tools::deleteDirectory('../modules/'.$name.'/'); - else - { - $module = Module::getInstanceByName(urldecode($name)); - $this->errors[] = $this->l(sprintf("Module %s can't be upgraded : ", $module->displayName)).$full_report; - continue; - } - } - // If Addons module, download and unzip it before installing it - if (!file_exists('../modules/'.$name.'/'.$name.'.php')) + if (!file_exists('../modules/'.$name.'/'.$name.'.php') || $key == 'update') { $filesList = array( array('type' => 'addonsNative', 'file' => Module::CACHE_FILE_DEFAULT_COUNTRY_MODULES_LIST, 'loggedOnAddons' => 0), array('type' => 'addonsBought', 'file' => Module::CACHE_FILE_CUSTOMER_MODULES_LIST, 'loggedOnAddons' => 1), ); + foreach ($filesList as $f) if (file_exists(_PS_ROOT_DIR_.$f['file'])) { @@ -628,12 +617,19 @@ class AdminModulesControllerCore extends AdminController foreach ($xml->module as $modaddons) if ($name == $modaddons->name && isset($modaddons->id) && ($this->logged_on_addons || $f['loggedOnAddons'] == 0)) { + $download_ok = false; if ($f['loggedOnAddons'] == 0) - if (file_put_contents('../modules/'.$modaddons->name.'.zip', Tools::addonsRequest('module', array('id_module' => pSQL($modaddons->id))))) - $this->extractArchive('../modules/'.$modaddons->name.'.zip', false); - if ($f['loggedOnAddons'] == 1 && $this->logged_on_addons) - if (file_put_contents('../modules/'.$modaddons->name.'.zip', Tools::addonsRequest('module', array('id_module' => pSQL($modaddons->id), 'username_addons' => pSQL(trim($this->context->cookie->username_addons)), 'password_addons' => pSQL(trim($this->context->cookie->password_addons)))))) - $this->extractArchive('../modules/'.$modaddons->name.'.zip', false); + if (file_put_contents(_PS_MODULE_DIR_.$modaddons->name.'.zip', Tools::addonsRequest('module', array('id_module' => pSQL($modaddons->id))))) + $download_ok = true; + elseif ($f['loggedOnAddons'] == 1 && $this->logged_on_addons) + if (file_put_contents(_PS_MODULE_DIR_.$modaddons->name.'.zip', Tools::addonsRequest('module', array('id_module' => pSQL($modaddons->id), 'username_addons' => pSQL(trim($this->context->cookie->username_addons)), 'password_addons' => pSQL(trim($this->context->cookie->password_addons)))))) + $download_ok = true; + + if (!$download_ok) + $this->errors[] = $this->l('Error on downloading the lastest version'); + else + if(!$this->extractArchive(_PS_MODULE_DIR_.$modaddons->name.'.zip', false)) + $this->errors[] = $this->l(sprintf("Module %s can't be upgraded: ", $module->displayName)); } } } From 047551952e96b80ef29dc43cf10ad647114adc71 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Mon, 15 Apr 2013 11:48:27 +0200 Subject: [PATCH 02/13] [-] FO : Fix bug #PSCFV-8623 : Cart rule without code is applied automatically --- classes/CartRule.php | 12 +++---- modules/blockcart/blockcart.tpl | 7 ++-- .../default/modules/blockcart/blockcart.tpl | 33 +++++++++---------- 3 files changed, 23 insertions(+), 29 deletions(-) diff --git a/classes/CartRule.php b/classes/CartRule.php index 8faef8314..a583962f0 100644 --- a/classes/CartRule.php +++ b/classes/CartRule.php @@ -1079,12 +1079,12 @@ class CartRuleCore extends ObjectModel if (!CartRule::isFeatureActive() || !Validate::isLoadedObject($context->cart)) return; - $result = Db::getInstance()->executeS(' + $sql = ' SELECT cr.* FROM '._DB_PREFIX_.'cart_rule cr LEFT JOIN '._DB_PREFIX_.'cart_rule_shop crs ON cr.id_cart_rule = crs.id_cart_rule LEFT JOIN '._DB_PREFIX_.'cart_rule_carrier crca ON cr.id_cart_rule = crca.id_cart_rule - '.($context->cart->id_carrier ? 'INNER JOIN '._DB_PREFIX_.'carrier c ON (c.id_reference = crca.id_carrier AND c.deleted = 0)' : '').' + '.($context->cart->id_carrier ? 'LEFT JOIN '._DB_PREFIX_.'carrier c ON (c.id_reference = crca.id_carrier AND c.deleted = 0)' : '').' LEFT JOIN '._DB_PREFIX_.'cart_rule_country crco ON cr.id_cart_rule = crco.id_cart_rule WHERE cr.active = 1 AND cr.code = "" @@ -1108,9 +1108,9 @@ class CartRuleCore extends ObjectModel '.($context->customer->id ? 'OR 0 < ( SELECT cg.id_group FROM '._DB_PREFIX_.'customer_group cg - LEFT JOIN '._DB_PREFIX_.'cart_rule_group crg ON cg.id_group = crg.id_group + LEFT JOIN '._DB_PREFIX_.'cart_rule_group crg ON (cg.id_group = crg.id_group AND cg.id_group = '.(int)$context->customer->id_default_group.') WHERE cr.id_cart_rule = crg.id_cart_rule - AND cg.id_customer = '.(int)$context->customer->id.' LIMIT 1 + AND cg.id_customer = '.(int)$context->customer->id.' LMIT 1 )' : '').' ) AND ( @@ -1122,8 +1122,8 @@ class CartRuleCore extends ObjectModel ) ) AND cr.id_cart_rule NOT IN (SELECT id_cart_rule FROM '._DB_PREFIX_.'cart_cart_rule WHERE id_cart = '.(int)$context->cart->id.') - ORDER BY priority'); - + ORDER BY priority'; + $result = Db::getInstance()->executeS($sql); if ($result) { $cart_rules = ObjectModel::hydrateCollection('CartRule', $result); diff --git a/modules/blockcart/blockcart.tpl b/modules/blockcart/blockcart.tpl index 45a74566a..051bcf39e 100644 --- a/modules/blockcart/blockcart.tpl +++ b/modules/blockcart/blockcart.tpl @@ -116,8 +116,7 @@ var delete_txt = '{l s='Delete' mod='blockcart' js=1}'; {/if}

{l s='No products' mod='blockcart'}

- {if $discounts|@count > 0} - +
{foreach from=$discounts item=discount} {if $discount.value_real > 0} @@ -132,11 +131,9 @@ var delete_txt = '{l s='Delete' mod='blockcart' js=1}'; {/if} - {/foreach} + {/foreach} - {/if} -

{$shipping_cost} {l s='Shipping' mod='blockcart'} diff --git a/themes/default/modules/blockcart/blockcart.tpl b/themes/default/modules/blockcart/blockcart.tpl index 15b222a77..287510b41 100644 --- a/themes/default/modules/blockcart/blockcart.tpl +++ b/themes/default/modules/blockcart/blockcart.tpl @@ -116,27 +116,24 @@ var delete_txt = '{l s='Delete' mod='blockcart' js=1}'; {/if}

{l s='No products' mod='blockcart'}

- {if $discounts|@count > 0} - +
- {foreach from=$discounts item=discount} - {if $discount.value_real > 0} - - - - - - +{foreach from=$discounts item=discount} +{if $discount.value_real > 0} + + + + + + +{/if} +{/foreach} - - {/if} - +

{$shipping_cost} {l s='Shipping' mod='blockcart'} From bf90c8cf8437dfffb5758aa91f6847d287f6e2fc Mon Sep 17 00:00:00 2001 From: gRoussac Date: Mon, 15 Apr 2013 12:10:27 +0200 Subject: [PATCH 03/13] // remove sql parse error --- classes/CartRule.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/CartRule.php b/classes/CartRule.php index a583962f0..228f15607 100644 --- a/classes/CartRule.php +++ b/classes/CartRule.php @@ -1110,7 +1110,7 @@ class CartRuleCore extends ObjectModel FROM '._DB_PREFIX_.'customer_group cg LEFT JOIN '._DB_PREFIX_.'cart_rule_group crg ON (cg.id_group = crg.id_group AND cg.id_group = '.(int)$context->customer->id_default_group.') WHERE cr.id_cart_rule = crg.id_cart_rule - AND cg.id_customer = '.(int)$context->customer->id.' LMIT 1 + AND cg.id_customer = '.(int)$context->customer->id.' LIMIT 1 )' : '').' ) AND ( From df111c0662a9709f39740d4d334274df221fee2e Mon Sep 17 00:00:00 2001 From: gRoussac Date: Mon, 15 Apr 2013 13:42:57 +0200 Subject: [PATCH 04/13] [-] Installer : do not select activity if not defined --- install-dev/theme/views/configure.phtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-dev/theme/views/configure.phtml b/install-dev/theme/views/configure.phtml index ff9b6f95c..c67b110e7 100644 --- a/install-dev/theme/views/configure.phtml +++ b/install-dev/theme/views/configure.phtml @@ -26,7 +26,7 @@ var default_iso = 'session->shop_country ?>'; From 23b70c4906f334ba8bc91ee5a5f0a86d2c96a185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Gaillard?= Date: Mon, 15 Apr 2013 14:33:20 +0200 Subject: [PATCH 05/13] // small changes in installer --- install-dev/classes/datas.php | 2 +- install-dev/controllers/http/configure.php | 43 +- install-dev/models/install.php | 1 - modules/gsitemap/config.xml | 12 - modules/gsitemap/gsitemap-cron.php | 19 - modules/gsitemap/gsitemap.php | 460 --------------------- modules/gsitemap/index.php | 35 -- modules/gsitemap/logo.gif | Bin 378 -> 0 bytes modules/gsitemap/logo.png | Bin 2337 -> 0 bytes modules/gsitemap/translations/index.php | 35 -- 10 files changed, 23 insertions(+), 584 deletions(-) delete mode 100755 modules/gsitemap/config.xml delete mode 100755 modules/gsitemap/gsitemap-cron.php delete mode 100644 modules/gsitemap/gsitemap.php delete mode 100644 modules/gsitemap/index.php delete mode 100644 modules/gsitemap/logo.gif delete mode 100755 modules/gsitemap/logo.png delete mode 100644 modules/gsitemap/translations/index.php diff --git a/install-dev/classes/datas.php b/install-dev/classes/datas.php index b6156fe9c..964d737cf 100644 --- a/install-dev/classes/datas.php +++ b/install-dev/classes/datas.php @@ -95,7 +95,7 @@ class Datas ), 'shop_activity' => array( 'name' => 'activity', - 'default' => 1, + 'default' => 0, 'validate' => 'isInt', ), 'shop_country' => array( diff --git a/install-dev/controllers/http/configure.php b/install-dev/controllers/http/configure.php index ce237f7a9..1b35a3a9f 100644 --- a/install-dev/controllers/http/configure.php +++ b/install-dev/controllers/http/configure.php @@ -227,28 +227,29 @@ class InstallControllerHttpConfigure extends InstallControllerHttp { // List of activities $list_activities = array( - $this->l('Lingerie and Adult'), - $this->l('Animals and Pets'), - $this->l('Art and Culture'), - $this->l('Babies'), - $this->l('Beauty and Personal Care'), - $this->l('Cars'), - $this->l('Computer Hardware and Software'), - $this->l('Download'), - $this->l('Fashion and accessories'), - $this->l('Flowers, Gifts and Crafts'), - $this->l('Food and beverage'), - $this->l('HiFi, Photo and Video'), - $this->l('Home and Garden'), - $this->l('Home Appliances'), - $this->l('Jewelry'), - $this->l('Mobile and Telecom'), - $this->l('Services'), - $this->l('Shoes and accessories'), - $this->l('Sports and Entertainment'), - $this->l('Travel'), + 1 => $this->l('Lingerie and Adult'), + 2 => $this->l('Animals and Pets'), + 3 => $this->l('Art and Culture'), + 4 => $this->l('Babies'), + 5 => $this->l('Beauty and Personal Care'), + 6 => $this->l('Cars'), + 7 => $this->l('Computer Hardware and Software'), + 8 => $this->l('Download'), + 9 => $this->l('Fashion and accessories'), + 10 => $this->l('Flowers, Gifts and Crafts'), + 11 => $this->l('Food and beverage'), + 12 => $this->l('HiFi, Photo and Video'), + 13 => $this->l('Home and Garden'), + 14 => $this->l('Home Appliances'), + 15 => $this->l('Jewelry'), + 16 => $this->l('Mobile and Telecom'), + 17 => $this->l('Services'), + 18 => $this->l('Shoes and accessories'), + 19 => $this->l('Sports and Entertainment'), + 20 => $this->l('Travel'), ); - sort($list_activities); + + asort($list_activities); $this->list_activities = $list_activities; // Countries list diff --git a/install-dev/models/install.php b/install-dev/models/install.php index f450ddc40..2780f23de 100644 --- a/install-dev/models/install.php +++ b/install-dev/models/install.php @@ -557,7 +557,6 @@ class InstallModelInstall extends InstallAbstractModel 'graphvisifire', 'graphxmlswfcharts', 'gridhtml', - 'gsitemap', 'homefeatured', 'homeslider', 'pagesnotfound', diff --git a/modules/gsitemap/config.xml b/modules/gsitemap/config.xml deleted file mode 100755 index 8cb6e8b39..000000000 --- a/modules/gsitemap/config.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - gsitemap - - - - - - 1 - 0 - - \ No newline at end of file diff --git a/modules/gsitemap/gsitemap-cron.php b/modules/gsitemap/gsitemap-cron.php deleted file mode 100755 index e8ae96de2..000000000 --- a/modules/gsitemap/gsitemap-cron.php +++ /dev/null @@ -1,19 +0,0 @@ -link = new Link(); - -echo $gsitemap->generateSitemapIndex(); \ No newline at end of file diff --git a/modules/gsitemap/gsitemap.php b/modules/gsitemap/gsitemap.php deleted file mode 100644 index c0a747e31..000000000 --- a/modules/gsitemap/gsitemap.php +++ /dev/null @@ -1,460 +0,0 @@ - -* @copyright 2007-2013 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -if (!defined('_PS_VERSION_')) - exit; - -class Gsitemap extends Module -{ - private $_html = ''; - private $_postErrors = array(); - - public function __construct() - { - $this->name = 'gsitemap'; - $this->tab = 'seo'; - $this->version = '1.9'; - $this->author = 'PrestaShop'; - $this->need_instance = 0; - - parent::__construct(); - - $this->displayName = $this->l('Google sitemap'); - $this->description = $this->l('Generate your Google sitemap file.'); - - if (!defined('GSITEMAP_FILE')) - define('GSITEMAP_FILE', dirname(__FILE__).'/../../sitemap.xml'); - } - - public function uninstall() - { - file_put_contents(GSITEMAP_FILE, ''); - return parent::uninstall(); - } - - private function _postValidation() - { - file_put_contents(GSITEMAP_FILE, ''); - if (!($fp = fopen(GSITEMAP_FILE, 'w'))) - $this->_postErrors[] = sprintf($this->l('Cannot create %ssitemap.xml file..'), realpath(dirname(__FILE__.'/../..')).'/'); - else - fclose($fp); - } - - private function getUrlWith($url, $key, $value) - { - if (empty($value)) - return $url; - if (strpos($url, '?') !== false) - return $url.'&'.$key.'='.$value; - return $url.'?'.$key.'='.$value; - } - - private function _postProcess() - { - Configuration::updateValue('GSITEMAP_ALL_CMS', (int)Tools::getValue('GSITEMAP_ALL_CMS')); - Configuration::updateValue('GSITEMAP_ALL_PRODUCTS', (int)Tools::getValue('GSITEMAP_ALL_PRODUCTS')); - - if (Shop::isFeatureActive()) - $res = $this->generateSitemapIndex(); - else - $res = $this->generateSitemap(Configuration::get('PS_SHOP_DEFAULT'), GSITEMAP_FILE); - - $this->_html .= '

'; - $this->_html .= $res ? $this->l('Sitemap file generated.') : $this->l('Error while creating sitemap file.'); - $this->_html .= '

'; - } - - /** - * Generate sitemap index to reference the sitemap of each shop - * - * @return bool - */ - public function generateSitemapIndex() - { - $xmlString = << - - -XML; - $xml = new SimpleXMLElement($xmlString); - - $sql = 'SELECT s.id_shop, su.domain, su.domain_ssl, CONCAT(su.physical_uri, su.virtual_uri) as uri - FROM '._DB_PREFIX_.'shop s - INNER JOIN '._DB_PREFIX_.'shop_url su ON s.id_shop = su.id_shop AND su.main = 1 - WHERE s.active = 1 - AND s.deleted = 0 - AND su.active = 1'; - if (!$result = Db::getInstance()->executeS($sql)) - return false; - - $res = true; - foreach ($result as $row) - { - $info = pathinfo(GSITEMAP_FILE); - $filename = $info['filename'].'-'.$row['id_shop'].'.'.$info['extension']; - - $replaceUrl = array('http://'.$row['domain'].$row['uri'], ((Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://').$row['domain_ssl'].$row['uri']); - - $last = $this->generateSitemap($row['id_shop'], $info['dirname'].'/'.$filename, $replaceUrl); - if ($last) - { - $this->_addSitemapIndexNode($xml, 'http://'.$row['domain'].(($row['uri']) ? $row['uri'] : '/').$filename, date('Y-m-d')); - } - $res &= $last; - } - - $fp = fopen(GSITEMAP_FILE, 'w'); - fwrite($fp, $xml->asXML()); - fclose($fp); - - return $res && file_exists(GSITEMAP_FILE); - } - - /** - * Generate a sitemap for a shop - * - * @param int $id_shop - * @param string $filename - * @return bool - */ - private function generateSitemap($id_shop, $filename = '', $replace_url = array()) - { - $langs = Language::getLanguages(); - $shop = new Shop($id_shop); - if (!$shop->id) - return false; - - $xmlString = << - - -XML; - - $xml = new SimpleXMLElement($xmlString); - - if (Configuration::get('PS_REWRITING_SETTINGS') && count($langs) > 1) - foreach($langs as $lang) - { - $this->_addSitemapNode($xml, Tools::getShopDomain(true, true).__PS_BASE_URI__.$lang['iso_code'].'/', '1.00', 'daily', date('Y-m-d')); - } - else - $this->_addSitemapNode($xml, Tools::getShopDomain(true, true).__PS_BASE_URI__, '1.00', 'daily', date('Y-m-d')); - - /* Product Generator */ - $sql = 'SELECT p.id_product, pl.link_rewrite, DATE_FORMAT(IF(ps.date_upd,ps.date_upd,ps.date_add), \'%Y-%m-%d\') date_upd, pl.id_lang, cl.`link_rewrite` category, ean13, i.id_image, il.legend legend_image, ( - SELECT MIN(level_depth) - FROM '._DB_PREFIX_.'product p2 - '.Shop::addSqlAssociation('product', 'p2').' - LEFT JOIN '._DB_PREFIX_.'category_product cp2 ON p2.id_product = cp2.id_product - LEFT JOIN '._DB_PREFIX_.'category c2 ON cp2.id_category = c2.id_category - WHERE p2.id_product = p.id_product AND product_shop.`active` = 1 AND c2.`active` = 1) AS level_depth - FROM '._DB_PREFIX_.'product p - LEFT JOIN '._DB_PREFIX_.'product_shop ps ON (ps.id_product = p.id_product AND ps.id_shop = '.(int)$id_shop.') - LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (p.id_product = pl.id_product) - LEFT JOIN '._DB_PREFIX_.'category_lang cl ON (ps.id_category_default = cl.id_category AND pl.id_lang = cl.id_lang AND cl.id_shop = '.(int)$id_shop.') - 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) - LEFT JOIN '._DB_PREFIX_.'lang l ON (pl.id_lang = l.id_lang) - WHERE l.`active` = 1 - AND ps.`active` = 1 - AND ps.id_shop = '.(int)$id_shop.' - '.(Configuration::get('GSITEMAP_ALL_PRODUCTS') ? '' : 'HAVING level_depth IS NOT NULL').' - ORDER BY pl.id_product, pl.id_lang ASC'; - - $resource = Db::getInstance(_PS_USE_SQL_SLAVE_)->query($sql); - - // array used to know which product/image was already added (blacklist) - $done = null; - $sitemap = null; - - // iterates on the products, to gather the image ids - while ($product = Db::getInstance()->nextRow($resource)) - { - // if the product has not been added - $id_product = $product['id_product']; - if (!isset($done[$id_product]['added'])) - { - // priority - if (($priority = 0.7 - ($product['level_depth'] / 10)) < 0.1) - $priority = 0.1; - - // adds the product - $tmpLink = $this->context->link->getProductLink((int)($product['id_product']), $product['link_rewrite'], $product['category'], $product['ean13'], (int)($product['id_lang'])); - $sitemap = $this->_addSitemapNode($xml, $tmpLink, $priority, 'weekly', substr($product['date_upd'], 0, 10)); - - // considers the product has added - $done[$id_product]['added'] = true; - } - - // if the image has not been added - $id_image = $product['id_image']; - if (!isset($done[$id_product][$id_image]) && $id_image) - { - // adds the image - $this->_addSitemapNodeImage($sitemap, $product); - - // considers the image as added - $done[$id_product][$id_image] = true; - } - } - - /* Categories Generator */ - if (Configuration::get('PS_REWRITING_SETTINGS')) - $categories = Db::getInstance()->executeS(' - SELECT c.id_category, c.level_depth, link_rewrite, DATE_FORMAT(IF(date_upd,date_upd,date_add), \'%Y-%m-%d\') AS date_upd, cl.id_lang - FROM '._DB_PREFIX_.'category c - LEFT JOIN '._DB_PREFIX_.'category_lang cl ON c.id_category = cl.id_category - LEFT JOIN '._DB_PREFIX_.'lang l ON cl.id_lang = l.id_lang - WHERE l.`active` = 1 AND c.`active` = 1 AND c.id_category != 1 - ORDER BY cl.id_category, cl.id_lang ASC'); - else - $categories = Db::getInstance()->executeS( - 'SELECT c.id_category, c.level_depth, DATE_FORMAT(IF(date_upd,date_upd,date_add), \'%Y-%m-%d\') AS date_upd - FROM '._DB_PREFIX_.'category c - ORDER BY c.id_category ASC'); - - - foreach($categories as $category) - { - if (($priority = 0.9 - ($category['level_depth'] / 10)) < 0.1) - $priority = 0.1; - - $tmpLink = Configuration::get('PS_REWRITING_SETTINGS') ? - $this->context->link->getCategoryLink((int)$category['id_category'], $category['link_rewrite'], (int)$category['id_lang']) - : $this->context->link->getCategoryLink((int)$category['id_category']); - $this->_addSitemapNode($xml, htmlspecialchars($tmpLink), $priority, 'weekly', substr($category['date_upd'], 0, 10)); - } - - /* CMS Generator */ - if (Configuration::get('GSITEMAP_ALL_CMS') || !Module::isInstalled('blockcms')) - $sql_cms = ' - SELECT DISTINCT '.(Configuration::get('PS_REWRITING_SETTINGS') ? 'cl.id_cms, cl.link_rewrite, cl.id_lang' : 'cl.id_cms'). - ' FROM '._DB_PREFIX_.'cms_lang cl - LEFT JOIN '._DB_PREFIX_.'lang l ON (cl.id_lang = l.id_lang) - WHERE l.`active` = 1 - ORDER BY cl.id_cms, cl.id_lang ASC'; - else if (Module::isInstalled('blockcms')) - $sql_cms = ' - SELECT DISTINCT '.(Configuration::get('PS_REWRITING_SETTINGS') ? 'cl.id_cms, cl.link_rewrite, cl.id_lang' : 'cl.id_cms'). - ' FROM '._DB_PREFIX_.'cms_block_page b - LEFT JOIN '._DB_PREFIX_.'cms_lang cl ON (b.id_cms = cl.id_cms) - LEFT JOIN '._DB_PREFIX_.'lang l ON (cl.id_lang = l.id_lang) - WHERE l.`active` = 1 - ORDER BY cl.id_cms, cl.id_lang ASC'; - - $cmss = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql_cms); - foreach($cmss as $cms) - { - $tmpLink = Configuration::get('PS_REWRITING_SETTINGS') ? - $this->context->link->getCMSLink((int)$cms['id_cms'], $cms['link_rewrite'], false, (int)$cms['id_lang']) - : $this->context->link->getCMSLink((int)$cms['id_cms']); - $this->_addSitemapNode($xml, $tmpLink, '0.8', 'daily'); - } - - /* Add classic pages (contact, best sales, new products...) */ - $pages = array( - 'supplier' => false, - 'manufacturer' => false, - 'new-products' => false, - 'prices-drop' => false, - 'stores' => false, - 'authentication' => true, - 'best-sales' => false, - 'contact-form' => true); - - // Don't show suppliers and manufacturers if they are disallowed - if (!Module::getInstanceByName('blockmanufacturer')->id && !Configuration::get('PS_DISPLAY_SUPPLIERS')) - unset($pages['manufacturer']); - - if (!Module::getInstanceByName('blocksupplier')->id && !Configuration::get('PS_DISPLAY_SUPPLIERS')) - unset($pages['supplier']); - - // Generate nodes for pages - if(Configuration::get('PS_REWRITING_SETTINGS')) - foreach ($pages as $page => $ssl) - foreach($langs as $lang) - $this->_addSitemapNode($xml, $this->context->link->getPageLink($page, $ssl, $lang['id_lang']), '0.5', 'monthly'); - else - foreach($pages as $page => $ssl) - $this->_addSitemapNode($xml, $this->context->link->getPageLink($page, $ssl), '0.5', 'monthly'); - - $xml_string = $xml->asXML(); - - // Replace URL in XML strings by real shops URL - if ($replace_url) - $xml_string = str_replace(array(Tools::getShopDomain(true).__PS_BASE_URI__, Tools::getShopDomainSsl(true).__PS_BASE_URI__), $replace_url, $xml_string); - - $fp = fopen($filename, 'w'); - fwrite($fp, $xml_string); - fclose($fp); - - return file_exists($filename); - } - - private function _addSitemapIndexNode($xml, $loc, $last_mod) - { - $sitemap = $xml->addChild('sitemap'); - $sitemap->addChild('loc', htmlspecialchars($loc)); - $sitemap->addChild('lastmod', $last_mod); - return $sitemap; - } - - private function _addSitemapNode($xml, $loc, $priority, $change_freq, $last_mod = NULL) - { - $sitemap = $xml->addChild('url'); - $sitemap->addChild('loc', htmlspecialchars($loc)); - $sitemap->addChild('priority', number_format($priority,1,'.','')); - if ($last_mod) - $sitemap->addChild('lastmod', $last_mod); - $sitemap->addChild('changefreq', $change_freq); - return $sitemap; - } - - 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', '&', $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'); - } - - private function _displaySitemap() - { - if (Shop::isFeatureActive()) - { - $sql = 'SELECT s.id_shop, su.domain, su.domain_ssl, CONCAT(su.physical_uri, su.virtual_uri) as uri - FROM '._DB_PREFIX_.'shop s - INNER JOIN '._DB_PREFIX_.'shop_url su ON s.id_shop = su.id_shop AND su.main = 1 - WHERE s.active = 1 - AND s.deleted = 0 - AND su.active = 1'; - if (!$result = Db::getInstance()->executeS($sql)) - return ''; - - $this->_html .= '

'.$this->l('Sitemap index').'

'; - $this->_html .= '

'.$this->l('Your Google sitemap file is online at the following address:').'
- '.Tools::getShopDomain(true, true).__PS_BASE_URI__.'sitemap.xml


'; - - $info = pathinfo(GSITEMAP_FILE); - foreach ($result as $shop) - { - $filename = $info['dirname'].'/'.$info['filename'].'-'.$shop['id_shop'].'.'.$info['extension']; - if (file_exists($filename) && filesize($filename)) - { - $fp = fopen($filename, 'r'); - $fstat = fstat($fp); - fclose($fp); - $xml = simplexml_load_file($filename); - - $nbPages = count($xml->url); - $sitemap_uri = 'http://'.$shop['domain'].$shop['uri'].$info['filename'].'-'.$shop['id_shop'].'.'.$info['extension']; - - $this->_html .= '

'.$this->l('Sitemap for: ').$shop['domain'].$shop['uri'].'

'; - $this->_html .= '

'.$this->l('Your Google sitemap file is online at the following address:').'
- '.$sitemap_uri.'


'; - - $this->_html .= $this->l('Update:').' '.utf8_encode(strftime('%A %d %B %Y %H:%M:%S',$fstat['mtime'])).'
'; - $this->_html .= $this->l('Filesize:').' '.number_format(($fstat['size']*.000001), 3).'MB
'; - $this->_html .= $this->l('Indexed pages:').' '.$nbPages.'

'; - } - } - } - elseif (file_exists(GSITEMAP_FILE) && filesize(GSITEMAP_FILE)) - { - $fp = fopen(GSITEMAP_FILE, 'r'); - $fstat = fstat($fp); - fclose($fp); - $xml = simplexml_load_file(GSITEMAP_FILE); - - $nbPages = count($xml->url); - - $this->_html .= '

'.$this->l('Your Google sitemap file is online at the following address:').'
- '.Tools::getShopDomain(true, true).__PS_BASE_URI__.'sitemap.xml


'; - - $this->_html .= $this->l('Update:').' '.utf8_encode(strftime('%A %d %B %Y %H:%M:%S',$fstat['mtime'])).'
'; - $this->_html .= $this->l('Filesize:').' '.number_format(($fstat['size']*.000001), 3).'MB
'; - $this->_html .= $this->l('Indexed pages:').' '.$nbPages.'

'; - } - } - - private function _displayForm() - { - if (Tools::usingSecureMode()) - $domain = Tools::getShopDomainSsl(true); - else - $domain = Tools::getShopDomain(true); - - $this->_html .= ' -
-
- -
-
- -
- -

-

'.$this->l('Use cron job to re-build the sitemap:').'

-

- '.$domain.__PS_BASE_URI__.'modules/gsitemap/gsitemap-cron.php?&token='.substr(Tools::encrypt('gsitemap/cron'),0,10).'&GSITEMAP_ALL_CMS='.((int)Configuration::get('GSITEMAP_ALL_CMS')).'&GSITEMAP_ALL_PRODUCTS='.((int)Configuration::get('GSITEMAP_ALL_PRODUCTS')).' -

'; - } - - public function getContent() - { - if (Tools::isSubmit('btnSubmit')) - { - $this->_postValidation(); - if (!count($this->_postErrors)) - $this->_postProcess(); - else - foreach ($this->_postErrors as $err) - $this->_html .= '
'.$err.'
'; - } - - $this->_html .= ' -
- '.$this->l('Search Engine Optimization (SEO).').' -
- '.$this->l('See').' - '.$this->l('This page').' '.$this->l('For more information').' -
'; - - $this->_displaySitemap(); - $this->_displayForm(); - - $this->_html .= '
'; - return $this->_html; - } - -} - diff --git a/modules/gsitemap/index.php b/modules/gsitemap/index.php deleted file mode 100644 index 3f6561f72..000000000 --- a/modules/gsitemap/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2013 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 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; \ No newline at end of file diff --git a/modules/gsitemap/logo.gif b/modules/gsitemap/logo.gif deleted file mode 100644 index d24a14a90921f6b698df98d4c7135dfc7d97dd70..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 378 zcmV-=0fqiYNk%w1VGsZi0M!5h025YktnbGo08gz|se6)LJGTgxdhbmjK_ zMs&&qHnH6p5{Zx56(4|an&}rilgut6O|?=0B9{06|II1@97(Xv-1EWp{}VCAATGs1 zZrlI$|6+ux-Ru7rKfl}>0A+>P(kKrxV7L=3pw=KSftlYiH?h#=|Jx-R4l2v(|NlI- zM9~ljA^8LV2LS&7EC2ui01yBW000J;zy_%@s0@w1iZbEzH7wAmR62TEdN5ppvg*_V z5a{W7P;pkU-jyNJK!4VmNG(l8ptL7Wq%cjTV-_J4E`L&R7BvQjQXWqkD2!1zPc0>W zP$mZvIyxy90#6SJ4hK;TIT#cl7CTQHEDH>nP&yz4786!55(^(276%6x0JwP;CMFvN Y5;iL_JSZ=~u98zbP1)MpJ~BZ7JC9qMJpcdz diff --git a/modules/gsitemap/logo.png b/modules/gsitemap/logo.png deleted file mode 100755 index 21c29316c9c7b50e0d35cf3bcd56bbdae46123e2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2337 zcmV++3EuXJP)vsBN{S>cG$r$aI)0tpWwg zqm@x8NGQ}0Dujd(^4cVu>}Io%yN`QszjHSW2?@4##=CQ7?>+b2bN>JPzyCY`(eT+X zbtmwm3Os8Kb|`En@X|uyIo=xh952Uip#8&Xw_EW;do8Q!9NT#-apW)7@##~oy+DT? z^I0a8#%ty4_q`W4lsRcb`ecn5WC?+c$A^awY{rk;KEU*sUqGg<5h`@3nu@gIhE_Ql zr&m6QP5wLa$JxuF#Rs66=CGw4ssfK{?F+1%GmjmaoB_UqwfiIe>u3L0YxgS(W-j?2 zL?{4fp%bo}N{BoM5?4Br4(Tv_<50VKJ7!zfP3IW1?f@bi?knK!fPB{2Tv^Y7y%$4J z9A1LxgkU6PvrG#nEjN(hk7n1`bBqPyEJLy@L`D#usE$;350thbVjOe0pPu#ga&X$l zQv#9Z&D<&F7+lLW)Bq(1yVIGEQ|(Ut@GfA-Ss>B^jQ4W_C-8XQW{`YHG&IBEFNHZ3p zVIjG}0KO*dAFZON<25M#DumFW(SQNtED9dD2Z47EV?s|D$!HvkE6?^tp)rW*2yl+( zWvii)UV?@TxhNf0**vb|!SxG98jz!m#>skHf#@v?++FO=2YNaTs7@1G>fT3t%`D7x zpM*#ZU~D1q`G1soaBAmY&0z?+2 z<>W%4z|v_6Y}uKQ(y4?v?nA@Tdl8LB@ObGsyy~Bb@QHIw!fPZ#>(bR|So2eqkcH}) zLR|h+KBiO@VbN2sV{CDi?PPbT9e?=itEgFvkN0jsHM`Qo3{WKz_f*I42&t|1q?t z-od5d1%`ywH>Tj>xsT$l-P_CWd$wug{*8Eg1On1jk+E=Ql@t9T6UwQ1X#E7J`{X^W z{Cxst-g+Pu&HAn;QK}`dChrWkq!*wg?FEwq{r`R$_s_ovC)Ta1y@c>H;nV-e!755T58p^SlC-9gH#kva&2c6P5#4tXlL~rYQ@N-^ap7MIozW~914(S#^H0PFqWIufr6}(IDlSlUjvZ(F z5V*wqv*D%K{Q~B4TH*|SgcM5>CW6cYT5IracNY+vPeO zKlod?eLlF$e6pIs52l)kCrx=j2olQhN|LxdfY+zkY&PksX~}(EhlrJ< zam8u`rf+1JboLP$!HueY68^r!i^BW>j_&&nDsP=g4IukcQWVnoT1f;(t~#>JVVjY- z5dq1^JhyBtp*$vOkYZs{0C&rJxEiQzN*E$uNH(!D(vnEU-1x`alQ3<;M|f;gALGb^ zCTUQo%jK>x8dtvg=EnI=#w6W)y2fFJOQij*HB8^ zQF}Or8Q(pIsb6KVe#lVGo(O>rvy-N`VyOJeI$pIpQ!GCph3Jga;Ud5rO(dl~y@%&@9e9F30 zhy+>8(u~Tdv%J+a9+(t{Xd(me*f65XCPV}4;h3x=C+DfU%Y-B@}`h6QqUXN%f(&E@bSnHi{&&_6-<&2 z4LvY?PM16nQs8klcQR52PqW@ZEI;qdvKfl(DNlC%M}PqUwU(@49(S&900000NkvXX Hu0mjfLTX<) diff --git a/modules/gsitemap/translations/index.php b/modules/gsitemap/translations/index.php deleted file mode 100644 index 3f6561f72..000000000 --- a/modules/gsitemap/translations/index.php +++ /dev/null @@ -1,35 +0,0 @@ - -* @copyright 2007-2013 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 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; \ No newline at end of file From 598948185925df615287d6e68e950978cec02b66 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Mon, 15 Apr 2013 16:21:03 +0200 Subject: [PATCH 06/13] [-] BO : Remove undefined name when module can not be installed --- controllers/admin/AdminModulesController.php | 2 +- modules/blockadvertising/config.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/admin/AdminModulesController.php b/controllers/admin/AdminModulesController.php index 5ce5d6a59..9d516d1d9 100644 --- a/controllers/admin/AdminModulesController.php +++ b/controllers/admin/AdminModulesController.php @@ -629,7 +629,7 @@ class AdminModulesControllerCore extends AdminController $this->errors[] = $this->l('Error on downloading the lastest version'); else if(!$this->extractArchive(_PS_MODULE_DIR_.$modaddons->name.'.zip', false)) - $this->errors[] = $this->l(sprintf("Module %s can't be upgraded: ", $module->displayName)); + $this->errors[] = $this->l(sprintf("Module %s can't be upgraded: ", $modaddons->name)); } } } diff --git a/modules/blockadvertising/config.xml b/modules/blockadvertising/config.xml index 37f1f7221..62b227aae 100755 --- a/modules/blockadvertising/config.xml +++ b/modules/blockadvertising/config.xml @@ -1,9 +1,9 @@ blockadvertising - + - + 1 From eca4a870825a9c47f9a9cd2da61b602373372cd2 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Mon, 15 Apr 2013 18:30:41 +0200 Subject: [PATCH 07/13] [-] FO : First part of fix #PSCFV-8636, cart rule on specifice carrier / all carriers --- controllers/front/OrderController.php | 2 +- controllers/front/OrderOpcController.php | 4 ++-- controllers/front/ParentOrderController.php | 18 ++++++++++++++---- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/controllers/front/OrderController.php b/controllers/front/OrderController.php index 190bdd1de..80b4775bb 100644 --- a/controllers/front/OrderController.php +++ b/controllers/front/OrderController.php @@ -347,7 +347,7 @@ class OrderControllerCore extends ParentOrderController $this->context->smarty->assign( array( - 'free_shipping' => false, // Deprecated since a cart rule can be applied the specific carriers only + // 'free_shipping' => false, // Deprecated since a cart rule can be applied the specific carriers only 'is_guest' => (isset($this->context->customer->is_guest) ? $this->context->customer->is_guest : 0) )); } diff --git a/controllers/front/OrderOpcController.php b/controllers/front/OrderOpcController.php index fcc6fb222..9b90e22a4 100644 --- a/controllers/front/OrderOpcController.php +++ b/controllers/front/OrderOpcController.php @@ -316,7 +316,7 @@ class OrderOpcControllerCore extends ParentOrderController // If a rule offer free-shipping, force hidding shipping prices $free_shipping = false; foreach ($this->context->cart->getCartRules() as $rule) - if ($rule['free_shipping']) + if ($rule['free_shipping'] && !$rule['carrier_restriction']) { $free_shipping = true; break; @@ -500,7 +500,7 @@ class OrderOpcControllerCore extends ParentOrderController $oldMessage = Message::getMessageByCartId((int)($this->context->cart->id)); $vars = array( - 'free_shipping' => false, // Deprecated since a cart rule can be applied the specific carriers only + // 'free_shipping' => false, // Deprecated since a cart rule can be applied the specific carriers only 'checkedTOS' => (int)($this->context->cookie->checkedTOS), 'recyclablePackAllowed' => (int)(Configuration::get('PS_RECYCLABLE_PACK')), 'giftAllowed' => (int)(Configuration::get('PS_GIFT_WRAPPING')), diff --git a/controllers/front/ParentOrderController.php b/controllers/front/ParentOrderController.php index 164ba87b2..3483b2cce 100644 --- a/controllers/front/ParentOrderController.php +++ b/controllers/front/ParentOrderController.php @@ -454,15 +454,15 @@ class ParentOrderControllerCore extends FrontController } protected function _assignCarrier() - { + { $address = new Address($this->context->cart->id_address_delivery); $id_zone = Address::getZoneById($address->id); $carriers = $this->context->cart->simulateCarriersOutput(); $checked = $this->context->cart->simulateCarrierSelectedOutput(); $delivery_option_list = $this->context->cart->getDeliveryOptionList(); $this->setDefaultCarrierSelection($delivery_option_list); - - $this->context->smarty->assign(array( + + $this->context->smarty->assign(array( 'address_collection' => $this->context->cart->getAddressCollection(), 'delivery_option_list' => $delivery_option_list, 'carriers' => $carriers, @@ -497,8 +497,18 @@ class ParentOrderControllerCore extends FrontController $this->link_conditions .= '?content_only=1'; else $this->link_conditions .= '&content_only=1'; - + + $free_shipping = false; + foreach ($this->context->cart->getCartRules() as $rule) + { + if ($rule['free_shipping'] && !$rule['carrier_restriction']) + { + $free_shipping = true; + break; + } + } $this->context->smarty->assign(array( + 'free_shipping' => $free_shipping, 'checkedTOS' => (int)($this->context->cookie->checkedTOS), 'recyclablePackAllowed' => (int)(Configuration::get('PS_RECYCLABLE_PACK')), 'giftAllowed' => (int)(Configuration::get('PS_GIFT_WRAPPING')), From 00d7d78ba6e2abcd5e109a5c5c8228d6d45dcbf9 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Mon, 15 Apr 2013 18:51:41 +0200 Subject: [PATCH 08/13] [-] FO : Class free order name for validateOrder --- controllers/front/ParentOrderController.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controllers/front/ParentOrderController.php b/controllers/front/ParentOrderController.php index 3483b2cce..075198f2f 100644 --- a/controllers/front/ParentOrderController.php +++ b/controllers/front/ParentOrderController.php @@ -30,6 +30,8 @@ class FreeOrder extends PaymentModule { public $active = 1; + public $name = 'free_order'; + public $displayName = 'free_order'; } class ParentOrderControllerCore extends FrontController From 7711c710d4e0a7a1717bb4a89165288a7025e689 Mon Sep 17 00:00:00 2001 From: ccauw Date: Mon, 15 Apr 2013 20:19:10 +0300 Subject: [PATCH 09/13] [*] BO : Add block "close_td" in list_content.tpl [*] BO : Add block "close_td" in list_content.tpl {block name="td_content"} ..... {/block} {block name="close_td"} {/block} So now we can override "td" and "/td" tags. So we can create "td" "a" ... content.... "/a" "/td" when overriding the block open-td and close-td and we can use "a" tag with "href" rather than "onclick" to create view links in the list. And the user can choose to open the link in another tab or window. --- admin-dev/themes/default/template/helpers/list/list_content.tpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/admin-dev/themes/default/template/helpers/list/list_content.tpl b/admin-dev/themes/default/template/helpers/list/list_content.tpl index 596c5ba3e..add0db76d 100644 --- a/admin-dev/themes/default/template/helpers/list/list_content.tpl +++ b/admin-dev/themes/default/template/helpers/list/list_content.tpl @@ -116,6 +116,8 @@ {if isset($params.color) && isset($tr.color)} {/if} + {/block} + {block name="close_td"} {/block} {/foreach} From 6cdf8babcaef141521174682808fe2874d2922d2 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Tue, 16 Apr 2013 10:22:46 +0200 Subject: [PATCH 10/13] [-] Fo : Fix big pic alt with jqzoom --- js/jquery/plugins/jqzoom/jquery.jqzoom.js | 7 ++++--- themes/default/js/product.js | 3 ++- themes/default/product.tpl | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/js/jquery/plugins/jqzoom/jquery.jqzoom.js b/js/jquery/plugins/jqzoom/jquery.jqzoom.js index 2e03940a7..d74f8dc1c 100755 --- a/js/jquery/plugins/jqzoom/jquery.jqzoom.js +++ b/js/jquery/plugins/jqzoom/jquery.jqzoom.js @@ -31,9 +31,10 @@ var imageWidth = $(this).get(0).offsetWidth; var imageHeight = $(this).get(0).offsetHeight; - noalt = $(this).attr("alt"); + attr = typeof($(this).attr("rel")) != 'undefined' ? "rel" : "alt"; + noalt = $(this).attr(attr); var bigimage = noalt; - $(this).attr("alt", ''); + $(this).attr(attr, ''); if($("div.zoomdiv").get().length == 0) $(this).after("
"); @@ -67,7 +68,7 @@ $("div.zoomdiv").get(0).scrollLeft = (scrollx) * scalex ; }); }, function() { - $(this).attr("alt", noalt); + $(this).attr(attr, noalt); $("div.zoomdiv").hide(); $(document.body).unbind("mousemove"); $(".lenszoom").remove(); diff --git a/themes/default/js/product.js b/themes/default/js/product.js index 4c71eaef4..7bae47cc0 100644 --- a/themes/default/js/product.js +++ b/themes/default/js/product.js @@ -424,7 +424,7 @@ function displayImage(domAAroundImgThumb, no_animation) { $('#bigpic').attr('src', newSrc); if (typeof(jqZoomEnabled) != 'undefined' && jqZoomEnabled) - $(this).attr('alt', domAAroundImgThumb.attr('href')); + $('#bigpic').attr('rel', domAAroundImgThumb.attr('href')); } $('#views_block li a').removeClass('shown'); $(domAAroundImgThumb).addClass('shown'); @@ -528,6 +528,7 @@ $(document).ready(function() //set jqZoom parameters if needed if (typeof(jqZoomEnabled) != 'undefined' && jqZoomEnabled) { + $('#bigpic').attr('rel', $('#bigpic').attr('src').replace('thickbox', 'large')); $('img.jqzoom').jqueryzoom({ xzoom: 200, //zooming div default width(default width value is 200) yzoom: 200, //zooming div default width(default height value is 200) diff --git a/themes/default/product.tpl b/themes/default/product.tpl index 388f57834..905f8f50a 100644 --- a/themes/default/product.tpl +++ b/themes/default/product.tpl @@ -183,7 +183,7 @@ var fieldRequired = '{l s='Please fill in all the required fields before saving
{if $have_image} - {$link->getImageLink($product->link_rewrite, $cover.id_image, 'thickbox_default')} + {$product->name|escape:'htmlall':'UTF-8'} {l s='Maximize'} {else} From a4d86f14da1ab3f0278a74602165456801c64b76 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Tue, 16 Apr 2013 10:51:16 +0200 Subject: [PATCH 11/13] [*] FO : add steps to authentication pull request 002f468958 thanks to radovanx --- themes/default/authentication.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/default/authentication.tpl b/themes/default/authentication.tpl index 0249bf084..a826a1562 100644 --- a/themes/default/authentication.tpl +++ b/themes/default/authentication.tpl @@ -70,12 +70,12 @@ $(document).ready(function() {

{if !isset($email_create)}{l s='Log in'}{else}{l s='Create an account'}{/if}

- +{if !isset($back) || $back != 'my-account'}{assign var='current_step' value='login'}{include file="$tpl_dir./order-steps.tpl"}{/if} {include file="$tpl_dir./errors.tpl"} {assign var='stateExist' value=false} {if !isset($email_create)}