diff --git a/install-dev/sql/db_settings_extends.sql b/install-dev/sql/db_settings_extends.sql index 450e5ebf2..9ed67c571 100644 --- a/install-dev/sql/db_settings_extends.sql +++ b/install-dev/sql/db_settings_extends.sql @@ -57,22 +57,183 @@ INSERT INTO `PREFIX_module` (`id_module`, `name`, `active`) VALUES (1, 'homefeat (34, 'graphvisifire', 1),(35, 'graphxmlswfcharts', 1),(36, 'graphgooglechart', 1),(37, 'graphartichow', 1),(39, 'gridhtml', 1),(40, 'statsbestcustomers', 1), (41, 'statsorigin', 1),(42, 'pagesnotfound', 1),(43, 'sekeywords', 1),(44, 'statsproduct', 1),(45, 'statsbestproducts', 1),(46, 'statsbestcategories', 1), (47, 'statsbestvouchers', 1),(48, 'statsbestsuppliers', 1),(49, 'statscarrier', 1),(50, 'statsnewsletter', 1),(51, 'statssearch', 1),(52, 'statscheckup', 1),(53, 'statsstock', 1), -(54, 'blockstore', 1),(55, 'statsforecast', 1); +(54, 'blockstore', 1),(55, 'statsforecast', 1), +/* new themes : modules to add */ +(56, 'blocktopmenu', 1), +(57, 'blocksharefb', 1), +(58, 'blocksocial', 1), +(59, 'blockcontactinfos', 1), +(60, 'blockcontact', 1), +(61, 'blockmyaccountfooter', 1), +(62, 'blockreinsurance', 1), +(63, 'blockcustomerprivacy', 1), +(64, 'favoriteproducts', 1), + +(65, 'blocknewsletter', 1), +(66, 'blocksupplier', 1), +(67, 'feeder', 1); INSERT INTO `PREFIX_module_access` (`id_profile`, `id_module`, `configure`, `view`) (SELECT 1, `id_module`, 1, 1 FROM `PREFIX_module`); INSERT INTO `PREFIX_module_shop` (`id_module`, `id_shop`) (SELECT `id_module`, 1 FROM `PREFIX_module`); -INSERT INTO `PREFIX_hook` (`name`, `title`, `description`, `position`) VALUES - ('myAccountBlock', 'My account block', 'Display extra informations inside the "my account" block', 1); -INSERT INTO `PREFIX_hook_module` (`id_module`, `id_hook`, `position`) VALUES (3, 1, 1),(6, 1, 2),(4, 1, 3),(4, 4, 3),(8, 2, 1),(3, 4, 1),(6, 4, 2),(9, 6, 1),(16, 6, 2),(8, 6, 3), -(20, 6, 4),(12, 6, 5),(54, 6, 6),(15, 7, 1),(21, 7, 2),(10, 7, 3),(24, 7, 4),(14, 7, 5),(12, 7, 6),(7, 7, 7),(17, 7, 8),(5, 8, 1),(1, 8, 2),(11, 14, 1),(13, 14, 2),(18, 14, 3), -(19, 14, 4),(22, 14, 5),(8, 19, 1),(12, 21, 1),(25, 11, 1),(25, 21, 2),(26, 32, 1),(27, 32, 2),(28, 32, 3),(30, 32, 4),(31, 32, 5),(32, 32, 6),(33, 32, 7),(34, 33, 1), -(35, 33, 2),(36, 33, 3),(37, 33, 4),(39, 37, 1),(40, 32, 8),(41, 32, 9),(42, 32, 10),(43, 32, 11),(42, 14, 6),(43, 14, 7),(44, 32, 12),(45, 32, 13),(46, 32, 15), -(47, 32, 14),(48, 32, 16),(49, 32, 17),(55, 32, 22),(50, 32, 18),(51, 32, 19),(51, 45, 1),(25, 25, 1),(41, 20, 2),(52, 32, 20),(53, 32, 21),(17, 9, 2),(18, 9, 3),(24, 9, 4),(9, 9, 5), -(15, 9, 6),(5, 9, 7),(8, 9, 8),(10, 9, 9),(20, 9, 10),(11, 9, 11),(16, 9, 12),(22, 9, 13),(13, 9, 14),(14, 9, 15),(12, 9, 16),(7, 9, 17),(21, 9, 18),(10, 60, 1),(10, 61, 1),(10, 62, 1), -(54, 9, 19),(10,66,1),(19,9,20); +/* + * rightcolumn=6, leftcolumn=7, home=8, header=9, top=14, + */ + + + +INSERT INTO `PREFIX_hook_module` (`id_module`, `id_hook`, `position`) VALUES +/* homefeatured */ +(1, 8, 2), +(1, 9, 23), +/* cheque */ +(3, 1, 1), +(3, 4, 1), +/* moneybooker */ +(4, 1, 3), +(4, 4, 3), +/* editorial */ +(5, 8, 1), +(5, 9, 7), +/* bankwire */ +(6, 1, 2), +(6, 4, 2), +/* blockadvertising */ +(7, 7, 7), +(7, 9, 17), + + +/* blockcart */ +(9, 9, 5), +(9, 14, 7), + +/* blockcategories */ +(10, 7, 3), +(10, 9, 9), +(10, 21, 2), +(10, 60, 1), +(10, 61, 1), +(10, 62, 1), +(10, 66, 1), +/* blockcurrencies */ +(11, 9, 11), +(11, 14, 2), + +/* blockcms */ +(12, 6, 5), +(12, 7, 6), +(12, 9, 16), +(12, 21, 4), +/* blocklanguages */ +(13, 9, 14), +(13, 14, 1), +/* blockmanufacturer */ +(14, 7, 5), +(14, 9, 15), +/* blockmyaccount */ +(15, 9, 6), +(15, 21, 3), +/* blocknewproducts */ +(16, 6, 2), +(16, 9, 12), +/* blockpaymentlogo */ +(17, 7, 8), +(17, 9, 2), +/* blockpermanentlinks */ +(18, 9, 3), +(18, 14, 3), +/* blocksearch */ +(19, 9 ,20), +(19, 14, 4), +/* blockspecials */ +(20, 6, 4), +(20, 9, 10), +/* blocktags */ +(21, 7, 2), +(21, 9, 18), +/* blockuserinfo */ +(22, 9, 13), +(22, 14, 5), +/* blockviewed */ +(24, 7, 4), +(24, 9, 4), +/* statsdata */ +(25, 11, 1), +(25, 21, 7), +(25, 25, 1), +/* stats (bo) */ +(26, 32, 1), +(27, 32, 2), +(28, 32, 3), +(30, 32, 4), +(31, 32, 5), +(32, 32, 6), +(33, 32, 7), +/* graphs engine */ +(34, 33, 1), +(35, 33, 2), +(36, 33, 3), +(37, 33, 4), +/* gridhtml (bo) */ +(39, 37, 1), +/* statsbestcustomer (bo)*/ +(40, 32, 8), +/* statsorigin */ +(41, 20, 2), +(41, 32, 9), +/* pagesnotfound */ +(42, 14, 8), +(42, 32, 10), +/* sekeywords */ +(43, 14, 7), +(43, 32, 11), +/* statsproduct */ +(44, 32, 12), +(45, 32, 13), +(46, 32, 15), +(47, 32, 14), +(48, 32, 16), +(49, 32, 17), +(50, 32, 18), +(51, 32, 19), +/* statsearch */ +(51, 45, 1), +/* statscheckup (bo) */ +(52, 32, 20), +/* statstock(bo) */ +(53, 32, 21), +/* blockstore */ +(54, 6, 6), +(54, 9, 19), +/* statsforecast */ +(55, 32, 22), +/* blocktopmenu */ +(56, 9, 22), +(56, 14, 6), +/* blocksharefb */ +(57, 21, 7), +/* blocksocial */ +(58, 9, 5), +(58, 21, 5), +/* blockcontactinfos */ +(59, 9, 21), +(59, 21, 6), +/* blockcontact */ +(60, 6, 7), +/* blockreinsurance */ +(62, 21, 1), +/* favoriteproducts */ +(64, 9, 22), +(64, 25, 1), +(64, 40, 1), +(64, 96, 1), +/* block */ +(65, 6, 8), +/* blocksupplier */ +(66, 7, 9), +(67, 7, 10); CREATE TABLE `PREFIX_pagenotfound` ( `id_pagenotfound` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, @@ -1381,3 +1542,101 @@ INSERT INTO `PREFIX_stock_available` (`id_stock_available`, `id_product`, `id_pr INSERT INTO `PREFIX_order_carrier` (`id_order`, `id_carrier`, `date_add`) VALUES (1, 2, NOW()); + +/* new thme, need to be checked */ + +REPLACE INTO `ps_configuration` (id_group_shop, id_shop, name, value) VALUES + (NULL, NULL, 'PS_CONDITIONS','1'), + (NULL, NULL, 'PS_PRODUCTS_PER_PAGE','10'), + (NULL, NULL, 'PS_PRODUCTS_ORDER_WAY','0'), + (NULL, NULL, 'PS_PRODUCTS_ORDER_BY','4'), + (NULL, NULL, 'PS_DISPLAY_QTIES','1'), + (NULL, NULL, 'PS_NB_DAYS_NEW_PRODUCT','20'), + (NULL, NULL, 'PS_BLOCK_CART_AJAX','1'), + (NULL, NULL, 'PS_PRODUCT_PICTURE_MAX_SIZE','131072'), + (NULL, NULL, 'PS_PRODUCT_PICTURE_WIDTH','64'), + (NULL, NULL, 'PS_PRODUCT_PICTURE_HEIGHT','64'), + (NULL, NULL, 'PS_SEARCH_MINWORDLEN','3'), + (NULL, NULL, 'PS_SEARCH_WEIGHT_PNAME','6'), + (NULL, NULL, 'PS_SEARCH_WEIGHT_REF','10'), + (NULL, NULL, 'PS_SEARCH_WEIGHT_SHORTDESC','1'), + (NULL, NULL, 'PS_SEARCH_WEIGHT_DESC','1'), + (NULL, NULL, 'PS_SEARCH_WEIGHT_CNAME','3'), + (NULL, NULL, 'PS_SEARCH_WEIGHT_MNAME','3'), + (NULL, NULL, 'PS_SEARCH_WEIGHT_TAG','4'), + (NULL, NULL, 'PS_SEARCH_WEIGHT_ATTRIBUTE','2'), + (NULL, NULL, 'PS_SEARCH_WEIGHT_FEATURE','2'), + (NULL, NULL, 'PS_SEARCH_AJAX','1'), + (NULL, NULL, 'PS_DISPLAY_JQZOOM','0'), + (NULL, NULL, 'PS_BLOCK_BESTSELLERS_DISPLAY','0'), + (NULL, NULL, 'PS_BLOCK_NEWPRODUCTS_DISPLAY','0'), + (NULL, NULL, 'PS_BLOCK_SPECIALS_DISPLAY','0'), + (NULL, NULL, 'PS_TAX_DISPLAY','0'), + (NULL, NULL, 'PS_STORES_DISPLAY_CMS','1'), + (NULL, NULL, 'PS_STORES_DISPLAY_FOOTER','1'), + (NULL, NULL, 'SHOP_LOGO_WIDTH','224'), + (NULL, NULL, 'SHOP_LOGO_HEIGHT','73'), + (NULL, NULL, 'EDITORIAL_IMAGE_WIDTH','530'), + (NULL, NULL, 'EDITORIAL_IMAGE_HEIGHT','228'), + (NULL, NULL, 'PS_DISPLAY_SUPPLIERS','1'), + (NULL, NULL, 'PS_LEGACY_IMAGES','1'), + (NULL, NULL, 'PS_IMAGE_QUALITY','jpg'), + (NULL, NULL, 'PS_PNG_QUALITY','7'), + (NULL, NULL, 'PS_JPEG_QUALITY','90'), + (NULL, NULL, 'PRODUCTS_VIEWED_NBR','2'), + (NULL, NULL, 'BLOCK_CATEG_DHTML','1'), + (NULL, NULL, 'BLOCK_CATEG_MAX_DEPTH','3'), + (NULL, NULL, 'MANUFACTURER_DISPLAY_FORM','1'), + (NULL, NULL, 'MANUFACTURER_DISPLAY_TEXT','1'), + (NULL, NULL, 'MANUFACTURER_DISPLAY_TEXT_NB','5'), + (NULL, NULL, 'NEW_PRODUCTS_NBR','5'), + (NULL, NULL, 'BLOCKTAGS_NBR','10'), + (NULL, NULL, 'FOOTER_CMS','0_3|0_4'), + (NULL, NULL, 'FOOTER_BLOCK_ACTIVATION','0_3|0_4'), + (NULL, NULL, 'FOOTER_POWEREDBY','1'), + (NULL, NULL, 'BLOCKADVERT_LINK','0'), + (NULL, NULL, 'BLOCKSTORE_IMG','store.jpg'), + (NULL, NULL, 'BLOCKADVERT_IMG_EXT','jpg'), + (NULL, NULL, 'MOD_BLOCKTOPMENU_ITEMS','CAT2,CAT3,CAT4'), + (NULL, NULL, 'MOD_BLOCKTOPMENU_SEARCH',''), + (NULL, NULL, 'blocksocial_facebook','www.facebook.com/prestashop'), + (NULL, NULL, 'blocksocial_twitter','www.twitter.com/prestashop'), + (NULL, NULL, 'blocksocial_rss','RSS'), + (NULL, NULL, 'blockcontactinfos_company','Prestashop'), + (NULL, NULL, 'blockcontactinfos_address','41, boulevard des capucines, 75002 Paris, France'), + (NULL, NULL, 'blockcontactinfos_phone','+33 (0)1.40.18.30.04'), + (NULL, NULL, 'blockcontactinfos_email','pub@prestashop.com'), + (NULL, NULL, 'blockcontact_telnumber','+33 (0)1.40.18.30.04'), + (NULL, NULL, 'blockcontact_email','pub@prestashop.com'), + (NULL, NULL, 'SUPPLIER_DISPLAY_TEXT','1'), + (NULL, NULL, 'SUPPLIER_DISPLAY_TEXT_NB','5'), + (NULL, NULL, 'SUPPLIER_DISPLAY_FORM','1'), + (NULL, NULL, 'BLOCK_CATEG_NBR_COLUMN_FOOTER','1'), + (NULL, NULL, 'UPGRADER_BACKUPDB_FILENAME',''), + (NULL, NULL, 'UPGRADER_BACKUPFILES_FILENAME',''), + (NULL, NULL, 'blockreinsurance_nbblocks','5'); + + +CREATE TABLE IF NOT EXISTS `PREFIX_reinsurance` ( + `id_reinsurance` INT UNSIGNED NOT NULL, + `filename` VARCHAR(100) NOT NULL, + PRIMARY KEY (`id_reinsurance`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `PREFIX_reinsurance_lang` ( + `id_reinsurance` INT UNSIGNED NOT NULL, + `id_lang` INT UNSIGNED NOT NULL, + `text` VARCHAR(300) NOT NULL, + PRIMARY KEY (`id_reinsurance`, `id_lang`) +) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + +CREATE TABLE `PREFIX_favorite_product` ( + `id_favorite_product` int(10) unsigned NOT NULL auto_increment, + `id_product` int(10) unsigned NOT NULL, + `id_customer` int(10) unsigned NOT NULL, + `id_shop` int(10) unsigned NOT NULL, + `date_add` datetime NOT NULL, + `date_upd` datetime NOT NULL, + PRIMARY KEY (`id_favorite_product`)) +ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; + diff --git a/install-dev/sql/db_settings_lite.sql b/install-dev/sql/db_settings_lite.sql index faafe87de..df56dadb3 100644 --- a/install-dev/sql/db_settings_lite.sql +++ b/install-dev/sql/db_settings_lite.sql @@ -173,7 +173,8 @@ INSERT INTO `PREFIX_hook` (`id_hook`, `name`, `title`, `description`, `position` (92, 'actionAttributePostProcess', 'On post-process in admin feature value', 'On post-process in admin feature value', 0, 0), (93, 'actionAttributeDelete', 'On deleting attribute feature value', 'On deleting attribute feature value', 0, 0), (94, 'actionAttributeSave', 'On saving attribute feature value', 'On saving attribute feature value', 0, 0), -(95, 'actionTaxManager', 'Tax Manager Factory', '' , 0, 0); +(95, 'actionTaxManager', 'Tax Manager Factory', '' , 0, 0), +(96, 'myAccountBlock', 'My account block', 'Display extra informations inside the "my account" block', 1, 0); INSERT INTO `PREFIX_configuration` (`id_configuration`, `name`, `value`, `date_add`, `date_upd`) VALUES (1, 'PS_LANG_DEFAULT', '1', NOW(), NOW()), @@ -904,11 +905,11 @@ INSERT INTO `PREFIX_currency_shop` (`id_currency`, `id_shop`) VALUES (1,1), (2,1 INSERT INTO `PREFIX_image_type` (`id_image_type`, `name`, `width`, `height`, `products`, `categories`, `manufacturers`, `suppliers`, `scenes`, `stores`) VALUES (1, 'small', 45, 45, 1, 1, 1, 1, 0, 0), -(2, 'medium', 80, 80, 1, 1, 1, 1, 0, 1), -(3, 'large', 300, 300, 1, 1, 1, 1, 0, 0), +(2, 'medium', 58, 58, 1, 1, 1, 1, 0, 1), +(3, 'large', 264, 264, 1, 1, 1, 1, 0, 0), (4, 'thickbox', 600, 600, 1, 0, 0, 0, 0, 0), (5, 'category', 500, 150, 0, 1, 0, 0, 0, 0), -(6, 'home', 129, 129, 1, 0, 0, 0, 0, 0), +(6, 'home', 124, 124, 1, 0, 0, 0, 0, 0), (7, 'large_scene', 556, 200, 0, 0, 0, 0, 1, 0), (8, 'thumb_scene', 161, 58, 0, 0, 0, 0, 1, 0); @@ -1523,7 +1524,7 @@ phone' where `id_country`=21; INSERT INTO `PREFIX_group_shop` (`id_group_shop`, `name`, `active`, `deleted`, `share_stock`, `share_customer`, `share_order`) VALUES (1, 'Default', 1, 0, 0, 0, 0); INSERT INTO `PREFIX_shop` (`id_shop`, `id_group_shop`, `name`, `id_category`, `id_theme`, `active`, `deleted`) VALUES (1, 1, 'Default', 1, 1, 1, 0); -INSERT INTO `PREFIX_theme` (`id_theme`, `name`) VALUES (1, 'prestashop'); +INSERT INTO `PREFIX_theme` (`id_theme`, `name`) VALUES (1, 'default'); UPDATE `PREFIX_address_format` set `format`= 'firstname lastname company diff --git a/modules/authorizeaim/authorizeaim.php b/modules/authorizeaim/authorizeaim.php index 191e6a930..2d9e784b3 100755 --- a/modules/authorizeaim/authorizeaim.php +++ b/modules/authorizeaim/authorizeaim.php @@ -201,7 +201,7 @@ class authorizeAIM extends PaymentModule public function hookHeader() { - $this->context->controller->addJS(_PS_JS_DIR_.'jquery/jquery.validate.creditcard2-1.0.1.js'); + Tools::addJS(_PS_JS_DIR_.'jquery/jquery.validate.creditcard2-1.0.1.js'); } /** diff --git a/modules/bankwire/bankwire.php b/modules/bankwire/bankwire.php index 47dd7eb08..99d36be89 100644 --- a/modules/bankwire/bankwire.php +++ b/modules/bankwire/bankwire.php @@ -204,7 +204,6 @@ class BankWire extends PaymentModule $state = $params['objOrder']->getCurrentState(); if ($state == Configuration::get('PS_OS_BANKWIRE') OR $state == Configuration::get('PS_OS_OUTOFSTOCK')) - { $this->context->smarty->assign(array( 'total_to_pay' => Tools::displayPrice($params['total_to_pay'], $params['currencyObj'], false), 'bankwireDetails' => Tools::nl2br($this->details), @@ -213,9 +212,6 @@ class BankWire extends PaymentModule 'status' => 'ok', 'id_order' => $params['objOrder']->id )); - if (isset($params['objOrder']->reference) && !empty($params['objOrder']->reference)) - $this->context->smarty->assign('reference', $params['objOrder']->reference); - } else $this->context->smarty->assign('status', 'failed'); return $this->display(__FILE__, 'payment_return.tpl'); diff --git a/modules/bankwire/payment_return.tpl b/modules/bankwire/payment_return.tpl index 241061a35..1fc35abb6 100644 --- a/modules/bankwire/payment_return.tpl +++ b/modules/bankwire/payment_return.tpl @@ -32,11 +32,7 @@

- {l s='to the account owner of' mod='bankwire'} {if $bankwireOwner}{$bankwireOwner}{else}___________{/if}

- {l s='with these details' mod='bankwire'} {if $bankwireDetails}{$bankwireDetails}{else}___________{/if}

- {l s='to this bank' mod='bankwire'} {if $bankwireAddress}{$bankwireAddress}{else}___________{/if} - {if !isset($reference)} -

- {l s='Do not forget to insert your order number #' mod='bankwire'} {$id_order} {l s='in the subject of your bank wire' mod='bankwire'} - {else} -

- {l s='Do not forget to insert your order reference' mod='bankwire'} {$reference} {l s='in the subject of your bank wire' mod='bankwire'} - {/if} +

- {l s='Do not forget to insert your order #' mod='bankwire'} {$id_order} {l s='in the subject of your bank wire' mod='bankwire'}

{l s='An e-mail has been sent to you with this information.' mod='bankwire'}

{l s='Your order will be sent as soon as we receive your settlement.' mod='bankwire'}

{l s='For any questions or for further information, please contact our' mod='bankwire'} {l s='customer support' mod='bankwire'}. diff --git a/modules/blockadvertising/blockadvertising.css b/modules/blockadvertising/blockadvertising.css new file mode 100644 index 000000000..211305c85 --- /dev/null +++ b/modules/blockadvertising/blockadvertising.css @@ -0,0 +1,2 @@ +/* Block advertising */ +.advertising_block { width: 191px; margin-bottom: 1em; text-align: center } \ No newline at end of file diff --git a/modules/blockbestsellers/blockbestsellers.css b/modules/blockbestsellers/blockbestsellers.css new file mode 100644 index 000000000..e07df3095 --- /dev/null +++ b/modules/blockbestsellers/blockbestsellers.css @@ -0,0 +1,54 @@ +/* Block best sellers */ +#best-sellers_block_right ul {margin-bottom:5px} +#best-sellers_block_right li { + float:none; + padding:10px 0; + border-bottom:1px dotted #ccc +} +#best-sellers_block_right li.last_item {border:none} +#best-sellers_block_right li a.content_img { + display:block; + float:left; + padding:1px; + height:47px; + width:67px; + text-decoration:none; + background:#333 +} +#best-sellers_block_right li span.number { + display:block; + float:left; + margin-top:6px; + width:20px; + font-weight:bold; + font-size:18px; + color:#fff; + text-align:center +} +#best-sellers_block_right li img { + border:1px solid #ededed; +} +#best-sellers_block_right li p { + float:left; + margin-left:7px; + width:125px; + font-weight:bold; + font-size:12px +} +#best-sellers_block_right li .price { + font-weight:bold; + font-size:14px; + color:#990000; + +} + +#best-sellers_block_right p.lnk { + padding:0; + text-align:right +} +#best-sellers_block_right .lnk .button_large { + padding:0; + border:none; + background:none +} +#best-sellers_block_right .lnk .button_large:hover {text-decoration:underline} \ No newline at end of file diff --git a/modules/blockbestsellers/blockbestsellers.tpl b/modules/blockbestsellers/blockbestsellers.tpl index eb89140b5..ebcedad9e 100644 --- a/modules/blockbestsellers/blockbestsellers.tpl +++ b/modules/blockbestsellers/blockbestsellers.tpl @@ -1,47 +1,53 @@ -{* -* 2007-2011 PrestaShop -* -* NOTICE OF LICENSE -* -* This source file is subject to the Academic Free License (AFL 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/afl-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 -* @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 7077 $ -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*} - - -
-

{l s='Top sellers' mod='blockbestsellers'}

-
- {if $best_sellers|@count > 0} -
    -
  • {$best_sellers.0.legend|escape:'htmlall':'UTF-8'}
  • - {if $best_sellers|@count > 1}
  • {$best_sellers.1.legend|escape:'htmlall':'UTF-8'}
  • {/if} -
-
- {foreach from=$best_sellers item=product name=myLoop} -
{$product.name|strip_tags:'UTF-8'|escape:'htmlall':'UTF-8'}
- {/foreach} -
-

{l s='All best sellers' mod='blockbestsellers'}

- {else} -

{l s='No best sellers at this time' mod='blockbestsellers'}

- {/if} -
-
- +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 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/afl-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 +* @copyright 2007-2011 PrestaShop SA +* @version Release: $Revision: 7077 $ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + +
+

{l s='Top sellers' mod='blockbestsellers'}

+
+ {if $best_sellers|@count > 0} + +

» {l s='All best sellers' mod='blockbestsellers'}

+ {else} +

{l s='No best sellers at this time' mod='blockbestsellers'}

+ {/if} +
+
+ diff --git a/modules/blockcart/ajax-cart.js b/modules/blockcart/ajax-cart.js index b088312ff..a31c22462 100644 --- a/modules/blockcart/ajax-cart.js +++ b/modules/blockcart/ajax-cart.js @@ -19,7 +19,7 @@ * * @author PrestaShop SA * @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 7100 $ +* @version Release: $Revision: 7009 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ @@ -89,20 +89,18 @@ var ajaxCart = { // try to expand the cart expand : function(){ - $(['left_column', 'right_column']).each(function(id, parentId) + if ($('#cart_block #cart_block_list').hasClass('collapsed')) { - if ($('#'+parentId+' #cart_block #cart_block_list').hasClass('collapsed')) - { - $('#'+parentId+' #cart_block #cart_block_summary').slideUp(200, function(){ + $('#cart_block #cart_block_summary').slideUp(200, function(){ $(this).addClass('collapsed').removeClass('expanded'); - $('#'+parentId+' #cart_block #cart_block_list').slideDown({ + $('#cart_block #cart_block_list').slideDown({ duration: 600, complete: function(){$(this).addClass('expanded').removeClass('collapsed');} }); }); // toogle the button expand/collapse button - $('#'+parentId+' #cart_block h4 span#block_cart_expand').fadeOut('slow', function(){ - $('#'+parentId+' #cart_block h4 span#block_cart_collapse').fadeIn('fast'); + $('#cart_block h4 span#block_cart_expand').fadeOut('slow', function(){ + $('#cart_block h4 span#block_cart_collapse').fadeIn('fast'); }); // save the expand statut in the user cookie @@ -112,8 +110,9 @@ var ajaxCart = { async: true, data: 'ajax_blockcart_display=expand' + '&rand=' + new Date().getTime() }); + + } - }); }, // cart to fix display when using back and previous browsers buttons refresh : function(){ @@ -137,6 +136,7 @@ var ajaxCart = { // try to collapse the cart collapse : function(){ + if ($('#cart_block #cart_block_list').hasClass('expanded')) { $('#cart_block #cart_block_list').slideUp('slow', function(){ @@ -215,7 +215,7 @@ var ajaxCart = { $picture.css({'position': 'absolute', 'top': pictureOffsetOriginal.top, 'left': pictureOffsetOriginal.left}); var pictureOffset = $picture.offset(); - var cartBlockOffset = $('#cart_block').offset(); + var cartBlockOffset = $('#shopping_cart').offset(); // Check if the block cart is activated for the animation if (cartBlockOffset != undefined && $picture.size()) @@ -263,8 +263,6 @@ var ajaxCart = { //hide the products displayed in the page but no more in the json data hideOldProducts : function(jsonData) { - $(['left_column', 'right_column']).each(function(id, parentId) - { //delete an eventually removed product of the displayed cart (only if cart is not empty!) if($('#cart_block #cart_block_list dl.products').length > 0) { @@ -272,8 +270,7 @@ var ajaxCart = { var removedProductData = null; var removedProductDomId = null; //look for a product to delete... - $('#'+parentId+' #cart_block_list dl.products dt').each(function() - { + $('#cart_block_list dl.products dt').each(function(){ //retrieve idProduct and idCombination from the displayed product in the block cart var domIdProduct = $(this).attr('id'); var firstCut = domIdProduct.replace('cart_block_product_', ''); @@ -298,6 +295,7 @@ var ajaxCart = { removedProductId = $(this).attr('id'); //return false; // Regarding that the customer can only remove products one by one, we break the loop } + }); //if there is a removed product, delete it from the displayed block cart if (removedProductId != null) @@ -305,52 +303,48 @@ var ajaxCart = { var firstCut = removedProductId.replace('cart_block_product_', ''); var ids = firstCut.split('_'); - $('#'+parentId+' #'+removedProductId).addClass('strike').fadeTo('slow', 0, function(){ + $('#'+removedProductId).addClass('strike').fadeTo('slow', 0, function(){ $(this).slideUp('slow', function(){ $(this).remove(); //if the cart is now empty, show the 'no product in the cart' message - if($('#'+parentId+' #cart_block dl.products dt').length == 0) + if($('#cart_block dl.products dt').length == 0) { - $('#'+parentId+' p#cart_block_no_products').slideDown('fast'); - $('#'+parentId+' div#cart_block dl.products').remove(); + $('p#cart_block_no_products:hidden').slideDown('fast'); + $('div#cart_block dl.products').remove(); } }); }); - $('#'+parentId+' dd#cart_block_combination_of_' + ids[0] + (ids[1] ? '_'+ids[1] : '') ).fadeTo('fast', 0, function(){ + $('dd#cart_block_combination_of_' + ids[0] + (ids[1] ? '_'+ids[1] : '') ).fadeTo('fast', 0, function(){ $(this).slideUp('fast', function(){ $(this).remove(); }); }); } - }); + } - }); }, hideOldProductCustomizations : function (product, domIdProduct) { - $(['left_column', 'right_column']).each(function(id, parentId) + var customizationList = $('#cart_block #cart_block_list ul#customization_' + product['id'] + '_' + product['idCombination']); + if(customizationList.length > 0) { - var customizationList = $('#'+parentId+' #cart_block #cart_block_list ul#customization_' + product['id'] + '_' + product['idCombination']); - if(customizationList.length > 0) - { - $(customizationList).find("li").each(function(){ - $(this).find("div").each(function() { - var customizationDiv = $(this).attr('id'); - var tmp = customizationDiv.replace('deleteCustomizableProduct_', ''); - var ids = tmp.split('_'); - if ((parseInt(product.idCombination) == parseInt(ids[2])) && !ajaxCart.doesCustomizationStillExist(product, ids[0])) - $('#' + customizationDiv).parent().addClass('strike').fadeTo('slow', 0, function(){ - $(this).slideUp('slow'); - $(this).remove(); - }); - }); + $(customizationList).find("li").each(function(){ + $(this).find("div").each(function() { + var customizationDiv = $(this).attr('id'); + var tmp = customizationDiv.replace('deleteCustomizableProduct_', ''); + var ids = tmp.split('_'); + if ((parseInt(product.idCombination) == parseInt(ids[2])) && !ajaxCart.doesCustomizationStillExist(product, ids[0])) + $('#' + customizationDiv).parent().addClass('strike').fadeTo('slow', 0, function(){ + $(this).slideUp('slow'); + $(this).remove(); + }); }); - } - var removeLinks = $('#'+parentId+' #cart_block_product_' + domIdProduct).find('a.ajax_cart_block_remove_link'); - if (!product.hasCustomizedDatas && !removeLinks.length) - $('#'+parentId+' #' + domIdProduct + ' span.remove_link').html(' '); - }); + }); + } + var removeLinks = $('#cart_block_product_' + domIdProduct).find('a.ajax_cart_block_remove_link'); + if (!product.hasCustomizedDatas && !removeLinks.length) + $('#' + domIdProduct + ' span.remove_link').html(' '); }, doesCustomizationStillExist : function (product, customizationId) @@ -399,9 +393,7 @@ var ajaxCart = { // Update product quantity updateProductQuantity : function (product, quantity) { - $(['left_column', 'right_column']).each(function(id, parentId) - { - $('#'+parentId+' dt#cart_block_product_' + product.id + (product.idCombination ? '_' + product.idCombination : '') + ' .quantity').fadeTo('fast', 0, function() { + $('dt#cart_block_product_' + product.id + (product.idCombination ? '_' + product.idCombination : '') + ' .quantity').fadeTo('fast', 0, function() { $(this).text(quantity); $(this).fadeTo('fast', 1, function(){ $(this).fadeTo('fast', 0, function(){ @@ -413,29 +405,27 @@ var ajaxCart = { }); }); }); - }); }, //display the products witch are in json data but not already displayed displayNewProducts : function(jsonData) { - $(['left_column', 'right_column']).each(function(id, parentId) - { + //add every new products or update displaying of every updated products $(jsonData.products).each(function(){ //fix ie6 bug (one more item 'undefined' in IE6) if (this.id != undefined) { //create a container for listing the products and hide the 'no product in the cart' message (only if the cart was empty) - if ($('#'+parentId+' div#cart_block dl.products').length == 0) - $('#'+parentId+' p#cart_block_no_products').fadeTo('fast', 0, function(){ - $(this).slideUp('fast').fadeTo(0, 1); - }).before('
'); - + if ($('div#cart_block dl.products').length == 0) + { + $('p#cart_block_no_products').before('
'); + $('p#cart_block_no_products').hide(); + } //if product is not in the displayed cart, add a new product's line var domIdProduct = this.id + (this.idCombination ? '_' + this.idCombination : ''); var domIdProductAttribute = this.id + '_' + (this.idCombination ? this.idCombination : '0'); - if($('#'+parentId+' #cart_block dt#cart_block_product_'+ domIdProduct ).length == 0) + if($('#cart_block dt#cart_block_product_'+ domIdProduct ).length == 0) { var productId = parseInt(this.id); var productAttributeId = (this.hasAttributes ? parseInt(this.attributes) : 0); @@ -451,53 +441,51 @@ var ajaxCart = { if (this.hasCustomizedDatas) content += ajaxCart.displayNewCustomizedDatas(this); if (this.hasAttributes) content += ''; - $('#'+parentId+' #cart_block dl.products').append(content); + + $('#cart_block dl.products').append(content); } //else update the product's line else{ var jsonProduct = this; - if($('#'+parentId+' dt#cart_block_product_' + domIdProduct + ' .quantity').text() != jsonProduct.quantity || $('dt#cart_block_product_' + domIdProduct + ' .price').text() != jsonProduct.priceByLine) + if($('dt#cart_block_product_' + domIdProduct + ' .quantity').text() != jsonProduct.quantity || $('dt#cart_block_product_' + domIdProduct + ' .price').text() != jsonProduct.priceByLine) { // Usual product - $('#'+parentId+' dt#cart_block_product_' + domIdProduct + ' .price').text(jsonProduct.priceByLine); + $('dt#cart_block_product_' + domIdProduct + ' .price').text(jsonProduct.priceByLine); ajaxCart.updateProductQuantity(jsonProduct, jsonProduct.quantity); // Customized product if (jsonProduct.hasCustomizedDatas) { customizationFormatedDatas = ajaxCart.displayNewCustomizedDatas(jsonProduct); - if (!$('#'+parentId+' #cart_block ul#customization_' + domIdProductAttribute).length) + if (!$('#cart_block ul#customization_' + domIdProductAttribute).length) { if (jsonProduct.hasAttributes) - $('#'+parentId+' #cart_block dd#cart_block_combination_of_' + domIdProduct).append(customizationFormatedDatas); + $('#cart_block dd#cart_block_combination_of_' + domIdProduct).append(customizationFormatedDatas); else - $('#'+parentId+' #cart_block dl.products').append(customizationFormatedDatas); + $('#cart_block dl.products').append(customizationFormatedDatas); } else - $('#'+parentId+' #cart_block ul#customization_' + domIdProductAttribute).append(customizationFormatedDatas); + $('#cart_block ul#customization_' + domIdProductAttribute).append(customizationFormatedDatas); } } } - $('#'+parentId+' #cart_block dl.products .hidden').slideDown('slow').removeClass('hidden'); + $('#cart_block dl.products .hidden').slideDown('slow').removeClass('hidden'); - var removeLinks = $('#'+parentId+' #cart_block_product_' + domIdProduct).find('a.ajax_cart_block_remove_link'); + var removeLinks = $('#cart_block_product_' + domIdProduct).find('a.ajax_cart_block_remove_link'); if (this.hasCustomizedDatas && removeLinks.length) $(removeLinks).each(function() { $(this).remove(); }); } }); - }); }, displayNewCustomizedDatas : function(product) { - $(['left_column', 'right_column']).each(function(id, parentId) - { var content = ''; var productId = parseInt(product.id); var productAttributeId = typeof(product.idCombination) == 'undefined' ? 0 : parseInt(product.idCombination); - var hasAlreadyCustomizations = $('#'+parentId+' #cart_block ul#customization_' + productId + '_' + productAttributeId).length; + var hasAlreadyCustomizations = $('#cart_block ul#customization_' + productId + '_' + productAttributeId).length; if (!hasAlreadyCustomizations) { @@ -510,7 +498,7 @@ var ajaxCart = { customizationId = parseInt(this.customizationId); productAttributeId = typeof(product.idCombination) == 'undefined' ? 0 : parseInt(product.idCombination); // If the customization is already displayed on the cart, no update's needed - if($('#'+parentId+' #cart_block').find("div[id^=deleteCustomizableProduct_" + customizationId + "_]").length) + if($('#cart_block').find("div[id^=deleteCustomizableProduct_" + customizationId + "_]").length) return (''); content += '
  • ' + parseInt(this.quantity) + 'x'; @@ -536,8 +524,8 @@ var ajaxCart = { // Field cleaning if (customizationId) { - $('#'+parentId+' #uploadable_files li div.customizationUploadBrowse img').remove(); - $('#'+parentId+' #text_fields li input').attr('value', ''); + $('#uploadable_files li div.customizationUploadBrowse img').remove(); + $('#text_fields li input').attr('value', ''); } }); @@ -547,7 +535,6 @@ var ajaxCart = { if (!product.hasAttributes) content += ''; } return (content); - }); }, @@ -571,13 +558,10 @@ var ajaxCart = { ajaxCart.refreshVouchers(jsonData); //update 'first' and 'last' item classes - $(['left_column', 'right_column']).each(function(id, parentId) - { - $('#'+parentId+' #cart_block dl.products dt').removeClass('first_item').removeClass('last_item').removeClass('item'); - $('#'+parentId+' #cart_block dl.products dt:first').addClass('first_item'); - $('#'+parentId+' #cart_block dl.products dt:not(:first,:last)').addClass('item'); - $('#'+parentId+' #cart_block dl.products dt:last').addClass('last_item'); - }); + $('#cart_block dl.products dt').removeClass('first_item').removeClass('last_item').removeClass('item'); + $('#cart_block dl.products dt:first').addClass('first_item'); + $('#cart_block dl.products dt:not(:first,:last)').addClass('item'); + $('#cart_block dl.products dt:last').addClass('last_item'); //reset the onlick events in relation to the cart block (it allow to bind the onclick event to the new 'delete' buttons added) ajaxCart.overrideButtonsInThePage(); @@ -630,9 +614,9 @@ var ajaxCart = { } }; + //when document is loaded... $(document).ready(function(){ - // expand/collapse management $('#block_cart_collapse').click(function(){ ajaxCart.collapse(); @@ -642,5 +626,14 @@ $(document).ready(function(){ }); ajaxCart.overrideButtonsInThePage(); ajaxCart.refresh(); + + /* roll over cart */ + $("#shopping_cart").mouseenter(function(){ + $("#cart_block").stop(true, true).slideDown(450); + }); + + $("#cart_block").mouseleave(function(){ + $(this).stop(true, true).slideUp(450); + }); }); diff --git a/modules/blockcart/blockcart.css b/modules/blockcart/blockcart.css new file mode 100644 index 000000000..341139b2b --- /dev/null +++ b/modules/blockcart/blockcart.css @@ -0,0 +1,97 @@ +/* Special style for block cart*/ +#cart_block { + z-index: 10; + display:none; + position: absolute; + right: 0; + top: 65px; + height: auto; + width: 200px; + -moz-border-radius-bottomright: 3px; + -moz-border-radius-bottomleft: 3px; + -webkit-border-radius-bottomright: 3px; + -webkit-border-radius-bottomleft: 3px; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; + box-shadow: 0 1px 0 #C6C6C6; + background:#eee +} +#cart_block.cart_block_hover {display:block} +#cart_block h4 { + display:none; + padding-left:36px; + background:url(img/pict_cart_block_h4.png) no-repeat 5px 0 +} +#cart_block h4 span { + float: right; + padding-left: 10px; + text-transform: none; + background-position: left top; + background-repeat: no-repeat; + cursor: pointer +} +#cart_block h4 span#block_cart_collapse {background-image: url(img/icon/sort_asc_white.png) } +#cart_block h4 span#block_cart_expand {background-image: url(img/icon/sort_desc_white.png) } + +#cart_block .block_content {padding:8px 8px 16px 8px;} + +#cart_block #cart_block_summary {display:none} +#cart_block .quantity-formated { + display:inline-block; + margin-right:5px; + width:15px +} +#cart_block .cart_block_product_name {font-weight:bold} +#cart_block .remove_link { + float:right; + display:inline-block; + margin:1px 0 0 5px; + height:12px; + width:12px +} +#cart_block .remove_link a { + display:inline-block; + height:12px; + width:12px; + background: url(img/icon/delete.gif) no-repeat 0 0 +} +#cart_block .price { + float:right +} + +#cart_block #cart_block_list dl { + padding-bottom:10px +} +#cart_block #cart_block_list dt {padding:4px 0} +#cart_block #cart_block_list dt a {font-weight:bold} +#cart_block #cart_block_list dd { + display:none; + margin-left:20px +} + +#cart_block #cart-prices { + padding:10px 4px; + line-height:20px; + font-weight:bold; + border-top:1px solid #999 +} +#cart_block #cart_block_shipping_cost, +#cart_block #cart_block_total { + float:right +} +#cart_block #cart_block_shipping_cost {font-weight:normal} + +#cart_block #cart-buttons .button_small {display:none;} +#cart_block #cart-buttons #button_order_cart { + float:right; + padding-left:20px +} +#cart_block #cart-buttons #button_order_cart span { + position:absolute; + top:-1px; + left:-12px; + display:block; + height:26px; + width:26px; + background:url(img/icon/pict_add_cart.png) no-repeat 0 0 +} diff --git a/modules/blockcart/blockcart.php b/modules/blockcart/blockcart.php index b2e6a9994..e41bbbca0 100644 --- a/modules/blockcart/blockcart.php +++ b/modules/blockcart/blockcart.php @@ -93,6 +93,7 @@ class BlockCart extends Module 'wrapping_cost' => Tools::displayPrice($wrappingCost, $currency), 'product_total' => Tools::displayPrice($params['cart']->getOrderTotal($useTax, Cart::BOTH_WITHOUT_SHIPPING), $currency), 'total' => Tools::displayPrice($totalToPay, $currency), + 'id_carrier' => (int)($params['cart']->id_carrier), 'order_process' => Configuration::get('PS_ORDER_PROCESS_TYPE') ? 'order-opc' : 'order', 'ajax_allowed' => (int)(Configuration::get('PS_BLOCK_CART_AJAX')) == 1 ? true : false )); diff --git a/modules/blockcart/blockcart.tpl b/modules/blockcart/blockcart.tpl index 1eb137d92..c59cd407a 100644 --- a/modules/blockcart/blockcart.tpl +++ b/modules/blockcart/blockcart.tpl @@ -19,7 +19,7 @@ * * @author PrestaShop SA * @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 7465 $ +* @version Release: $Revision: 6594 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} @@ -62,18 +62,18 @@ var removingLinkText = '{l s='remove this product from my cart' mod='blockcart' {assign var='productAttributeId' value=$product.id_product_attribute}
    {$product.cart_quantity}x - + {$product.name|truncate:13:'...'|escape:html:'UTF-8'} {if !isset($blockcart_customizedDatas.$productId.$productAttributeId)} {/if} {if $priceDisplay == $smarty.const.PS_TAX_EXC}{displayWtPrice p="`$product.total`"}{else}{displayWtPrice p="`$product.total_wt`"}{/if}
    {if isset($product.attributes_small)}
    - {$product.attributes_small} + {$product.attributes_small} {/if} - {if isset($blockcart_customizedDatas.$productId.$productAttributeId)} + {if isset($customizedDatas.$productId.$productAttributeId)} {if !isset($product.attributes_small)}
    {/if}
      {foreach from=$blockcart_customizedDatas.$productId.$productAttributeId[$product.id_address_delivery] key='id_customization' item='customization' name='customizations'} @@ -103,7 +103,7 @@ var removingLinkText = '{l s='remove this product from my cart' mod='blockcart' {$discount.name|cat:' : '|cat:$discount.description|truncate:18:'...'|escape:'htmlall':'UTF-8'} -{if $discount.value_real != '!'}{if $priceDisplay == 1}{convertPrice price=$discount.value_tax_exc}{else}{convertPrice price=$discount.value_real}{/if}{/if} - {l s='Delete'} + {l s='Delete'} {/foreach} @@ -141,11 +141,8 @@ var removingLinkText = '{l s='remove this product from my cart' mod='blockcart' {/if} {/if}

      - {capture name=step_order_process} - {if $blockcart_order_process == 'order'}step=1{/if} - {/capture} - {if $blockcart_order_process == 'order'}{l s='Cart' mod='blockcart'}{/if} - {l s='Check out' mod='blockcart'} + {if $blockcart_order_process == 'order'}{l s='Cart' mod='blockcart'}{/if} + {l s='Check out' mod='blockcart'}

      diff --git a/modules/blockcategories/blockcategories.css b/modules/blockcategories/blockcategories.css new file mode 100644 index 000000000..13ada2a88 --- /dev/null +++ b/modules/blockcategories/blockcategories.css @@ -0,0 +1,34 @@ +#categories_block_left li {border-bottom:1px dotted #ccc} + #categories_block_left li.last { border:none;} + #categories_block_left li a { + display:block; + padding:7px 11px 5px 22px; + color:#333; + background:url(img/arrow_right_2.png) no-repeat 10px 10px transparent + } + + #categories_block_left li ul {margin-left:40px} + #categories_block_left li ul li {border:none} + #categories_block_left li ul li a { + padding-left:0; + background:none + } + +#categories_block_left li .OPEN, +#categories_block_left li .CLOSE { + display:block; + float:right; + margin:10px 10px 0; + height:9px; + width:9px; + background:url(img/icon/open-close.png) no-repeat 0 -9px; + cursor:pointer +} +#categories_block_left li .CLOSE {background-position:0 0} + + +/* footer */ +.blockcategories_footer { + padding:15px 10px; +} +.blockcategories_footer ul ul {display:none !important} diff --git a/modules/blockcategories/blockcategories.php b/modules/blockcategories/blockcategories.php index c0329b5c6..2baf16bee 100644 --- a/modules/blockcategories/blockcategories.php +++ b/modules/blockcategories/blockcategories.php @@ -87,7 +87,7 @@ class BlockCategories extends Module Configuration::updateValue('BLOCK_CATEG_NBR_COLUMN_FOOTER', $nbrColumns); Configuration::updateValue('BLOCK_CATEG_SORT_WAY', Tools::getValue('BLOCK_CATEG_SORT_WAY')); Configuration::updateValue('BLOCK_CATEG_SORT', Tools::getValue('BLOCK_CATEG_SORT')); - + $this->_clearBlockcategoriesCache(); $output .= '
      '.$this->l('Confirmation').''.$this->l('Settings updated').'
      '; } @@ -121,7 +121,7 @@ class BlockCategories extends Module - - + -
       
       
      -
      - -
      +
      - '; +
       
      +
      + Addons + '.$this->l('This module has been developped by PrestaShop and can only be sold through').' addons.prestashop.com.
      + '.$this->l('Please report all bugs to').' addons@prestashop.com '.$this->l('or using our').' '.$this->l('contact form').'. +
      '; + } + + public function hookHeader() + { + $this->context->controller->addCSS(($this->_path).'blockcontact.css', 'all'); } public function hookRightColumn() @@ -92,4 +100,4 @@ class blockcontact extends Module return $this->display(__FILE__, 'blockcontact.tpl'); } } -?> +?> \ No newline at end of file diff --git a/modules/blockcontact/img/bloc_contact_a_bg.png b/modules/blockcontact/img/bloc_contact_a_bg.png new file mode 100644 index 000000000..0f18fb3ba Binary files /dev/null and b/modules/blockcontact/img/bloc_contact_a_bg.png differ diff --git a/modules/blockcontact/img/block_contact_bg.jpg b/modules/blockcontact/img/block_contact_bg.jpg new file mode 100644 index 000000000..b442bc1df Binary files /dev/null and b/modules/blockcontact/img/block_contact_bg.jpg differ diff --git a/modules/blockcontact/img/block_contact_pict_tel.png b/modules/blockcontact/img/block_contact_pict_tel.png new file mode 100644 index 000000000..557b02212 Binary files /dev/null and b/modules/blockcontact/img/block_contact_pict_tel.png differ diff --git a/modules/blockcontactinfos/blockcontactinfos.css b/modules/blockcontactinfos/blockcontactinfos.css new file mode 100644 index 000000000..989c0f8bd --- /dev/null +++ b/modules/blockcontactinfos/blockcontactinfos.css @@ -0,0 +1,10 @@ +#block_contact_infos {padding:15px 10px;} +#block_contact_infos li { + padding:0; + line-height: 20px; +} +#block_contact_infos li strong { + font-weight:normal; + font-size:13px; +} +#block_contact_infos li pre {font: 11px/20px Arial,Verdana,sans-serif;} diff --git a/modules/blockcontactinfos/blockcontactinfos.php b/modules/blockcontactinfos/blockcontactinfos.php index b201e3f11..b49a160ba 100644 --- a/modules/blockcontactinfos/blockcontactinfos.php +++ b/modules/blockcontactinfos/blockcontactinfos.php @@ -1,13 +1,13 @@ -* @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 6844 $ -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* @author Prestashop SA +* @copyright 2007-2010 Prestashop SA +* @version Release: $Revision: 1.4 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ @@ -50,7 +50,8 @@ class blockcontactinfos extends Module return (parent::install() AND Configuration::updateValue('blockcontactinfos_company', Configuration::get('PS_SHOP_NAME')) AND Configuration::updateValue('blockcontactinfos_address', '') AND Configuration::updateValue('blockcontactinfos_phone', '') - AND Configuration::updateValue('blockcontactinfos_email', Configuration::get('PS_SHOP_EMAIL')) AND $this->registerHook('footer')); + AND Configuration::updateValue('blockcontactinfos_email', Configuration::get('PS_SHOP_EMAIL')) + AND $this->registerHook('header') AND $this->registerHook('footer')); } public function uninstall() @@ -77,34 +78,43 @@ class blockcontactinfos extends Module $content = '

      '.$this->displayName.'

      -
      +

      -

      +

      -
      - -
      +
       
      +
      - '; +
       
      +
      + Addons + '.$this->l('This module has been developped by PrestaShop and can only be sold through').' addons.prestashop.com.
      + '.$this->l('Please report all bugs to').' addons@prestashop.com '.$this->l('or using our').' '.$this->l('contact form').'. +
      '; return $content; } + public function hookHeader() + { + $this->context->controller->addCSS(($this->_path).'blockcontactinfos.css', 'all'); + } + public function hookFooter($params) { global $smarty; $smarty->assign(array( - 'company' => Configuration::get('blockcontactinfos_company'), - 'address' => Configuration::get('blockcontactinfos_address'), - 'phone' => Configuration::get('blockcontactinfos_phone'), - 'email' => Configuration::get('blockcontactinfos_email') + 'blockcontactinfos_company' => Configuration::get('blockcontactinfos_company'), + 'blockcontactinfos_address' => Configuration::get('blockcontactinfos_address'), + 'blockcontactinfos_phone' => Configuration::get('blockcontactinfos_phone'), + 'blockcontactinfos_email' => Configuration::get('blockcontactinfos_email') )); return $this->display(__FILE__, 'blockcontactinfos.tpl'); } diff --git a/modules/blockcontactinfos/blockcontactinfos.tpl b/modules/blockcontactinfos/blockcontactinfos.tpl index 7a7b269f1..d91fc5686 100644 --- a/modules/blockcontactinfos/blockcontactinfos.tpl +++ b/modules/blockcontactinfos/blockcontactinfos.tpl @@ -28,10 +28,10 @@

      {l s='Contact us' mod='blockcontactinfos'}

        - {if $company != ''}
      • {$company}
      • {/if} - {if $address != ''}
      • {$address}
      • {/if} - {if $phone != ''}
      • {l s='Tel:'} {$phone}
      • {/if} - {if $email != ''}
      • {l s='Email:'} {$email}
      • {/if} + {if $blockcontactinfos_company != ''}
      • {$blockcontactinfos_company}
      • {/if} + {if $blockcontactinfos_address != ''}
      • {$blockcontactinfos_address}
      • {/if} + {if $blockcontactinfos_phone != ''}
      • {l s='Tel:'} {$blockcontactinfos_phone}
      • {/if} + {if $blockcontactinfos_email != ''}
      • {l s='Email:'} {mailto address=$blockcontactinfos_email encode="hex"}
      • {/if}
      - \ No newline at end of file + diff --git a/modules/blockcurrencies/blockcurrencies.css b/modules/blockcurrencies/blockcurrencies.css new file mode 100644 index 000000000..ec88409b7 --- /dev/null +++ b/modules/blockcurrencies/blockcurrencies.css @@ -0,0 +1,59 @@ +/* block top currencies */ +#header_right #currencies_block_top { + float:right; + margin: 0 6px 0 0; + padding: 2px 6px; + -moz-border-radius-bottomright: 3px; + -moz-border-radius-bottomleft: 3px; + -webkit-border-radius-bottomright: 3px; + -webkit-border-radius-bottomleft: 3px; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; + background: none repeat scroll 0 0 #000; +} +#header_right #currencies_block_top p { + clear: left; + padding-right:16px; + font: 11px Arial,Verdana,sans-serif; + color: #ccc; + text-align: right; + background: url("img/block_languages_top_p_bg.png") no-repeat scroll right 1px transparent; +} +#currencies_block_top ul#first-currencies li { + margin-right: 3px +} +#currencies_block_top ul#first-currencies li.selected { + opacity: 1 !important; +} +/*languages with jquery*/ +#setCurrency { + cursor: pointer; + position: relative; + top: 1px; +} +#setCurrency p { + position: relative; + top: 0; + margin-left: 5px; + padding: 0; +} +#setCurrency p img { + padding-left: 5px; +} +#setCurrency .currencies_ul{ + display:none; + z-index: 10000; + padding:10px; + list-style-type:none; +} +#setCurrency .currencies_ul_hover{ + display:block; + z-index: 5000; + position:absolute; + right:3px; + padding:5px 10px; + height:auto; + width:10px; + background:#000000; +} +#setCurrency .currencies_ul_hover a {color:#fff;} diff --git a/modules/blockcurrencies/blockcurrencies.php b/modules/blockcurrencies/blockcurrencies.php index d8fa111fc..eab88cace 100644 --- a/modules/blockcurrencies/blockcurrencies.php +++ b/modules/blockcurrencies/blockcurrencies.php @@ -62,7 +62,7 @@ class BlockCurrencies extends Module if (!count(Currency::getCurrencies())) return ''; - + $this->context->smarty->assign('blockcurrencies_sign', $this->context->currency->sign); return $this->display(__FILE__, 'blockcurrencies.tpl'); } diff --git a/modules/blockcurrencies/blockcurrencies.tpl b/modules/blockcurrencies/blockcurrencies.tpl index b64f93536..1045ecd6d 100644 --- a/modules/blockcurrencies/blockcurrencies.tpl +++ b/modules/blockcurrencies/blockcurrencies.tpl @@ -1,5 +1,5 @@ {* -* 2007-2011 PrestaShop +* 2007-2011 PrestaShop * * NOTICE OF LICENSE * @@ -19,26 +19,46 @@ * * @author PrestaShop SA * @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 6844 $ +* @version Release: $Revision: 6594 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} + +
      -
        +

        + + + {l s='Currency' mod='blockcurrencies'} : {$blockcurrencies_sign} +

        +
          {foreach from=$currencies key=k item=f_currency}
        • id_currency == $f_currency.id_currency}class="selected"{/if}> {$f_currency.sign}
        • {/foreach}
        -

        - - - {l s='Currency' mod='blockcurrencies'} -

      - \ No newline at end of file + diff --git a/modules/blockcurrencies/img/block_languages_top_p_bg.png b/modules/blockcurrencies/img/block_languages_top_p_bg.png new file mode 100644 index 000000000..8f6d152a5 Binary files /dev/null and b/modules/blockcurrencies/img/block_languages_top_p_bg.png differ diff --git a/modules/blockcustomerprivacy/blockcustomerprivacy.php b/modules/blockcustomerprivacy/blockcustomerprivacy.php index 321ebeaf3..eb037bf1a 100644 --- a/modules/blockcustomerprivacy/blockcustomerprivacy.php +++ b/modules/blockcustomerprivacy/blockcustomerprivacy.php @@ -1,13 +1,13 @@ -* @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 6844 $ -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* @author Prestashop SA +* @copyright 2007-2010 Prestashop SA +* @version Release: $Revision: 1.4 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ diff --git a/modules/blockcustomerprivacy/blockcustomerprivacy.tpl b/modules/blockcustomerprivacy/blockcustomerprivacy.tpl index 9a5bd472a..959222ca8 100644 --- a/modules/blockcustomerprivacy/blockcustomerprivacy.tpl +++ b/modules/blockcustomerprivacy/blockcustomerprivacy.tpl @@ -56,5 +56,5 @@

      - +
      \ No newline at end of file diff --git a/modules/blocklanguages/blocklanguages.css b/modules/blocklanguages/blocklanguages.css new file mode 100644 index 000000000..2bf7f7787 --- /dev/null +++ b/modules/blocklanguages/blocklanguages.css @@ -0,0 +1,58 @@ +/* block top languages */ +#header_right #languages_block_top { + float:right; + margin: 0; + padding:2px 6px 1px 6px; + -moz-border-radius-bottomright: 3px; + -moz-border-radius-bottomleft: 3px; + -webkit-border-radius-bottomright: 3px; + -webkit-border-radius-bottomleft: 3px; + border-bottom-right-radius: 3px; + border-bottom-left-radius: 3px; + background: none repeat scroll 0 0 #000; +} +#header_right #languages_block_top p { + clear: left; + padding-right:20px; + font: 11px Arial,Verdana,sans-serif; + color: #ccc; + text-align: right; + background: url("img/block_languages_top_p_bg.png") no-repeat scroll right 1px transparent; +} +#languages_block_top ul#first-languages li { + float: left; + margin-right: 3px +} +#languages_block_top ul#first-languages li.selected_language { + float: left; +} +/*languages with jquery*/ +#countries { + cursor: pointer; + position: relative; + top: 1px; +} +#countries p { + position: relative; + top: 0; + padding: 0; +} +#countries p img { + padding-left: 5px; +} +#countries .countries_ul{ + display:none; + z-index: 10000; + padding:10px; + list-style-type:none; +} +#countries .countries_ul_hover{ + display:block; + z-index: 5000; + position:absolute; + right:6px; + padding:5px 10px; + height:auto; + width:20px; + background:#000000; +} diff --git a/modules/blocklanguages/blocklanguages.tpl b/modules/blocklanguages/blocklanguages.tpl index c551191f6..76921b247 100644 --- a/modules/blocklanguages/blocklanguages.tpl +++ b/modules/blocklanguages/blocklanguages.tpl @@ -19,40 +19,66 @@ * * @author PrestaShop SA * @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 6844 $ +* @version Release: $Revision: 6594 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *}
      - +
      + - diff --git a/modules/blocklanguages/img/block_languages_top_p_bg.png b/modules/blocklanguages/img/block_languages_top_p_bg.png new file mode 100644 index 000000000..8f6d152a5 Binary files /dev/null and b/modules/blocklanguages/img/block_languages_top_p_bg.png differ diff --git a/modules/blocklayered/blocklayered.css b/modules/blocklayered/blocklayered.css index 1ba014980..0286ed87c 100644 --- a/modules/blocklayered/blocklayered.css +++ b/modules/blocklayered/blocklayered.css @@ -1,29 +1,56 @@ +/* Bloc layered */ +#enabled_filters { + margin:5px 0 10px 0; + padding:5px; + background:#eee +} +#enabled_filters .layered_subtitle { + font-weight:bold; + font-size:12px +} +#enabled_filters ul li {padding:2px 0} +#enabled_filters li a.del { + float: right; + display: inline-block; + height: 12px; + width: 12px; + text-indent:-5000px; + background:url(../../../img/icon/delete.gif) no-repeat 0 0 transparent; + cursor:pointer +} + +.blockfilter {margin:5px 0} +.blockfilter .layered_close { + float: right; + display: inline-block; + height: 12px; + width: 12px; + text-indent:-5000px; + background:url(../../../img/icon/delete.gif) no-repeat 0 0 transparent; + cursor:pointer +} +.blockfilter .layered_subtitle { + display: inline-block; + font-weight: bold; + font-size: 12px; +} +.blockfilter ul { + clear:both; + padding:5px 0; + border-bottom:1px dotted #ccc +} +.blockfilter ul li {padding:2px 0} +.blockfilter ul li label {cursor: pointer;} + + + +/* #layered_block_left div.block_content { padding: 6px; } #layered_block_left ul { padding-left: 0; - max-height: 120px; - overflow-y: auto; - overflow-x: hidden; - padding-left: 1px; - padding-right: 1px; -} - -#layered_form > div > div { - border-bottom: 1px dotted #CCCCCC; - padding-bottom: 5px; - margin-bottom: 5px; -} - -#layered_block_left .hide-action { - display: block; - text-align: right; - padding-right: 5px; -} -#layered_block_left .hide-action:hover { - text-decoration: underline; } #layered_block_left ul li { @@ -32,9 +59,11 @@ list-style-type: none; } -#layered_block_left #enabled_filters , #layered_url_filter_block { +#layered_block_left #enabled_filters , #layered_url_filter_block{ font-size: 10px; - padding-bottom: 5px; + padding-bottom: 10px; + margin-bottom: 5px; + border-bottom: 1px dotted #CCC; } #layered_block_left #enabled_filters ul li { @@ -57,31 +86,7 @@ color: #FFF; } -#layered_block_left ul li label { - cursor: pointer; -} -#layered_block_left ul li.nomargin { - margin-left: 0; -} - -#layered_block_left span.layered_subtitle { - float: left; - font-weight: bold; - font-size: 12px; - display: block; - margin-bottom: 4px; -} - -#layered_block_left span.layered_close a { text-decoration: none; } - -#layered_block_left span.layered_close { - float: right; - font-weight: bold; - font-size: 12px; - display: block; - margin-bottom: 4px; -} #layered_block_left ul li input.checkbox { vertical-align: middle; @@ -91,30 +96,4 @@ #layered_block_left ul li .disabled { color: #666; } -#product_list .warning { - margin-top: 13px; -} - -#layered_form .select { - width: 165px; -} -#layered_form .color-option { - margin-left: 0; - width: 16px; - height: 16px; - padding:0; - border: 1px solid #666; -} -#layered_form .color-option.on { - border: 1px solid red; -} -#layered_form input[type=radio] { - margin-left: 2px; - vertical-align: middle; -} -.layered_price_range { - margin-left: 7px; -} -.layered_price_range_unit { - margin-right: 7px; -} \ No newline at end of file +*/ \ No newline at end of file diff --git a/modules/blockmanufacturer/blockmanufacturer.css b/modules/blockmanufacturer/blockmanufacturer.css new file mode 100644 index 000000000..ebc00d87e --- /dev/null +++ b/modules/blockmanufacturer/blockmanufacturer.css @@ -0,0 +1,16 @@ +/* Block manufacturer */ +.blockmanufacturer li {border-bottom:1px dotted #ccc} +.blockmanufacturer li.last { border:none;} + .blockmanufacturer li a { + display:block; + padding:7px 11px 5px 22px; + color:#333; + background:url(img/arrow_right_2.png) no-repeat 10px 10px transparent + } + + +.blockmanufacturer form {margin-top:10px;} +.blockmanufacturer p { + padding:0; + text-align:center +} diff --git a/modules/blockmanufacturer/img/arrow_right_2.png b/modules/blockmanufacturer/img/arrow_right_2.png new file mode 100644 index 000000000..c970f18ef Binary files /dev/null and b/modules/blockmanufacturer/img/arrow_right_2.png differ diff --git a/modules/blockmyaccountfooter/blockmyaccount.css b/modules/blockmyaccountfooter/blockmyaccount.css new file mode 100644 index 000000000..629d30995 --- /dev/null +++ b/modules/blockmyaccountfooter/blockmyaccount.css @@ -0,0 +1,33 @@ +/* block myaccount */ +.myaccount ul {margin-bottom:10px} +.myaccount li {border-bottom: 1px solid #eee} +.myaccount li a { + display: block; + padding: 7px 11px 5px 22px; + color: #333; +} +.myaccount p.logout { + padding-bottom:0; + font-weight:bold; + text-align:right +} + + +/* block myaccount in footer */ +#footer .myaccount {padding:15px 10px;} +#footer .myaccount h4 {background: none;} +#footer .myaccount .logout {display:none;} +#footer .myaccount h4 { + padding:0 0 10px 0; + background:#333 +} +#footer .myaccount ul {margin-bottom:0} +#footer .myaccount li {border-bottom:none} +#footer .myaccount li a { + display: block; + padding:0; + color: #fff; + background: none +} +#footer .myaccount li.lnk_wishlist img {display:none +} \ No newline at end of file diff --git a/modules/blockmyaccountfooter/blockmyaccountfooter.php b/modules/blockmyaccountfooter/blockmyaccountfooter.php new file mode 100644 index 000000000..bb5d6b8f5 --- /dev/null +++ b/modules/blockmyaccountfooter/blockmyaccountfooter.php @@ -0,0 +1,105 @@ + +* @copyright 2007-2011 PrestaShop SA +* @version Release: $Revision$ +* @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 blockmyaccountfooter extends Module +{ + public function __construct() + { + $this->name = 'blockmyaccountfooter'; + $this->tab = 'front_office_features'; + $this->version = '1.2'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; + + parent::__construct(); + + $this->displayName = $this->l('My Account block on footer'); + $this->description = $this->l('Displays a block with links relative to user account.'); + } + + public function install() + { + if (!$this->addMyAccountBlockHook() OR !parent::install() OR !$this->registerHook('footer') OR !$this->registerHook('header')) + return false; + return true; + } + + public function uninstall() + { + return (parent::uninstall() AND $this->removeMyAccountBlockHook()); + } + + public function hookLeftColumn($params) + { + global $smarty; + + if (!$params['cookie']->isLogged()) + return false; + $smarty->assign(array( + 'voucherAllowed' => (int)(Configuration::get('PS_VOUCHERS')), + 'returnAllowed' => (int)(Configuration::get('PS_ORDER_RETURN')), + 'HOOK_BLOCK_MY_ACCOUNT' => Hook::exec('myAccountBlock') + )); + return $this->display(__FILE__, $this->name.'.tpl'); + } + + public function hookRightColumn($params) + { + return $this->hookLeftColumn($params); + } + + private function addMyAccountBlockHook() + { + return Db::getInstance()->Execute('INSERT INTO `'._DB_PREFIX_.'hook` (`name`, `title`, `description`, `position`) VALUES (\'myAccountBlockfooter\', \'My account block\', \'Display extra informations inside the "my account" block\', 1)'); + } + + private function removeMyAccountBlockHook() + { + return Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'hook` WHERE `name` = \'myAccountBlockfooter\''); + } + function hookHeader($params) + { + $this->context->controller->addCSS(($this->_path).'blockmyaccount.css', 'all'); + } + function hookFooter($params) + { + global $smarty; + + $smarty->assign(array( + 'voucherAllowed' => (int)(Configuration::get('PS_VOUCHERS')), + 'returnAllowed' => (int)(Configuration::get('PS_ORDER_RETURN')), + 'HOOK_BLOCK_MY_ACCOUNT' => Hook::exec('myAccountBlock') + )); + return $this->display(__FILE__, $this->name.'.tpl'); + } + +} + + diff --git a/modules/blockmyaccountfooter/blockmyaccountfooter.tpl b/modules/blockmyaccountfooter/blockmyaccountfooter.tpl new file mode 100644 index 000000000..bae89dde8 --- /dev/null +++ b/modules/blockmyaccountfooter/blockmyaccountfooter.tpl @@ -0,0 +1,43 @@ +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 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/afl-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 +* @copyright 2007-2011 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + + + \ No newline at end of file diff --git a/modules/blockmyaccountfooter/config.xml b/modules/blockmyaccountfooter/config.xml new file mode 100644 index 000000000..b327919c2 --- /dev/null +++ b/modules/blockmyaccountfooter/config.xml @@ -0,0 +1,12 @@ + + + blockmyaccountfooter + + + + + + 0 + 0 + + \ No newline at end of file diff --git a/modules/blockmyaccountfooter/index.php b/modules/blockmyaccountfooter/index.php new file mode 100644 index 000000000..4e2611d37 --- /dev/null +++ b/modules/blockmyaccountfooter/index.php @@ -0,0 +1,36 @@ + +* @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; \ No newline at end of file diff --git a/modules/blockmyaccountfooter/logo.gif b/modules/blockmyaccountfooter/logo.gif new file mode 100644 index 000000000..bd22d009b Binary files /dev/null and b/modules/blockmyaccountfooter/logo.gif differ diff --git a/modules/blocknewproducts/blocknewproducts.css b/modules/blocknewproducts/blocknewproducts.css new file mode 100644 index 000000000..14d56a4ff --- /dev/null +++ b/modules/blocknewproducts/blocknewproducts.css @@ -0,0 +1,46 @@ +/* Block new products */ +#new-products_block_right ul {list-style-type:none;} +#new-products_block_right li { + float:left; + margin-right:20px; + padding:10px 0; +} +#new-products_block_right li.first {margin-left:30px;} + +#new-products_block_right dl { + list-style-type:none; +} +#new-products_block_right dt { + padding:10px 0 0 0; + font-weight:bold; + font-size:12px; + color:#333; +} +#new-products_block_right dd, +#new-products_block_right dd a { + color:#666; +} +#new-products_block_right dd { + padding:0 0 10px 0; + border-bottom:1px dotted #ccc; + +} +#new-products_block_right dd.last_item {border:none;} +#new-products_block_right dd a.lnk_more { + padding-right: 10px; + font-weight:bold; + color:#0088cc; + background:url(img/arrow_right_1.png) no-repeat 100% 4px; +} + +#new-products_block_right p { + padding:0; + text-align:right; +} +#new-products_block_right .button_large { + padding:0; + border:none; + background:none; + color:#333; +} +#new-products_block_right .button_large:hover {text-decoration:underline} diff --git a/modules/blocknewproducts/blocknewproducts.tpl b/modules/blocknewproducts/blocknewproducts.tpl index 5063403c0..0ff1f3790 100644 --- a/modules/blocknewproducts/blocknewproducts.tpl +++ b/modules/blocknewproducts/blocknewproducts.tpl @@ -1,5 +1,5 @@ {* -* 2007-2011 PrestaShop +* 2007-2011 PrestaShop * * NOTICE OF LICENSE * @@ -19,7 +19,7 @@ * * @author PrestaShop SA * @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 7077 $ +* @version Release: $Revision: 6594 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} @@ -39,13 +39,13 @@
      {foreach from=$blocknewproducts_new_products item=newproduct name=myLoop}
      {$newproduct.name|strip_tags|escape:html:'UTF-8'}
      - {if $newproduct.description_short}
      {$newproduct.description_short|strip_tags:'UTF-8'|truncate:50:'...'} >>
      {/if} + {if $newproduct.description_short}
      {$newproduct.description_short|strip_tags:'UTF-8'|truncate:75:'...'}
      {l s='Read more'}
      {/if} {/foreach}
      -

      {l s='All new products' mod='blocknewproducts'}

      +

      » {l s='All new products' mod='blocknewproducts'}

      {else} -

      {l s='No new products at this time' mod='blocknewproducts'}

      +

      » {l s='No new products at this time' mod='blocknewproducts'}

      {/if} - + \ No newline at end of file diff --git a/modules/blocknewproducts/img/arrow_right_1.png b/modules/blocknewproducts/img/arrow_right_1.png new file mode 100644 index 000000000..7c3d29b62 Binary files /dev/null and b/modules/blocknewproducts/img/arrow_right_1.png differ diff --git a/modules/blocknewsletter/blocknewsletter.css b/modules/blocknewsletter/blocknewsletter.css new file mode 100644 index 000000000..b3ce555f2 --- /dev/null +++ b/modules/blocknewsletter/blocknewsletter.css @@ -0,0 +1,48 @@ +/* Block newsletter */ +#newsletter_block_left { + padding:7px; + border:1px solid #ccc; + background:#eee; +} +#newsletter_block_left h4 { + padding:0 0 12px 28px; + color:#666; + text-shadow:0 1px 0 #fff; + background:url(img/icon/newsletter.png) no-repeat 0 0 transparent; +} +#newsletter_block_left p {padding:0;} + +#newsletter_block_left input.inputNew { + position: relative; + top: -1px; + padding:0 5px; + height:21px; + width:150px; + border:1px solid #ccc; + border-right:none; + -moz-border-radius-topleft: 3px; + -moz-border-radius-bottomleft: 3px; + -webkit-border-radius-topleft: 3px; + -webkit-border-radius-bottomleft: 3px; + border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + font-size:10px; + color:#999; +} +*:first-child+html #newsletter_block_left input.inputNew {position:static;}/* hack ie 7 */ + +#newsletter_block_left input.button_mini { + height:23px; + width:24px; + border:0; + text-indent:-5000px; + background:url(img/bg_bt_newsletter_ok.png) no-repeat 0 0; + cursor:pointer +} +*:first-child+html #newsletter_block_left input.button_mini {padding-left:24px !important;}/* hack ie 7 */ +/*\*//*/div.madiv { +#newsletter_block_left input.button_mini { + position:relative; + top: 4px; +}/* hack ie 8 */ +}/* */ diff --git a/modules/blocknewsletter/blocknewsletter.tpl b/modules/blocknewsletter/blocknewsletter.tpl index f50922dc6..e44ee6103 100644 --- a/modules/blocknewsletter/blocknewsletter.tpl +++ b/modules/blocknewsletter/blocknewsletter.tpl @@ -19,7 +19,7 @@ * * @author PrestaShop SA * @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 7077 $ +* @version Release: $Revision: 6594 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} @@ -33,16 +33,21 @@

      {$msg}

      {/if}
      -

      + {* @todo use jquery (focusin, focusout) instead of onblur and onfocus *} + - + +

      - diff --git a/modules/blockpaymentlogo/blockpaymentlogo.css b/modules/blockpaymentlogo/blockpaymentlogo.css new file mode 100644 index 000000000..5d4c86085 --- /dev/null +++ b/modules/blockpaymentlogo/blockpaymentlogo.css @@ -0,0 +1,4 @@ +/* Block logo payment */ +.paiement_logo_block { width: 191px; text-align: center; margin-bottom: 1.5em } +.paiement_logo_block a { text-decoration: none } +.paiement_logo_block img { margin: 0 0.5em } \ No newline at end of file diff --git a/modules/blockpermanentlinks/blockpermanentlinks.css b/modules/blockpermanentlinks/blockpermanentlinks.css new file mode 100644 index 000000000..1ac57f030 --- /dev/null +++ b/modules/blockpermanentlinks/blockpermanentlinks.css @@ -0,0 +1,36 @@ +/* block top links */ +ul#header_links { + list-style-type: none; + float: right; + margin-top:5px +} +#header_links li { + float: left; + padding: 0 8px; + border-left:1px solid #333; + line-height:11px; +} +#header_links li:first-child {border:none;} +#header_links a {text-decoration: none} +#header_links a:hover {text-decoration:underline} + +/*block permanent links right and left columns*/ +.permanent_links_block li {border-bottom: 1px dotted #eee} +.permanent_links_block li a { + display: block; + padding: 7px 11px 5px 22px; + color: #333; + background:url(img/arrow_right_2.png) no-repeat 10px 10px; + +} + +/* block footer links */ +ul#footer_links{ + clear:both; + text-align: center; + padding-bottom:6px +} +ul#footer_links li{ + display: inline; + padding:0 10px +} diff --git a/modules/blockpermanentlinks/blockpermanentlinks.php b/modules/blockpermanentlinks/blockpermanentlinks.php index 8264ef098..5b1e9c9c2 100644 --- a/modules/blockpermanentlinks/blockpermanentlinks.php +++ b/modules/blockpermanentlinks/blockpermanentlinks.php @@ -55,7 +55,7 @@ class BlockPermanentLinks extends Module * @param array $params Parameters * @return string Content */ - function hookTop($params) + function hookDisplayTop($params) { return $this->display(__FILE__, 'blockpermanentlinks-header.tpl'); } @@ -75,13 +75,13 @@ class BlockPermanentLinks extends Module { return $this->hookLeftColumn($params); } - - function hookFooter($params) + + function hookDisplayFooter($params) { return $this->display(__FILE__, 'blockpermanentlinks-footer.tpl'); } - function hookHeader($params) + function hookDisplayHeader($params) { $this->context->controller->addCSS(($this->_path).'blockpermanentlinks.css', 'all'); } diff --git a/modules/blockreinsurance/blockreinsurance.php b/modules/blockreinsurance/blockreinsurance.php index 3fcfd3b30..ffdefcd58 100644 --- a/modules/blockreinsurance/blockreinsurance.php +++ b/modules/blockreinsurance/blockreinsurance.php @@ -1,13 +1,13 @@ -* @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 6844 $ -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* @author Prestashop SA +* @copyright 2007-2010 Prestashop SA +* @version Release: $Revision: 1.4 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ -if (!defined('_CAN_LOAD_FILES_')) +if (!defined('_PS_VERSION_')) exit; - -class blockreinsurance extends Module + +class Blockreinsurance extends Module { + protected $_html = ''; + public function __construct() { $this->name = 'blockreinsurance'; - if(version_compare(_PS_VERSION_, '1.4.0.0') >= 0) - $this->tab = 'front_office_features'; - else - $this->tab = 'Blocks'; + $this->tab = 'front_office_features'; $this->version = '1.0'; + $this->author = 'PrestaShop'; + $this->need_instance = 0; parent::__construct(); - $this->displayName = $this->l('Bloc reinsurance'); - $this->description = $this->l('Add a block to display more infos to reassure your customers'); + $this->displayName = $this->l('Block reinsurance'); + $this->description = $this->l('Adds a block to display more infos to reassure your customers'); } - + public function install() { - return (parent::install() AND $this->installDB() AND Configuration::updateValue('blockreinsurance_nbblocks', 5) AND $this->registerHook('footer')); - } - - public function installDB() - { - return Db::getInstance()->execute(' + // Module installation + $res = parent::install(); + + // Table creation + $res &= Db::getInstance()->Execute(' CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'reinsurance` ( - `id_contactinfos` INT UNSIGNED NOT NULL AUTO_INCREMENT, + `id_reinsurance` INT UNSIGNED NOT NULL, `filename` VARCHAR(100) NOT NULL, + PRIMARY KEY (`id_reinsurance`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); + + $res &= Db::getInstance()->Execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'reinsurance_lang` ( + `id_reinsurance` INT UNSIGNED NOT NULL, + `id_lang` INT UNSIGNED NOT NULL, `text` VARCHAR(300) NOT NULL, - PRIMARY KEY (`id_contactinfos`) - ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 ;'); + PRIMARY KEY (`id_reinsurance`, `id_lang`) + ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); + + $res &= $this->registerHook('header') AND $this->example(); + + return $res; } - + public function uninstall() { - //Delete configuration - return (Configuration::deleteByName('blockreinsurance_nbblocks') AND $this->uninstallDB() AND parent::uninstall()); + // Drop table + $res = Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'reinsurance`'); + $res &= Db::getInstance()->Execute('DROP TABLE IF EXISTS `'._DB_PREFIX_.'reinsurance_lang`'); + + // Uninstall module + $res &= parent::uninstall(); + + return $res; } - public function uninstallDB() + + private function example() { - return Db::getInstance()->execute(' - DROP TABLE IF EXISTS `'._DB_PREFIX_.'reinsurance`'); + $res = Db::getInstance()->Execute("INSERT INTO `"._DB_PREFIX_."reinsurance` VALUES + (1, '10299ef6635307f2b4da1e04471ec981.jpg'), + (2, 'd02eaac9390f84f26fe9c5cae966a8f7.jpg'), + (3, 'b889e72091b006fd444f63e5de030604.jpg'), + (4, 'a215cb7a215c6976be8b2b80f02765b0.jpg'), + (5, '0f9d7fd7d13cfb5672ac7830be60d6a8.jpg');"); + $res &= Db::getInstance()->Execute("INSERT INTO `"._DB_PREFIX_."reinsurance_lang` VALUES + (1, 1, 'Money-back guarantee'), + (1, 2, 'SATISFAIT OU REMBOURSE'), + (1, 3, 'Money-back guarantee'), + (1, 4, 'Money-back guarantee'), + (1, 5, 'Money-back guarantee'), + (2, 1, 'Satisfied or refunded'), + (2, 2, 'ECHANGE EN MAGASIN'), + (2, 3, 'Satisfied or refunded'), + (2, 4, 'Satisfied or refunded'), + (2, 5, 'Satisfied or refunded'), + (3, 1, 'Shipped and paid'), + (3, 2, 'PAIEMENT A L''EXPEDITION'), + (3, 3, 'Shipped and paid'), + (3, 4, 'Shipped and paid'), + (3, 5, 'Shipped and paid'), + (4, 1, 'Free delivery'), + (4, 2, 'LIVRAISON GRATUITE'), + (4, 3, 'Free delivery'), + (4, 4, 'Free delivery'), + (4, 5, 'Free delivery'), + (5, 1, 'Secure payment'), + (5, 2, 'PAIEMENT 100% SECURISE'), + (5, 3, 'Secure payment'), + (5, 4, 'Secure payment'), + (5, 5, 'Secure payment');"); + return $res; } - - public function addToDB() - { - if(isset($_POST['nbblocks'])) - { - for($i = 1; $i <= (int)$_POST['nbblocks']; $i++) - { - $filename = explode('.', $_FILES['info'.$i.'_file']['name']); - if (isset($_FILES['info'.$i.'_file']) AND isset($_FILES['info'.$i.'_file']['tmp_name']) AND !empty($_FILES['info'.$i.'_file']['tmp_name'])) - { - if ($error = checkImage($_FILES['info'.$i.'_file'])) - return false; - elseif (!$tmpName = tempnam(_PS_TMP_IMG_DIR_, 'PS') OR !move_uploaded_file($_FILES['info'.$i.'_file']['tmp_name'], $tmpName)) - return false; - elseif (!imageResize($tmpName, dirname(__FILE__).'/img/'.$filename[0].'.jpg')) - return false; - unlink($tmpName); - } - Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'reinsurance` (`filename`,`text`) - VALUES ("'.((isset($filename[0]) AND $filename[0] != '') ? pSQL($filename[0]) : ''). - '", "'.((isset($_POST['info'.$i.'_text']) AND $_POST['info'.$i.'_text'] != '') ? pSQL($_POST['info'.$i.'_text']) : '').'")'); - } - return true; - } else - return false; - } - - public function removeFromDB() - { - $dir = opendir(dirname(__FILE__).'/img'); - while (false !== ($file = readdir($dir))) - { - $path = dirname(__FILE__).'/img/'.$file; - if ($file != ".." AND $file != "." AND !is_dir($file)) - { - unlink($path); - } - } - closedir($dir); - return Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'reinsurance`'); - } - - public function getAllFromDB() - { - return Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'reinsurance`'); - } - public function getContent() { - // If we try to update the settings - if (isset($_POST['submitModule'])) - { - Configuration::updateValue('blockreinsurance_nbblocks', ((isset($_POST['nbblocks']) AND $_POST['nbblocks'] != '') ? (int)$_POST['nbblocks'] : '')); - if($this->removeFromDB() && $this->addToDB()) - echo '
      '.$this->l('Configuration updated').'
      '; - else - echo '
      '.$this->l('An error occurred during the save').'
      '; + $this->_html = '

      '.$this->displayName.'.

      '; + + if (Tools::isSubmit('submitBlock')) + $this->postProcess(); + $this->displayForm(); + + return $this->_html; + } + + protected function displayForm() + { + $languages = Language::getLanguages(false); + $default_language = Configuration::get('PS_LANG_DEFAULT'); + $div_id_language = 'block_1_language¤block_2_language¤block_3_language¤block_4_language¤block_5_language'; + + $data = $this->getAllReinsurances(); + $reinssuarances = array(); + foreach ($data as $row) + $reinssuarances[$row['id_reinsurance']][$row['id_lang']] = $row; + + $this->_html .= ' + +
      +
      + '.$this->l('Block configuration').' + '; + + for ($i = 1; $i != 6; $i++) + { + $this->_html .= ' +

      Block '.$i.'

      + '; + if ($i == 1) + $this->_html .= '

      '.$this->l('This block is required').'

      '; + + if (isset($reinssuarances[$i][$default_language]) && $reinssuarances[$i][$default_language]['filename'] != null) + $this->_html .= '
      + '.$reinssuarances[$i][$default_language]['text'].' +
      '; + $this->_html .= ' + +
      + +
      + '; + + foreach ($languages as $lang) + $this->_html .= ' +
      + + +
      + '; + $this->_html .= $this->displayFlags($languages, $default_language, $div_id_language, 'block_'.$i.'_language', true); + $this->_html .= ' +
      + '; + if ($i != 5) + $this->_html.= '
      '; + } + $this->_html .= ' +

      + +

      +
      +
      + '; + + return $this->_html; + } + + protected function postProcess() + { + $languages = Language::getLanguages(false); + $default_language = Configuration::get('PS_LANG_DEFAULT'); + $max_image_size = 2 * 1024 * 1024; // 2 Mb + + $errors = array(); + $res = 1; + for ($i = 1; $i < 6; $i++) + { + $image_name = $_FILES['images']['name'][$i]; + if ($image_name != null) + { + $new_image_name = md5($image_name).'.jpg'; + $file = array(); + $file['name'] = $_FILES['images']['name'][$i]; + $file['tmp_name'] = $_FILES['images']['tmp_name'][$i]; + $file['type'] = $_FILES['images']['type'][$i]; + $file['error'] = $_FILES['images']['error'][$i]; + $file['size'] = $_FILES['images']['size'][$i]; + if ($error = checkImage($file, $max_image_size)) + $errors[] = $error; + elseif (!move_uploaded_file($file['tmp_name'], dirname(__FILE__).'/img/'.$new_image_name)) + $errors[] = $this->l('An error occurred during the image upload.'); + + if (!sizeof($errors)) + { + // Clear old rows + $res &= $this->cleanDb($i); + + // New rows + $res &= Db::getInstance()->Execute(' + INSERT INTO `'._DB_PREFIX_.'reinsurance` (`id_reinsurance`, `filename`) + VALUES (\''.(int)$i.'\', \''.(isset($new_image_name) ? pSQL($new_image_name) : '').'\') + '); + } + } } - $nb_blocks = Configuration::get('blockreinsurance_nbblocks'); - $infos = $this->getAllFromDB(); - - $content = ' - -

      '.$this->displayName.'

      -
      -
      - -
       
      '; - // Show by default 5 blocks maximum - for($i = 1; $i <= 5; $i++) + foreach ($_POST['texts'] as $key => $text) + { + $res &= $this->cleanTxt($key); + if ($text[$default_language] != null && Validate::isCleanHtml($text[$default_language])) + { + if (!sizeof($errors)) { - $content .= '

      '.$this->l('Block number').' '.$i.'

      '. - ((!empty($infos[$i-1]) && $infos[$i-1]['filename'] != '') ? '' : ''). - '
       
      -

      -

      -

      -

      '; - } - $content .= '
       
      -
      -
      -
      '; + foreach ($languages as $lang) + { + if ($text[$lang['id_lang']] == '' || !Validate::isCleanHtml($text[$lang['id_lang']])) + $text[$lang['id_lang']] = $text[$default_language]; + + $res &= Db::getInstance()->Execute(' + INSERT INTO `'._DB_PREFIX_.'reinsurance_lang` (`id_reinsurance`, `id_lang`, `text`) + VALUES (\''.(int)$key.'\', \''.(int)$lang['id_lang'].'\', \''.pSQL($text[$lang['id_lang']]).'\') + '); + } + + if (!$res) + $errors[] = $this->l('An error occured on save'); + } + } + else + { + if ($key == 1) + $errors[] = $this->l('The block 1 is required'); + else + // check if another language aren't empty + foreach ($text as $id_lang => $val) + if ($id_lang != $default_language) + if ($val != null) + $errors[] = $this->l('The text for the block number').' '.$key.' '.$this->l('is incorrect, the default language information is required '); + } + } - return $content; + if (!sizeof($errors)) + $this->_html .= $this->displayConfirmation($this->l('Configuration updated')); + else + $this->_html .= $this->displayError(implode('
      ', $errors)); + } + + protected function cleanDb($key) + { + $image = Db::getInstance()->ExecuteS(' + SELECT `filename` + FROM `'._DB_PREFIX_.'reinsurance` + WHERE `id_reinsurance` = '.(int)$key); + + // Delete image + if (file_exists(dirname(__FILE__).'/images/'.$image)) + @unlink(dirname(__FILE__).'/images/'.$image); + + // Delete rows + return Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'reinsurance` WHERE `id_reinsurance` = '.(int)$key) && + Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'reinsurance_lang` WHERE `id_reinsurance` = '.(int)$key); + } + + protected function cleanTxt($key) + { + // Delete rows + return Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'reinsurance_lang` WHERE `id_reinsurance` = '.(int)$key); + } + + protected function getAllReinsurances($id_lang = null) + { + return Db::getInstance()->ExecuteS(' + SELECT * + FROM `'._DB_PREFIX_.'reinsurance` r + LEFT JOIN `'._DB_PREFIX_.'reinsurance_lang` rl ON (r.`id_reinsurance` = rl.`id_reinsurance`) + '.($id_lang ? 'WHERE rl.`id_lang` = '.(int)$id_lang : '')); + } + + public function hookHeader() + { + $this->context->controller->addCSS(($this->_path).'style.css', 'all'); } public function hookFooter($params) - { - global $smarty; - - $infos = $this->getAllFromDB(); - + { + global $smarty, $cookie; + + $reinssuarances = $this->getAllReinsurances($cookie->id_lang); + + if (!$nb_reinssurance = sizeof($reinssuarances)) + return; + $smarty->assign(array( - 'nbblocks' => Configuration::get('blockreinsurance_nbblocks'), - 'infos' => $infos + 'nb_blocks' => $nb_reinssurance, + 'reinssurances' => $reinssuarances )); + return $this->display(__FILE__, 'blockreinsurance.tpl'); } } -?> + diff --git a/modules/blockreinsurance/blockreinsurance.tpl b/modules/blockreinsurance/blockreinsurance.tpl index 663ce392a..165754506 100644 --- a/modules/blockreinsurance/blockreinsurance.tpl +++ b/modules/blockreinsurance/blockreinsurance.tpl @@ -23,12 +23,11 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} -
      -
        - {foreach from=$infos item=info} -
      • {$info.text} {$info.text}
      • +
          + {foreach from=$reinssurances item=reinssurance} +
        • {if $reinssurance.filename}{$reinssurance.text}{/if} {$reinssurance.text}
        • {/foreach}
      diff --git a/modules/blockreinsurance/img/bg_reinsurance_block.gif b/modules/blockreinsurance/img/bg_reinsurance_block.gif new file mode 100644 index 000000000..0894d2a0a Binary files /dev/null and b/modules/blockreinsurance/img/bg_reinsurance_block.gif differ diff --git a/modules/blockreinsurance/style.css b/modules/blockreinsurance/style.css new file mode 100644 index 000000000..fc08e480e --- /dev/null +++ b/modules/blockreinsurance/style.css @@ -0,0 +1,24 @@ +/* BLOCK #reinsurance_block ******************************************************************** */ +#reinsurance_block {background:url(../blockreinsurance/img/bg_reinsurance_block.gif) repeat-x 0 0 #c3c7cb} +#reinsurance_block li { + float:left; + padding:15px 10px !important; + font-size:13px; + color:#333; + text-transform:uppercase; + text-shadow:0 1px 0 #fff +} +#reinsurance_block .width1 li {width:960px} +#reinsurance_block .width2 li {width:470px} +#reinsurance_block .width3 li {width:305px} +#reinsurance_block .width4 li {width:224px} +#reinsurance_block .width5 li {width:175px} +#reinsurance_block li img{ + float:left; + margin-right:10px; +} +#reinsurance_block li span { + float:left; + padding-top:12px; + width:65%; +} \ No newline at end of file diff --git a/modules/blockrss/blockrss.css b/modules/blockrss/blockrss.css new file mode 100644 index 000000000..2e56d25a6 --- /dev/null +++ b/modules/blockrss/blockrss.css @@ -0,0 +1,14 @@ +/* Block RSS */ +#rss_block_left p { + margin:0; + padding:10px; +} + +#rss_block_left li {border-bottom:1px dotted #ccc} +#rss_block_left li.last { border:none;} + #rss_block_left li a { + display:block; + padding:7px 11px 5px 22px; + color:#333; + background:url(img/arrow_right_2.png) no-repeat 10px 10px transparent + } diff --git a/modules/blockrss/blockrss.tpl b/modules/blockrss/blockrss.tpl index 3a5b0456b..b02633b07 100644 --- a/modules/blockrss/blockrss.tpl +++ b/modules/blockrss/blockrss.tpl @@ -19,7 +19,7 @@ * * @author PrestaShop SA * @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 6844 $ +* @version Release: $Revision: 6594 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} @@ -35,7 +35,7 @@ {/foreach}
    {else} - {l s='No RSS feed added' mod='blockrss'} +

    {l s='No RSS feed added' mod='blockrss'}

    {/if} diff --git a/modules/blocksearch/blocksearch.css b/modules/blocksearch/blocksearch.css new file mode 100644 index 000000000..aa7252ddd --- /dev/null +++ b/modules/blocksearch/blocksearch.css @@ -0,0 +1,28 @@ +/* block top search */ +#search_block_top { + position:absolute; + top:44px; + left:0; +} +#search_block_top p {padding:0;} +#search_block_top #search_query_top { + padding:0 5px; + height:24px; + width:300px;/* 310 */ + border:1px solid #666; + border-right:1px solid #fff !important; + color:#666; + background:url(img/bg_search_input.png) repeat-x 0 0 #fff; +} + +#search_block_top .button { + border:none; + border-radius:0; + color:#fff; + text-transform:uppercase; + background:url(img/bg_search_submit.png) repeat-x 0 0 #101010; +} + +/*\*//*/div.madiv { +#search_block_top .button {top: 5px;} /* hack ie 8 */ +}/* */ diff --git a/modules/blocksearch/blocksearch.php b/modules/blocksearch/blocksearch.php index 60c9f6939..bed5c987d 100644 --- a/modules/blocksearch/blocksearch.php +++ b/modules/blocksearch/blocksearch.php @@ -54,7 +54,10 @@ class BlockSearch extends Module public function hookHeader($params) { if (Configuration::get('PS_SEARCH_AJAX')) - $this->context->controller->addJqueryPlugin('autocomplete'); + { + $this->context->controller->addCSS(_PS_CSS_DIR_.'jquery.autocomplete.css'); + $this->context->controller->addJS(_PS_JS_DIR_.'jquery/jquery.autocomplete.js'); + } $this->context->controller->addCSS(_THEME_CSS_DIR_.'product_list.css'); $this->context->controller->addCSS(($this->_path).'blocksearch.css', 'all'); } diff --git a/modules/blocksearch/img/bg_search_input.png b/modules/blocksearch/img/bg_search_input.png new file mode 100644 index 000000000..92db89ad4 Binary files /dev/null and b/modules/blocksearch/img/bg_search_input.png differ diff --git a/modules/blocksearch/img/bg_search_submit.png b/modules/blocksearch/img/bg_search_submit.png new file mode 100644 index 000000000..4a44d039a Binary files /dev/null and b/modules/blocksearch/img/bg_search_submit.png differ diff --git a/modules/blocksharefb/blocksharefb.php b/modules/blocksharefb/blocksharefb.php index caffb22a5..d06e78326 100644 --- a/modules/blocksharefb/blocksharefb.php +++ b/modules/blocksharefb/blocksharefb.php @@ -1,13 +1,13 @@ -* @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 6844 $ -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* @author Prestashop SA +* @copyright 2007-2010 Prestashop SA +* @version Release: $Revision: 1.4 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ @@ -76,4 +76,4 @@ class blocksharefb extends Module } } } -?> +?> \ No newline at end of file diff --git a/modules/blocksocial/blocksocial.css b/modules/blocksocial/blocksocial.css new file mode 100644 index 000000000..9676ee2e9 --- /dev/null +++ b/modules/blocksocial/blocksocial.css @@ -0,0 +1,5 @@ +#social_block {padding:15px 10px;} +#social_block li {padding-left:22px !important;} +#social_block li.facebook {background:url(img/sprite_pict_social_block.png) no-repeat 0 6px;} +#social_block li.twitter {background:url(img/sprite_pict_social_block.png) no-repeat 0 -26px;} +#social_block li.rss {background:url(img/sprite_pict_social_block.png) no-repeat 0 -56px;} diff --git a/modules/blocksocial/blocksocial.php b/modules/blocksocial/blocksocial.php index 7877a0b1f..be8a62d78 100644 --- a/modules/blocksocial/blocksocial.php +++ b/modules/blocksocial/blocksocial.php @@ -1,13 +1,13 @@ -* @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 6844 $ -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* @author Prestashop SA +* @copyright 2007-2010 Prestashop SA +* @version Release: $Revision: 1.4 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ @@ -44,7 +44,7 @@ class blocksocial extends Module public function install() { - return (parent::install() AND Configuration::updateValue('blocksocial_facebook', '') AND Configuration::updateValue('blocksocial_twitter', '') AND Configuration::updateValue('blocksocial_rss', '') AND $this->registerHook('footer')); + return (parent::install() AND Configuration::updateValue('blocksocial_facebook', '') AND Configuration::updateValue('blocksocial_twitter', '') AND Configuration::updateValue('blocksocial_rss', '') AND $this->registerHook('header')); } public function uninstall() @@ -79,9 +79,20 @@ class blocksocial extends Module
     

    - '; + +
     
    +
    + Addons + '.$this->l('This module has been developped by PrestaShop and can only be sold through').' addons.prestashop.com.
    + '.$this->l('Please report all bugs to').' addons@prestashop.com '.$this->l('or using our').' '.$this->l('contact form').'. +
    '; } + public function hookHeader() + { + $this->context->controller->addCSS(($this->_path).'blocksocial.css', 'all'); + } + public function hookFooter() { global $smarty; diff --git a/modules/blocksocial/img/sprite_pict_social_block.png b/modules/blocksocial/img/sprite_pict_social_block.png new file mode 100644 index 000000000..64984a226 Binary files /dev/null and b/modules/blocksocial/img/sprite_pict_social_block.png differ diff --git a/modules/blockspecials/blockspecials.css b/modules/blockspecials/blockspecials.css new file mode 100644 index 000000000..e7a3eac99 --- /dev/null +++ b/modules/blockspecials/blockspecials.css @@ -0,0 +1,49 @@ +/* Block specials */ +#special_block_right p { + padding-bottom:0; + font-weight:bold; + text-align:right +} +#special_block_right .products li { + padding:15px 0; + width: 130px; + border:none; +} +#special_block_right li h5 { + padding:0 0 3px 0; + font-size:12px +} +#special_block_right .products li a { + padding:0; + background:none +} +#special_block_right li.product_image { + padding-right:10px; + width:62px; +} + +#special_block_right .products span.price-discount { + font-size:14px; + text-decoration:line-through +} +#special_block_right .products span.reduction { + display:block; + float:right; + padding:0 0 0 10px; + font-weight:bold; + font-size:12px; + color:#fff; + background:url(img/bg_reduction.png) no-repeat 0 0 +} + #special_block_right .products span.reduction span { + display:block; + padding:1px 5px 1px 0; + background:url(img/bg_reduction.png) no-repeat 100% 0 + } +#special_block_right .products span.price { + display:block; + padding:3px 0 0 0; + font-weight:bold; + font-size:14px; + color:#900 +} diff --git a/modules/blockspecials/blockspecials.php b/modules/blockspecials/blockspecials.php index 06b08c1e5..187ca741c 100644 --- a/modules/blockspecials/blockspecials.php +++ b/modules/blockspecials/blockspecials.php @@ -37,7 +37,7 @@ class BlockSpecials extends Module { $this->name = 'blockspecials'; $this->tab = 'pricing_promotion'; - $this->version = '0.8'; + $this->version = 0.8; $this->author = 'PrestaShop'; $this->need_instance = 0; @@ -90,8 +90,8 @@ class BlockSpecials extends Module if (!$special = Product::getRandomSpecial((int)$params['cookie']->id_lang) AND !Configuration::get('PS_BLOCK_SPECIALS_DISPLAY')) return; - $this->templateAssign(array( - 'special' => $special, + $this->context->smarty->assign(array( + 'blockspecials_special' => $special, 'priceWithoutReduction_tax_excl' => Tools::ps_round($special['price_without_reduction'], 2), 'mediumSize' => Image::getSize('medium'), )); diff --git a/modules/blockspecials/blockspecials.tpl b/modules/blockspecials/blockspecials.tpl index d0bd12774..e7a7a6e5c 100644 --- a/modules/blockspecials/blockspecials.tpl +++ b/modules/blockspecials/blockspecials.tpl @@ -19,7 +19,7 @@ * * @author PrestaShop SA * @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 7077 $ +* @version Release: $Revision: 6594 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} @@ -30,30 +30,29 @@
    {if $blockspecials_special} -
      +
      • - {$blockspecials_special.legend|escape:html:'UTF-8'} + {$blockspecials_special.legend|escape:html:'UTF-8'}
      • - -
        {$blockspecials_special.name|escape:html:'UTF-8'}
        - {if !$priceDisplay}{displayWtPrice p=$blockspecials_special.price_without_reduction}{else}{displayWtPrice p=$blockspecials_priceWithoutReduction_tax_excl}{/if} + {if $blockspecials_special.specific_prices} {assign var='specific_prices' value=$blockspecials_special.specific_prices} {if $specific_prices.reduction_type == 'percentage' && ($specific_prices.from == $specific_prices.to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $specific_prices.to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $specific_prices.from))} - (-{$specific_prices.reduction*100|floatval}%) - {/if} - {/if} + -{$specific_prices.reduction*100|floatval}% + {/if} + {/if} +
        {$blockspecials_special.name|escape:html:'UTF-8'}
        + {if !$priceDisplay}{displayWtPrice p=$blockspecials_special.price_without_reduction}{else}{displayWtPrice p=$priceWithoutReduction_tax_excl}{/if} {if !$priceDisplay}{displayWtPrice p=$blockspecials_special.price}{else}{displayWtPrice p=$blockspecials_special.price_tax_exc}{/if}

      - {l s='All specials' mod='blockspecials'} + » {l s='All specials' mod='blockspecials'}

      {else}

      {l s='No specials at this time' mod='blockspecials'}

      {/if}
    - - + \ No newline at end of file diff --git a/modules/blockspecials/img/bg_reduction.png b/modules/blockspecials/img/bg_reduction.png new file mode 100644 index 000000000..2a1cbd914 Binary files /dev/null and b/modules/blockspecials/img/bg_reduction.png differ diff --git a/modules/blockstore/blockstore.css b/modules/blockstore/blockstore.css index a915ae355..254434419 100644 --- a/modules/blockstore/blockstore.css +++ b/modules/blockstore/blockstore.css @@ -1,3 +1,11 @@ /* Block store */ -.blockstore img { margin: 10px 0 0 0 } -.blockstore p { text-align: center } \ No newline at end of file +.blockstore img { margin: 10px 0 0 0} +.blockstore p { + padding-bottom:0; + font-weight:bold; + text-align: right +} +.blockstore p.store_image { + padding-bottom:10px; + text-align:center +} diff --git a/modules/blockstore/blockstore.php b/modules/blockstore/blockstore.php index 8ecbcf92d..8fe5a5ab5 100644 --- a/modules/blockstore/blockstore.php +++ b/modules/blockstore/blockstore.php @@ -88,7 +88,7 @@ class BlockStore extends Module return $this->displayError($this->l('an error occurred on uploading file')); else { - if (Configuration::hasContext('BLOCKSTORE_IMG', null, $this->context->shop->getContextType()) && Configuration::get('BLOCKSTORE_IMG') != $_FILES['store_img']['name']) + if (Configuration::get('BLOCKSTORE_IMG') != $_FILES['store_img']['name']) @unlink(dirname(__FILE__).'/'.Configuration::get('BLOCKSTORE_IMG')); Configuration::updateValue('BLOCKSTORE_IMG', $_FILES['store_img']['name']); return $this->displayConfirmation($this->l('Settings are updated')); diff --git a/modules/blockstore/blockstore.tpl b/modules/blockstore/blockstore.tpl index 19949890f..ebf71a332 100644 --- a/modules/blockstore/blockstore.tpl +++ b/modules/blockstore/blockstore.tpl @@ -19,7 +19,7 @@ * * @author PrestaShop SA * @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 7077 $ +* @version Release: $Revision: 6594 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} @@ -28,9 +28,9 @@ diff --git a/modules/blocksupplier/blocksupplier.css b/modules/blocksupplier/blocksupplier.css new file mode 100644 index 000000000..a2f5f1255 --- /dev/null +++ b/modules/blocksupplier/blocksupplier.css @@ -0,0 +1,17 @@ +/* Block supplier */ +.blocksupplier li {border-bottom:1px dotted #ccc} +.blocksupplier li.last { border:none;} + .blocksupplier li a { + display:block; + padding:7px 11px 5px 22px; + color:#333; + background:url(img/arrow_right_2.png) no-repeat 10px 10px transparent + } + + +.blocksupplier form {margin-top:10px;} +.blocksupplier p { + padding:0; + text-align:center +} + diff --git a/modules/blocktags/blocktags.css b/modules/blocktags/blocktags.css new file mode 100644 index 000000000..14ecadf40 --- /dev/null +++ b/modules/blocktags/blocktags.css @@ -0,0 +1,20 @@ +/* Block tags */ +div.tags_block .block_content { padding: 3px 6px 0 } +div.tags_block p { + text-align: justify; + font-size: 0.9em +} +div.tags_block p a { + margin: 0 0.1em; + line-height: 1.5em; + padding:2px; +} +div.tags_block p a:hover { + background-color: #ccc; + text-decoration: none; + padding:2px; + color:#333333; +} +a.tag_level3 { font-size: 1.8em; font-weight: bold } +a.tag_level2 { font-size: 1.4em } +a.tag_level1 { font-size: 1em; color: #888 } diff --git a/modules/blocktopmenu/blocktopmenu.php b/modules/blocktopmenu/blocktopmenu.php index c4687c05d..0a7e477e4 100644 --- a/modules/blocktopmenu/blocktopmenu.php +++ b/modules/blocktopmenu/blocktopmenu.php @@ -1,30 +1,4 @@ -* @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 7095 $ -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - include _PS_MODULE_DIR_.'blocktopmenu/menutoplinks.class.php'; class blocktopmenu extends Module { @@ -43,10 +17,10 @@ class blocktopmenu extends Module public function install() { - if(!parent::install() || - !$this->registerHook('top') || - !Configuration::updateValue('MOD_BLOCKTOPMENU_ITEMS', 'CAT1,CMS1,CMS2,PRD1') || - !Configuration::updateValue('MOD_BLOCKTOPMENU_SEARCH', '1') || + if(!parent::install() || + !$this->registerHook('top') || + !Configuration::updateValue('MOD_BLOCKTOPMENU_ITEMS', 'CAT1,CMS1,CMS2,PRD1') || + !Configuration::updateValue('MOD_BLOCKTOPMENU_SEARCH', '0') || !$this->installDB()) return false; return true; @@ -54,29 +28,27 @@ class blocktopmenu extends Module public function installDb() { - return (Db::getInstance()->execute(' + Db::getInstance()->Execute(' CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'linksmenutop` ( - `id_link` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, - `id_shop` INT UNSIGNED NOT NULL, + `id_link` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , `new_window` TINYINT( 1 ) NOT NULL, - `link` VARCHAR( 128 ) NOT NULL, - INDEX (`id_shop`) - ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;') AND - Db::getInstance()->execute(' - CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'linksmenutop_lang` ( - `id_link` INT NOT NULL, - `id_lang` INT NOT NULL, - `id_shop` INT NOT NULL, - `label` VARCHAR( 128 ) NOT NULL , - INDEX ( `id_link` , `id_lang`, `id_shop`) - ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;')); + `link` VARCHAR( 128 ) NOT NULL + ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;'); + Db::getInstance()->Execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'linksmenutop_lang` ( + `id_link` INT NOT NULL , + `id_lang` INT NOT NULL , + `label` VARCHAR( 128 ) NOT NULL , + INDEX ( `id_link` , `id_lang` ) + ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;'); + return true; } public function uninstall() { - if(!parent::uninstall() || - !Configuration::deleteByName('MOD_BLOCKTOPMENU_ITEMS') || - !Configuration::deleteByName('MOD_BLOCKTOPMENU_SEARCH') || + if(!parent::uninstall() || + !Configuration::deleteByName('MOD_BLOCKTOPMENU_ITEMS') || + !Configuration::deleteByName('MOD_BLOCKTOPMENU_SEARCH') || !$this->uninstallDB()) return false; return true; @@ -84,14 +56,15 @@ class blocktopmenu extends Module private function uninstallDb() { - Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'linksmenutop`'); - Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'linksmenutop_lang`'); + Db::getInstance()->ExecuteS('DROP TABLE `'._DB_PREFIX_.'linksmenutop`'); + Db::getInstance()->ExecuteS('DROP TABLE `'._DB_PREFIX_.'linksmenutop_lang`'); return true; } public function getContent() { global $cookie; + if(Tools::isSubmit('submitBlocktopmenu')) { if(Configuration::updateValue('MOD_BLOCKTOPMENU_ITEMS', Tools::getValue('items'))) @@ -108,25 +81,21 @@ class blocktopmenu extends Module } else { - MenuTopLinks::add(Tools::getValue('link'), Tools::getValue('label'), Tools::getValue('new_window', 0), (int)$this->context->shop->id); + MenuTopLinks::add(Tools::getValue('link'), Tools::getValue('label'), Tools::getValue('new_window', 0)); $this->_html .= $this->displayConfirmation($this->l('The link has been added')); } } if(Tools::isSubmit('submitBlocktopmenuRemove')) { $id_link = Tools::getValue('id_link', 0); - MenuTopLinks::remove($id_link, (int)$this->context->shop->id); + MenuTopLinks::remove($id_link); Configuration::updateValue('MOD_BLOCKTOPMENU_ITEMS', str_replace(array('LNK'.$id_link.',', 'LNK'.$id_link), '', Configuration::get('MOD_BLOCKTOPMENU_ITEMS'))); $this->_html .= $this->displayConfirmation($this->l('The link has been removed')); } - $this->_html .= '
    -
    - '.$this->l('The modifications will be applied to').' '.(Context::shop() == Shop::CONTEXT_SHOP ? $this->l('shop:').' '.$this->context->shop->name : $this->l('all shops')).'. -
    '.$this->l('Settings').' -
    +
    @@ -180,14 +149,14 @@ class blocktopmenu extends Module // END Products // BEGIN Menu Top Links $this->_html .= ''; - $links = MenuTopLinks::gets($cookie->id_lang, null, (int)$this->context->shop->id); + $links = MenuTopLinks::gets($cookie->id_lang); foreach($links as $link) $this->_html .= ''; $this->_html .= ''; // END Menu Top Links $this->_html .= '

    - << '.$this->l('Add').' + << '.$this->l('Add').' @@ -252,7 +221,7 @@ class blocktopmenu extends Module $this->_html .= '
    '.$this->l('Add Menu Top Link').' - +
    '; foreach ($languages as $language) @@ -278,7 +247,7 @@ class blocktopmenu extends Module


    '; - + $this->_html .= '
    '.$this->l('List Menu Top Link').' @@ -293,7 +262,7 @@ class blocktopmenu extends Module '; - $links = MenuTopLinks::gets($cookie->id_lang, null, $this->context->shop->id); + $links = MenuTopLinks::gets($cookie->id_lang); foreach($links as $link) { $this->_html .= ' @@ -313,125 +282,108 @@ class blocktopmenu extends Module $this->_html .= '
    '; - return $this->_html; + echo $this->_html; } private function getMenuItems() { - if (Context::shop() == Shop::CONTEXT_SHOP) - { - if (!Configuration::isOverridenByCurrentContext('MOD_BLOCKTOPMENU_ITEMS')) - $items_shop = Configuration::get('MOD_BLOCKTOPMENU_ITEMS'); - } - if (!isset($items_shop)) - $items_shop = ''; - - $items_shop = explode(',', $items_shop); - $items_global = Configuration::getGlobalValue('MOD_BLOCKTOPMENU_ITEMS'); - $items_global = explode(',', $items_global); - - return array('global' => $items_global, 'shop' => $items_shop); + $items = Configuration::get('MOD_BLOCKTOPMENU_ITEMS'); + $items = explode(',', $items); + return $items; } private function makeMenuOption() { global $cookie; - foreach($this->getMenuItems() as $type => $items) + foreach($this->getMenuItems() as $item) { - foreach ($items as $item) - { - $id = (int)substr($item, 3, strlen($item)); - $disabled = ((Context::shop() == Shop::CONTEXT_SHOP && $type == 'global') ? ' disabled="disabled"': ''); - switch(substr($item, 0, 3)) - { - case'CAT': - $this->getCategoryOption($id, $cookie->id_lang, false); - break; - case'PRD': - $product = new Product($id, true, $cookie->id_lang); - if(!is_null($product->id)) - $this->_html .= ''.PHP_EOL; - break; - case'CMS': - $cms = CMS::getLinks($cookie->id_lang, array($id)); - if(count($cms)) - $this->_html .= ''.PHP_EOL; - break; - case'MAN': - $manufacturer = new Manufacturer($id, $cookie->id_lang); - if(!is_null($manufacturer->id)) - $this->_html .= ''.PHP_EOL; - break; - case'SUP': - $supplier = new Supplier($id, $cookie->id_lang); - if(!is_null($supplier->id)) - $this->_html .= ''.PHP_EOL; - break; - case'LNK': - $link = MenuTopLinks::get($id, $cookie->id_lang, (int)$this->context->shop->id); - if(count($link)) - $this->_html .= ''.PHP_EOL; - break; - } + $id = (int)substr($item, 3, strlen($item)); + switch(substr($item, 0, 3)) + { + case'CAT': + $this->getCategoryOption($id, $cookie->id_lang, false); + break; + case'PRD': + $product = new Product($id, true, $cookie->id_lang); + if(!is_null($product->id)) + $this->_html .= ''.PHP_EOL; + break; + case'CMS': + $cms = CMS::getLinks($cookie->id_lang, array($id)); + if(count($cms)) + $this->_html .= ''.PHP_EOL; + break; + case'MAN': + $manufacturer = new Manufacturer($id, $cookie->id_lang); + if(!is_null($manufacturer->id)) + $this->_html .= ''.PHP_EOL; + break; + case'SUP': + $supplier = new Supplier($id, $cookie->id_lang); + if(!is_null($supplier->id)) + $this->_html .= ''.PHP_EOL; + break; + case'LNK': + $link = MenuTopLinks::get($id, $cookie->id_lang); + if(count($link)) + $this->_html .= ''.PHP_EOL; + break; } } } private function makeMenu() { - global $cookie, $page_name; - foreach($this->getMenuItems() as $type => $items) + global $cookie, $page_name; + foreach($this->getMenuItems() as $item) { - foreach ($items as $item) - { - $id = (int)substr($item, 3, strlen($item)); - switch(substr($item, 0, 3)) - { - case'CAT': - $this->getCategory($id, $cookie->id_lang); - break; - case'PRD': - $selected = ($page_name == 'product' && (Tools::getValue('id_product') == $id)) ? ' class="sfHover"' : ''; - $product = new Product($id, true, $cookie->id_lang); - if(!is_null($product->id)) - $this->_menu .= ''.$product->name.'
  • '.PHP_EOL; - break; - case'CMS': - $selected = ($page_name == 'cms' && (Tools::getValue('id_cms') == $id)) ? ' class="sfHover"' : ''; - $cms = CMS::getLinks($cookie->id_lang, array($id)); - if(count($cms)) - $this->_menu .= ''.$cms[0]['meta_title'].''.PHP_EOL; - break; - case'MAN': - $selected = ($page_name == 'manufacturer' && (Tools::getValue('id_manufacturer') == $id)) ? ' class="sfHover"' : ''; - $manufacturer = new Manufacturer($id, $cookie->id_lang); - if(!is_null($manufacturer->id)) - { - if (intval(Configuration::get('PS_REWRITING_SETTINGS'))) - $manufacturer->link_rewrite = Tools::link_rewrite($manufacturer->name, false); - else - $manufacturer->link_rewrite = 0; - $link = new Link; - $this->_menu .= ''.$manufacturer->name.''.PHP_EOL; - } - break; - case'SUP': - $selected = ($page_name == 'supplier' && (Tools::getValue('id_supplier') == $id)) ? ' class="sfHover"' : ''; - $supplier = new Supplier($id, $cookie->id_lang); - if(!is_null($supplier->id)) - { - $link = new Link; - $this->_menu .= ''.$supplier->name.''.PHP_EOL; - } - break; - case'LNK': - $link = MenuTopLinks::get($id, $cookie->id_lang, (int)$this->context->shop->id); - if(count($link)) - $this->_menu .= '
  • '.$link[0]['label'].'
  • '.PHP_EOL; - break; - } - } - } + $id = (int)substr($item, 3, strlen($item)); + switch(substr($item, 0, 3)) + { + case'CAT': + $this->getCategory($id, $cookie->id_lang); + break; + case'PRD': + $selected = ($page_name == 'product' && (Tools::getValue('id_product') == $id)) ? ' class="sfHover"' : ''; + $product = new Product($id, true, $cookie->id_lang); + if(!is_null($product->id)) + $this->_menu .= ''.$product->name.''.PHP_EOL; + break; + case'CMS': + $selected = ($page_name == 'cms' && (Tools::getValue('id_cms') == $id)) ? ' class="sfHover"' : ''; + $cms = CMS::getLinks($cookie->id_lang, array($id)); + if(count($cms)) + $this->_menu .= ''.$cms[0]['meta_title'].''.PHP_EOL; + break; + case'MAN': + $selected = ($page_name == 'manufacturer' && (Tools::getValue('id_manufacturer') == $id)) ? ' class="sfHover"' : ''; + $manufacturer = new Manufacturer($id, $cookie->id_lang); + if(!is_null($manufacturer->id)) + { + if (intval(Configuration::get('PS_REWRITING_SETTINGS'))) + $manufacturer->link_rewrite = Tools::link_rewrite($manufacturer->name, false); + else + $manufacturer->link_rewrite = 0; + $link = new Link; + $this->_menu .= ''.$manufacturer->name.''.PHP_EOL; + } + break; + case'SUP': + $selected = ($page_name == 'supplier' && (Tools::getValue('id_supplier') == $id)) ? ' class="sfHover"' : ''; + $supplier = new Supplier($id, $cookie->id_lang); + if(!is_null($supplier->id)) + { + $link = new Link; + $this->_menu .= ''.$supplier->name.''.PHP_EOL; + } + break; + case'LNK': + $link = MenuTopLinks::get($id, $cookie->id_lang); + if(count($link)) + $this->_menu .= '
  • '.$link[0]['label'].'
  • '.PHP_EOL; + break; + } + } } private function getCategoryOption($id_category, $id_lang, $children = true) @@ -488,4 +440,4 @@ class blocktopmenu extends Module return $this->display(__FILE__, 'blocktopmenu.tpl'); } } -?> +?> \ No newline at end of file diff --git a/modules/blocktopmenu/blocktopmenu.tpl b/modules/blocktopmenu/blocktopmenu.tpl index 954a7566a..bb80693fa 100644 --- a/modules/blocktopmenu/blocktopmenu.tpl +++ b/modules/blocktopmenu/blocktopmenu.tpl @@ -1,28 +1,3 @@ -{* -* 2007-2011 PrestaShop -* -* NOTICE OF LICENSE -* -* This source file is subject to the Academic Free License (AFL 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/afl-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 -* @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 6844 $ -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*} {if $MENU != ''} @@ -44,4 +19,4 @@ - {/if} + {/if} \ No newline at end of file diff --git a/modules/blocktopmenu/index.php b/modules/blocktopmenu/index.php index 56129df6a..4a2aa31b2 100644 --- a/modules/blocktopmenu/index.php +++ b/modules/blocktopmenu/index.php @@ -1,29 +1,4 @@ -* @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 7095 $ -* @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"); @@ -34,4 +9,4 @@ header("Pragma: no-cache"); header("Location: ../"); exit; -?> +?> \ No newline at end of file diff --git a/modules/blocktopmenu/menutoplinks.class.php b/modules/blocktopmenu/menutoplinks.class.php index 8de71b1f1..d0727e695 100644 --- a/modules/blocktopmenu/menutoplinks.class.php +++ b/modules/blocktopmenu/menutoplinks.class.php @@ -1,50 +1,22 @@ -* @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 7095 $ -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - class MenuTopLinks { - public static function gets($id_lang, $id_link = null, $id_shop) + public static function gets($id_lang, $id_link = null) { - return Db::getInstance()->executeS(' + return Db::getInstance()->ExecuteS(' SELECT l.id_link, l.new_window, l.link, ll.label FROM '._DB_PREFIX_.'linksmenutop l - LEFT JOIN '._DB_PREFIX_.'linksmenutop_lang ll ON (l.id_link = ll.id_link AND ll.id_lang = '.(int)$id_lang.' AND ll.id_shop='.(int)$id_shop.') - WHERE 1 - '.((!is_null($id_link)) ? ' AND l.id_link = "'.(int)$id_link.'"' : '').' - AND l.id_shop IN (0, '.(int)$id_shop.') + LEFT JOIN '._DB_PREFIX_.'linksmenutop_lang ll ON (l.id_link = ll.id_link AND ll.id_lang = "'.$id_lang.'") + '.((!is_null($id_link)) ? 'WHERE l.id_link = "'.$id_link.'"' : '').' '); } - public static function get($id_link, $id_lang, $id_shop) + public static function get($id_link, $id_lang) { - return self::gets($id_lang, $id_link, $id_shop); + return self::gets($id_lang, $id_link); } - public static function add($link, $label, $newWindow = 0, $id_shop) + public static function add($link, $label, $newWindow = 0) { if(!is_array($label)) return false; @@ -53,8 +25,7 @@ class MenuTopLinks _DB_PREFIX_.'linksmenutop', array( 'new_window'=>(int)$newWindow, - 'link'=>pSQL($link), - 'id_shop' => (int)$id_shop + 'link'=>$link ), 'INSERT' ); @@ -64,20 +35,19 @@ class MenuTopLinks Db::getInstance()->autoExecute( _DB_PREFIX_.'linksmenutop_lang', array( - 'id_link'=>(int)$id_link, - 'id_lang'=>(int)$id_lang, - 'id_shop'=>(int)$id_shop, - 'label'=>pSQL($label) + 'id_link'=>$id_link, + 'id_lang'=>$id_lang, + 'label'=>$label ), 'INSERT' ); } } - public static function remove($id_link, $id_shop) + public static function remove($id_link) { - Db::getInstance()->delete(_DB_PREFIX_.'linksmenutop', 'id_link = '.(int)$id_link.' AND id_shop = '.(int)$id_shop); - Db::getInstance()->delete(_DB_PREFIX_.'linksmenutop_lang', 'id_link = '.(int)$id_link); + Db::getInstance()->delete(_DB_PREFIX_.'linksmenutop', "id_link = '{$id_link}'"); + Db::getInstance()->delete(_DB_PREFIX_.'linksmenutop_lang', "id_link = '{$id_link}'"); } } -?> +?> \ No newline at end of file diff --git a/modules/blockuserinfo/blockuserinfo.css b/modules/blockuserinfo/blockuserinfo.css new file mode 100644 index 000000000..cecf8ee91 --- /dev/null +++ b/modules/blockuserinfo/blockuserinfo.css @@ -0,0 +1,49 @@ +/* block top user information */ + +#header_right #header_user { + clear:both; + float: right; + margin-top:8px; + width: 535px; +} + +#header_user #header_nav { + list-style-type:none; + float:right; +} + +/* cart */ +#header_user #shopping_cart { + padding:15px 27px 10px 43px; + width: 130px;/* 200 */ + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + border-radius: 3px; + background: url('img/icon/cart.gif') no-repeat 10px 9px #eee +} +#header_user #shopping_cart .ajax_cart_quantity { font-weight:bold; font-size:18px } +#header_user #shopping_cart .ajax_cart_total { display:none !important; } + + +/* account */ +#header_user #your_account {display:none;} +#header_user #your_account a { background-image: url('img/icon/my-account.gif') } + +/* user infos */ +#header_user_info { + clear:both; + float:right; + margin-top:10px; + padding:0; + font-size:12px +} +#header_user_info a { + display:inline-block; + margin:0 0 0 10px; + padding:3px 0 0 34px; + line-height: 11px; + border-left:1px solid #000 +} +*:first-child+html #header_user_info a {line-height:14px;} +#header_user_info a.login {background: url('img/icon/login.gif') no-repeat 10px 0} +#header_user_info a.logout {background: url('img/icon/logout.png') no-repeat 10px -1px} diff --git a/modules/blockuserinfo/blockuserinfo.tpl b/modules/blockuserinfo/blockuserinfo.tpl index cbacb5941..d4bf9eb8f 100644 --- a/modules/blockuserinfo/blockuserinfo.tpl +++ b/modules/blockuserinfo/blockuserinfo.tpl @@ -1,5 +1,5 @@ {* -* 2007-2011 PrestaShop +* 2007-2011 PrestaShop * * NOTICE OF LICENSE * @@ -19,22 +19,13 @@ * * @author PrestaShop SA * @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 7465 $ +* @version Release: $Revision: 6594 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *}
    -

    - {l s='Welcome' mod='blockuserinfo'}, - {if $blockuserinfo_logged} - {$blockuserinfo_firstName} {$blockuserinfo_lastName} - ({l s='Log out' mod='blockuserinfo'}) - {else} - {l s='Log in' mod='blockuserinfo'} - {/if} -

    +

    + {l s='Welcome' mod='blockuserinfo'} + {if $logged} + {$cookie->customer_firstname} {$cookie->customer_lastname} + {l s='Log out' mod='blockuserinfo'} + {else} + + {/if} +

    diff --git a/modules/blockuserinfo/img/icon/cart.gif b/modules/blockuserinfo/img/icon/cart.gif new file mode 100644 index 000000000..d9b4976bf Binary files /dev/null and b/modules/blockuserinfo/img/icon/cart.gif differ diff --git a/modules/blockuserinfo/img/icon/login.gif b/modules/blockuserinfo/img/icon/login.gif new file mode 100644 index 000000000..5ded482f1 Binary files /dev/null and b/modules/blockuserinfo/img/icon/login.gif differ diff --git a/modules/blockuserinfo/img/icon/logout.png b/modules/blockuserinfo/img/icon/logout.png new file mode 100644 index 000000000..9141841c7 Binary files /dev/null and b/modules/blockuserinfo/img/icon/logout.png differ diff --git a/modules/blockuserinfo/img/icon/my-account.gif b/modules/blockuserinfo/img/icon/my-account.gif new file mode 100644 index 000000000..537bb5994 Binary files /dev/null and b/modules/blockuserinfo/img/icon/my-account.gif differ diff --git a/modules/blockviewed/blockviewed.css b/modules/blockviewed/blockviewed.css new file mode 100644 index 000000000..c1b47bc33 --- /dev/null +++ b/modules/blockviewed/blockviewed.css @@ -0,0 +1,30 @@ +/* Block Viewed Products */ +#viewed-products_block_left .products li { + padding:10px 0; + border-bottom:1px dotted #ccc; +} +#viewed-products_block_left .products li.last_item { + padding-bottom:0; + border:none; +} + +#viewed-products_block_left .content_img { + float:left; +} +#viewed-products_block_left .text_desc { + float:left; + margin-left: 10px; + width: 130px; +} +#viewed-products_block_left li .text_desc h5 { + padding:0 0 5px 0; + font-size:12px; + color:#333; +} +#viewed-products_block_left li .text_desc p, +#viewed-products_block_left li .text_desc p a { + padding-bottom:0; + line-height:14px; + color:#666 +} + diff --git a/modules/blockviewed/blockviewed.tpl b/modules/blockviewed/blockviewed.tpl index 4e77fe2c9..ece796008 100644 --- a/modules/blockviewed/blockviewed.tpl +++ b/modules/blockviewed/blockviewed.tpl @@ -1,5 +1,5 @@ {* -* 2007-2011 PrestaShop +* 2007-2011 PrestaShop * * NOTICE OF LICENSE * @@ -19,7 +19,7 @@ * * @author PrestaShop SA * @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 6844 $ +* @version Release: $Revision: 6594 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} @@ -31,9 +31,11 @@ diff --git a/modules/blockwishlist/blockwishlist-extra.tpl b/modules/blockwishlist/blockwishlist-extra.tpl index 30fbcb783..a3019a4eb 100644 --- a/modules/blockwishlist/blockwishlist-extra.tpl +++ b/modules/blockwishlist/blockwishlist-extra.tpl @@ -24,4 +24,4 @@ * International Registered Trademark & Property of PrestaShop SA *} -

    {l s='Add to my wishlist' mod='blockwishlist'}

    \ No newline at end of file +

    » {l s='Add to my wishlist' mod='blockwishlist'}

    diff --git a/modules/blockwishlist/blockwishlist.css b/modules/blockwishlist/blockwishlist.css new file mode 100644 index 000000000..4093b2748 --- /dev/null +++ b/modules/blockwishlist/blockwishlist.css @@ -0,0 +1,231 @@ +/* module blockwishlist */ + +/* bt add */ +.add_wishlist_button a {padding:5px 7px 5px 18px} +.add_wishlist_button a span { + z-index:10; + display:block; + position:absolute; + top:-1px; + left:-12px; + height:26px; + width:26px; + background:url(img/icon/pict_add_wishlist.png) no-repeat 0 0 transparent +} + +/* bloc */ +#wishlist_block #wishlist_block_list { + margin:10px 0; + padding-bottom:10px; + border-bottom:1px dotted #ccc +} + +#wishlist_block_list .quantity-formated { + display:inline-block; + margin-right:5px; + width:15px +} +#wishlist_block_list .cart_block_product_name {font-weight:bold} +#wishlist_block_list .ajax_cart_block_remove_link { + float:right; + display:inline-block; + margin:1px 0 0 5px; + height:12px; + width:12px +} +#wishlist_block_list dd {margin:0 0 0 24px} + + +#wishlist_block_list .ajax_cart_block_remove_link a { + display:inline-block; + height:12px; + width:12px; + background: url(img/icon/delete.gif) no-repeat 0 0 +} +#wishlist_block_list .price { + float:right +} + +#wishlist_block select#wishlists { + margin-bottom:10px; + width:99%; + border:1px solid #ccc; +} +#wishlist_block .lnk {padding:0} +#wishlist_block .lnk a { + display:block; + font-weight:bold; + text-align:right +} + +/* page in my account ************************************************************************* */ +#module-blockwishlist-mywishlist #left_column {display:none} +#module-blockwishlist-mywishlist #center_column{width:757px} + +#module-blockwishlist-mywishlist #mywishlist fieldset { + padding:10px; + -moz-border-radius:3px; + -webkit-border-radius:3px; + border-radius:3px; + background:#eee +} +#module-blockwishlist-mywishlist #mywishlist p.text label { + display:inline-block; + padding-right:10px; + width:174px; + font-weight:bold; + font-size:12px; + text-align:right +} +#module-blockwishlist-mywishlist #mywishlist p.text input { + padding:0 5px; + height:20px; + width:288px; + border:1px solid #ccc; + background:url(../img/bg_input.png) repeat-x 0 0 #fff +} +#module-blockwishlist-mywishlist #mywishlist p.submit { + margin-right:25px; + padding-bottom:5px; + text-align:right +} + +#mywishlist td.wishlist_delete {text-align:center} +#mywishlist td.wishlist_delete a { + display:inline-block; + font-size:8px; + padding:1px 2px; + -moz-border-radius:3px; + -webkit-border-radius:3px; + border-radius:3px; + color:#666; + text-shadow:0 1px 0 #fff; + text-transform:uppercase; + background: none repeat scroll 0 0 #ccc; +} + + +/* form add ****************************************** */ +#form_wishlist {} +#form_wishlist label { + display:inline-block; + padding:6px 15px; + width:150px; + font-size:12px; + text-align:right; +} +#form_wishlist input.inputTxt { + padding:0 5px; + height:26px; + width:260px; + font-size:12px; + color:#666; + border:1px solid #ccc; +} + +/* block-order-detail ********************************** */ +#module-blockwishlist-mywishlist #block-order-detail {margin-top:20px} + +/* wishlistLinkTop */ +#module-blockwishlist-mywishlist #block-order-detail #hideSendWishlist { + display:inline-block; + height:12px; + width:12px; + background: url(img/icon/delete.gif) no-repeat 0 0 +} + +#module-blockwishlist-mywishlist .wishlistLinkTop {} +#module-blockwishlist-mywishlist .wishlistLinkTop ul { + list-style-type:none; + border-bottom:1px dotted #ccc +} + #module-blockwishlist-mywishlist .wishlistLinkTop ul.wlp_bought_list {border:none;} +#module-blockwishlist-mywishlist .wishlistLinkTop li {float:left} +#module-blockwishlist-mywishlist .wishlistLinkTop .display_list li a { + display:inline-block; + padding:7px 11px 5px 22px; + color: #333; + background:url(img/arrow_right_2.png) no-repeat 10px 10px transparent +} + +#module-blockwishlist-mywishlist .wishlistLinkTop #hideSendWishlist { + float:right; + display:block; + height:12px; + width:12px; + text-indent:-5000px; + background: url(img/icon/delete.gif) no-repeat 0 0 +} +#module-blockwishlist-mywishlist .wishlistLinkTop #showBoughtProducts, +#module-blockwishlist-mywishlist .wishlistLinkTop #hideBoughtProductsInfos {display:none} + +/* wishlisturl */ +#module-blockwishlist-mywishlist .wishlisturl { + margin:20px 0; + padding:10px; + background:#eee +} +#module-blockwishlist-mywishlist .wishlisturl input { + padding:2px 5px; + border:1px solid #ccc +} + + +/* wlp_bought ****************************************** */ + +/* wlp_bought_list */ +ul.wlp_bought_list { + list-style-type:none; + margin-bottom:20px +} +ul.wlp_bought_list li { + position:relative; + float:left; + margin:20px 20px 0 0; + padding:5px; + width:218px;/* 230 */ + border:1px solid #d1d1d1; + -moz-border-radius:3px; + -webkit-border-radius:3px; + border-radius:3px; +} +ul.wlp_bought_list li .product_image { + float:left; + width:82px +} +ul.wlp_bought_list li .product_image a { + display:block; + padding:0; + border:1px solid #d1d1d1 +} + +ul.wlp_bought_list li .product_infos { + float:left; + margin-left:10px; + width:126px +} +ul.wlp_bought_list li .product_infos h5.product_name { + padding:5px 0; + font-size:12px; + color:#222 +} +ul.wlp_bought_list li .product_infos .wishlist_product_detail input, +ul.wlp_bought_list li .product_infos .wishlist_product_detail select { + border:1px solid #d1d1d1 +} + +ul.wlp_bought_list li .btn_action { + clear:both; + margin-top:10px +} +ul.wlp_bought_list li .btn_action .lnksave {float:right} +ul.wlp_bought_list li .lnkdel { + position:absolute; + top:5px; + right:5px; + display:block; + height:12px; + width:12px; + text-indent:-5000px; + background: url(img/icon/delete.gif) no-repeat 0 0 +} diff --git a/modules/blockwishlist/blockwishlist.tpl b/modules/blockwishlist/blockwishlist.tpl index b97c33bf1..21469868a 100644 --- a/modules/blockwishlist/blockwishlist.tpl +++ b/modules/blockwishlist/blockwishlist.tpl @@ -1,5 +1,5 @@ {* -* 2007-2011 PrestaShop +* 2007-2011 PrestaShop * * NOTICE OF LICENSE * @@ -26,7 +26,7 @@ diff --git a/modules/blockwishlist/managewishlist.tpl b/modules/blockwishlist/managewishlist.tpl index 71bd61ebd..e10bf9a8a 100644 --- a/modules/blockwishlist/managewishlist.tpl +++ b/modules/blockwishlist/managewishlist.tpl @@ -25,56 +25,67 @@ *} {if $products} -{if !$refresh} -
    - - - {if count($productsBoughts)} - - + {if !$refresh} +
    + + +

    Permalink :

    +

    + +

    {/if} - - - -
    - Permalink :
    -{/if}
    - {foreach from=$products item=product name=i} - -
     
    - {/foreach} +
    -
    -
    {if !$refresh} @@ -107,11 +117,13 @@ {if $bought.quantity > 0} - {$product.name|escape:'htmlall':'UTF-8'} - {$product.name|truncate:40:'...'|escape:'htmlall':'UTF-8'} - {if isset($product.attributes_small)} -
    {$product.attributes_small|escape:'htmlall':'UTF-8'} - {/if}
    + {$product.name|escape:'htmlall':'UTF-8'} + + {$product.name|truncate:40:'...'|escape:'htmlall':'UTF-8'} + {if isset($product.attributes_small)} +
    {$product.attributes_small|escape:'htmlall':'UTF-8'} + {/if} +
    {$bought.quantity|intval} {$bought.firstname} {$bought.lastname} @@ -125,5 +137,5 @@ {/if} {/if} {else} - {l s='No products' mod='blockwishlist'} -{/if} +

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

    +{/if} \ No newline at end of file diff --git a/modules/blockwishlist/my-account.tpl b/modules/blockwishlist/my-account.tpl index 65fa2f8f3..3f6153410 100644 --- a/modules/blockwishlist/my-account.tpl +++ b/modules/blockwishlist/my-account.tpl @@ -25,7 +25,7 @@ *} -
  • -{l s='wishlist' mod='blockwishlist'}{l s='My wishlists' mod='blockwishlist'} +
  • + {l s='wishlist' mod='blockwishlist'} {l s='My wishlists' mod='blockwishlist'}
  • \ No newline at end of file diff --git a/modules/blockwishlist/mywishlist.tpl b/modules/blockwishlist/mywishlist.tpl index 2b8de6f9e..71c635159 100644 --- a/modules/blockwishlist/mywishlist.tpl +++ b/modules/blockwishlist/mywishlist.tpl @@ -33,13 +33,17 @@ {include file="$tpl_dir./errors.tpl"} {if $id_customer|intval neq 0} -
    +

    {l s='New wishlist' mod='blockwishlist'}

    - - - - +

    + + + +

    +

    + +

    {if $wishlists} @@ -58,25 +62,27 @@ {section name=i loop=$wishlists} - {$wishlists[i].name|truncate:30:'...'|escape:'htmlall':'UTF-8'} - - {assign var=n value=0} - {foreach from=$nbProducts item=nb name=i} - {if $nb.id_wishlist eq $wishlists[i].id_wishlist} - {assign var=n value=$nb.nbProducts|intval} - {/if} - {/foreach} - {if $n} - {$n|intval} - {else} - 0 - {/if} + + {$wishlists[i].name|truncate:30:'...'|escape:'htmlall':'UTF-8'} - {$wishlists[i].counter|intval} - {$wishlists[i].date_add|date_format:"%Y-%m-%d"} - {l s='View' mod='blockwishlist'} - - {l s='Delete' mod='blockwishlist'} + + {assign var=n value=0} + {foreach from=$nbProducts item=nb name=i} + {if $nb.id_wishlist eq $wishlists[i].id_wishlist} + {assign var=n value=$nb.nbProducts|intval} + {/if} + {/foreach} + {if $n} + {$n|intval} + {else} + 0 + {/if} + + {$wishlists[i].counter|intval} + {$wishlists[i].date_add|date_format:"%Y-%m-%d"} + {l s='View' mod='blockwishlist'} + + {l s='Delete' mod='blockwishlist'} {/section} @@ -89,6 +95,6 @@
    diff --git a/modules/blockwishlist/view.tpl b/modules/blockwishlist/view.tpl index 769a10e4d..acf3eeb38 100644 --- a/modules/blockwishlist/view.tpl +++ b/modules/blockwishlist/view.tpl @@ -87,11 +87,10 @@ -
     
    {/foreach}

    {else} - {l s='No products' mod='blockwishlist'} +

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

    {/if} diff --git a/modules/cashondelivery/validation.php b/modules/cashondelivery/validation.php index 5066d3340..fa0b68c7c 100644 --- a/modules/cashondelivery/validation.php +++ b/modules/cashondelivery/validation.php @@ -1,6 +1,6 @@ id_customer); if (!Validate::isLoadedObject($customer)) @@ -60,7 +60,7 @@ if (Tools::getValue('confirm')) } else { - /* or ask for confirmation */ + /* or ask for confirmation */ $smarty->assign(array( 'total' => $cart->getOrderTotal(true, Cart::BOTH), 'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/cashondelivery/' @@ -68,7 +68,7 @@ else $smarty->assign('this_path', __PS_BASE_URI__.'modules/cashondelivery/'); $template = 'validation.tpl'; - echo $cashOnDelivery->display('cashondelivery', $template); + echo Module::display('cashondelivery', $template); } include(dirname(__FILE__).'/../../footer.php'); diff --git a/modules/cashticket/PrepaidServices.php b/modules/cashticket/PrepaidServices.php index e409cdd29..389855808 100644 --- a/modules/cashticket/PrepaidServices.php +++ b/modules/cashticket/PrepaidServices.php @@ -540,7 +540,7 @@ abstract class PrepaidServices extends PaymentModule } if (!empty($params)) - $dataSync = ''; + $dataSync = ''; return $this->displayConfirmation($this->getL('settings_updated').$dataSync); } diff --git a/modules/cashticket/cashticket.php b/modules/cashticket/cashticket.php index 0af6c588a..475c84708 100644 --- a/modules/cashticket/cashticket.php +++ b/modules/cashticket/cashticket.php @@ -49,9 +49,9 @@ class CashTicket extends PrepaidServices protected $certificat_dir; - protected $register_url = array('en' => 'http://api.prestashop.com/partner/url.php?to=http://www.cash-ticket.com/uk', - 'fr' => 'http://api.prestashop.com/partner/url.php?to=http://www.cash-ticket.com/fr', - 'es' => 'http://api.prestashop.com/partner/url.php?to=http://www.cash-ticket.com/es'); + protected $register_url = array('en' => 'http://www.prestashop.com/partner/url.php?to=http://www.cash-ticket.com/uk', + 'fr' => 'http://www.prestashop.com/partner/url.php?to=http://www.cash-ticket.com/fr', + 'es' => 'http://www.prestashop.com/partner/url.php?to=http://www.cash-ticket.com/es'); public function __construct() { diff --git a/modules/cheque/cheque.php b/modules/cheque/cheque.php index 11ad59444..066752fe3 100644 --- a/modules/cheque/cheque.php +++ b/modules/cheque/cheque.php @@ -173,7 +173,6 @@ class Cheque extends PaymentModule $state = $params['objOrder']->getCurrentState(); if ($state == Configuration::get('PS_OS_CHEQUE') OR $state == Configuration::get('PS_OS_OUTOFSTOCK')) - { $this->context->smarty->assign(array( 'total_to_pay' => Tools::displayPrice($params['total_to_pay'], $params['currencyObj'], false), 'chequeName' => $this->chequeName, @@ -181,9 +180,6 @@ class Cheque extends PaymentModule 'status' => 'ok', 'id_order' => $params['objOrder']->id )); - if (isset($params['objOrder']->reference) && !empty($params['objOrder']->reference)) - $this->context->smarty->assign('reference', $params['objOrder']->reference); - } else $this->context->smarty->assign('status', 'failed'); return $this->display(__FILE__, 'payment_return.tpl'); diff --git a/modules/cheque/payment_return.tpl b/modules/cheque/payment_return.tpl index 55699e9a5..bceda1cc8 100644 --- a/modules/cheque/payment_return.tpl +++ b/modules/cheque/payment_return.tpl @@ -31,11 +31,6 @@

    - {l s='an amount of' mod='cheque'} {$total_to_pay}

    - {l s='payable to the order of' mod='cheque'} {if $chequeName}{$chequeName}{else}___________{/if}

    - {l s='mail to' mod='cheque'} {if $chequeAddress}{$chequeAddress}{else}___________{/if} - {if !isset($reference)} -

    - {l s='Do not forget to insert your order number #' mod='cheque'} {$id_order} - {else} -

    - {l s='Do not forget to insert your order reference' mod='cheque'} {$reference} - {/if}

    {l s='An e-mail has been sent to you with this information.' mod='cheque'}

    {l s='Your order will be sent as soon as we receive your payment.' mod='cheque'}

    {l s='For any questions or for further information, please contact our' mod='cheque'} {l s='customer support' mod='cheque'}. diff --git a/modules/criteo/criteo.php b/modules/criteo/criteo.php index 173271a54..441da44f5 100755 --- a/modules/criteo/criteo.php +++ b/modules/criteo/criteo.php @@ -84,7 +84,7 @@ class Criteo extends Module { return '
    - '.($this->_postProcess() ? $this->displayConfirmation($this->l('Settings are updated').'') : '').' + '.($this->_postProcess() ? $this->displayConfirmation($this->l('Settings are updated').'') : '').' '.$this->l('Criteo Export').'
    diff --git a/modules/crossselling/crossselling.css b/modules/crossselling/crossselling.css new file mode 100644 index 000000000..b596ef468 --- /dev/null +++ b/modules/crossselling/crossselling.css @@ -0,0 +1,64 @@ +#crossselling h2.productscategory_h2 { + margin:40px 0 20px 0; + padding:10px 0; + border-bottom:1px solid #ccc; + font-size:18px; + color:#333 +} + +#crossselling ul {list-style-type:none} +#crossselling li { + float:left; + margin-right:25px +} +#crossselling li a.lnk_img {display:block} +#crossselling li a img {border:1px solid #ccc} +#crossselling li p.product_name {text-align:center} + + +/* +div#crossselling { + padding-top: 10px; + clear: both; + margin-bottom: 10px +} +#crossselling { + margin: 0 auto 0; + height: 170px; + width: 100% +} +#crossselling_noscroll { + margin: 0 auto 0; + height: 120px; + width: 100% +} +#crossselling_list { + overflow: hidden; + float: left; + width: 96% +} +#crossselling_list ul { + padding-left: 0; + list-style-type: none +} +#crossselling_list li { + float: left; + margin: 0 3px; + cursor: pointer; + text-align: center; + width: 100px; + overflow: hidden +} +#crossselling_list li a { margin: auto } +#crossselling_scroll_left, + #crossselling_scroll_right { + background: url('../../../img/thumbs_left.gif') no-repeat center; + text-indent: -3000px; + display: block; + width: 9px; + height: 18px; + float: left; + margin-top: 30px +} +#crossselling_scroll_right { background-image: url('../../../img/thumbs_right.gif') } +*/ \ No newline at end of file diff --git a/modules/crossselling/crossselling.tpl b/modules/crossselling/crossselling.tpl index 2ba21f371..584b58641 100755 --- a/modules/crossselling/crossselling.tpl +++ b/modules/crossselling/crossselling.tpl @@ -19,7 +19,7 @@ * * @author PrestaShop SA * @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 6844 $ +* @version Release: $Revision: 6594 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} @@ -28,25 +28,15 @@
    -

    - {if $order} - {l s='Customers who bought these products also bought:' mod='crossselling'} - {else} - {l s='Customers who bought this product also bought:' mod='crossselling'} - {/if} -

    +

    {l s='Customers who bought this product also bought:' mod='crossselling'}

    {if count($orderProducts) > 5}{l s='Previous' mod='crossselling'}{/if}
    -
      5}style="width: {math equation="width * nbImages" width=107 nbImages=$orderProducts|@count}px"{/if}> + diff --git a/modules/dejala/dejala.php b/modules/dejala/dejala.php index c8cddda02..65aa12fbc 100644 --- a/modules/dejala/dejala.php +++ b/modules/dejala/dejala.php @@ -422,7 +422,7 @@ class Dejala extends CarrierModule $method = Tools::getValue('method'); $output .= '
      - '.$this->l('Settings updated').(($method == 'signin' OR $method == 'register' OR $method == 'golive') ? '' : '').' + '.$this->l('Settings updated').(($method == 'signin' OR $method == 'register' OR $method == 'golive') ? '' : '').'
      '; } } diff --git a/modules/dibs/dibs.php b/modules/dibs/dibs.php index 0d05f2c1b..5d72fcb48 100644 --- a/modules/dibs/dibs.php +++ b/modules/dibs/dibs.php @@ -182,7 +182,7 @@ class dibs extends PaymentModule $data_sync = ''; if(self::$ID_MERCHANT !== '' AND self::$TESTING !== 1 AND self::$MORE_SETTINGS['k1'] !== '' AND self::$MORE_SETTINGS['k2'] !== '') - $data_sync = ''; + $data_sync = ''; echo '
      '.$this->l('Configuration updated').$data_sync.'
      '; } diff --git a/modules/ebay/ebay.php b/modules/ebay/ebay.php index 44e569097..40b970606 100755 --- a/modules/ebay/ebay.php +++ b/modules/ebay/ebay.php @@ -598,7 +598,7 @@ class Ebay extends Module // Displaying Information from Prestashop $stream_context = @stream_context_create(array('http' => array('method'=>"GET", 'timeout' => 2))); - $prestashopContent = @file_get_contents('http://api.prestashop.com/partner/modules/ebay.php?version='.$this->version.'&shop='.urlencode(Configuration::get('PS_SHOP_NAME')).'®istered='.($alert['registration'] == 1 ? 'no' : 'yes').'&url='.urlencode($_SERVER['HTTP_HOST']).'&iso_country='.$isoCountry.'&iso_lang='.Tools::strtolower($isoUser).'&id_lang='.(int)$this->context->language->id.'&email='.urlencode(Configuration::get('PS_SHOP_EMAIL')).'&security='.md5(Configuration::get('PS_SHOP_EMAIL')._COOKIE_IV_), false, $stream_context); + $prestashopContent = @file_get_contents('http://www.prestashop.com/partner/modules/ebay.php?version='.$this->version.'&shop='.urlencode(Configuration::get('PS_SHOP_NAME')).'®istered='.($alert['registration'] == 1 ? 'no' : 'yes').'&url='.urlencode($_SERVER['HTTP_HOST']).'&iso_country='.$isoCountry.'&iso_lang='.Tools::strtolower($isoUser).'&id_lang='.(int)$this->context->language->id.'&email='.urlencode(Configuration::get('PS_SHOP_EMAIL')).'&security='.md5(Configuration::get('PS_SHOP_EMAIL')._COOKIE_IV_), false, $stream_context); if (!Validate::isCleanHtml($prestashopContent)) $prestashopContent = ''; diff --git a/modules/editorial/editorial.css b/modules/editorial/editorial.css new file mode 100644 index 000000000..7f9d6244a --- /dev/null +++ b/modules/editorial/editorial.css @@ -0,0 +1,26 @@ +/* Block editorial */ +.editorial_block { margin-bottom: 2em } +.editorial_block .rte { background: transparent none repeat scroll 0 0 } +.editorial_block h1 { + margin:40px 0 10px 0; + padding: 0; + background: none; +} +.editorial_block h2 { + padding:0 0 10px 0; + font-size: 12px; + line-height: 1.2em; + color: #666; + text-transform: none; + background: none; +} +#editorial_block_center p { padding-left: 0 } +#editorial_block_center .rte p {color:#666 } + +#editorial_block_center p#editorial_image_legend { + margin: 0 0 10px; + padding:0; + color: #666; + font-size: 10px; +} + diff --git a/modules/envoimoinscher/envoimoinscher.php b/modules/envoimoinscher/envoimoinscher.php index 7a1790069..b3f74c468 100755 --- a/modules/envoimoinscher/envoimoinscher.php +++ b/modules/envoimoinscher/envoimoinscher.php @@ -494,7 +494,7 @@ class Envoimoinscher extends Module AND Configuration::updateValue('EMC_DELIVERY_STATE', Tools::getValue('EMC_DELIVERY_STATE'))) { $dataSync = (($emc_login = Configuration::get('EMC_LOGIN')) - ? '' : ''); + ? '' : ''); $this->_html .= $this->displayConfirmation($this->l('Configuration updated').$dataSync); } else diff --git a/modules/favoriteproducts/FavoriteProduct.php b/modules/favoriteproducts/FavoriteProduct.php index f1f4e9cf1..1005ab48f 100644 --- a/modules/favoriteproducts/FavoriteProduct.php +++ b/modules/favoriteproducts/FavoriteProduct.php @@ -4,10 +4,10 @@ * * NOTICE OF LICENSE * -* This source file is subject to the Academic Free License (AFL 3.0) +* 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/afl-3.0.php +* 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. @@ -21,7 +21,7 @@ * @author PrestaShop SA * @copyright 2007-2011 PrestaShop SA * @version Release: $Revision$ -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ @@ -112,4 +112,4 @@ class FavoriteProduct extends ObjectModel AND `id_product` = '.(int)($id_product).' AND `id_shop` = '.(int)($shop->getID())); } -} +} \ No newline at end of file diff --git a/modules/favoriteproducts/favoriteproducts-account.php b/modules/favoriteproducts/favoriteproducts-account.php index 432f53cd9..9dff31435 100644 --- a/modules/favoriteproducts/favoriteproducts-account.php +++ b/modules/favoriteproducts/favoriteproducts-account.php @@ -1,6 +1,6 @@ customer->isLogged()) Tools::redirect('authentication.php?back=modules/favoriteproducts/favoriteproducts.php'); - + include(dirname(__FILE__).'/../../header.php'); if ((int)Context::getContext()->customer->id) -{ +{ $smarty->assign('favoriteProducts', FavoriteProduct::getFavoriteProducts((int)Context::getContext()->customer->id, (int)Context::getContext()->language->id)); - $favoriteproducts = new FavoriteProducts(); - echo $favoriteproducts->display(dirname(__FILE__).'/favoriteproducts.php', 'favoriteproducts-account.tpl'); + echo Module::display(dirname(__FILE__).'/favoriteproducts.php', 'favoriteproducts-account.tpl'); } include(dirname(__FILE__).'/../../footer.php'); diff --git a/modules/favoriteproducts/favoriteproducts.css b/modules/favoriteproducts/favoriteproducts.css index 8de83dfa8..c7937f03a 100644 --- a/modules/favoriteproducts/favoriteproducts.css +++ b/modules/favoriteproducts/favoriteproducts.css @@ -1,3 +1,6 @@ +#module-favoriteproducts-favoriteproducts-account #left_column {display:none} +#module-favoriteproducts-favoriteproducts-account #center_column {width:757px} + #favoriteproducts_block_account .favoriteproduct { position:relative; margin-bottom: 14px; diff --git a/modules/favoriteproducts/favoriteproducts.php b/modules/favoriteproducts/favoriteproducts.php index 7402346e3..d1c81e271 100644 --- a/modules/favoriteproducts/favoriteproducts.php +++ b/modules/favoriteproducts/favoriteproducts.php @@ -48,6 +48,7 @@ class FavoriteProducts extends Module { if (!parent::install() OR !$this->registerHook('myAccountBlock') + OR !$this->registerHook('customerAccount') OR !$this->registerHook('extraLeft') OR !$this->registerHook('header')) return false; diff --git a/modules/favoriteproducts/my-account.tpl b/modules/favoriteproducts/my-account.tpl index 78e32989f..ed45a0941 100644 --- a/modules/favoriteproducts/my-account.tpl +++ b/modules/favoriteproducts/my-account.tpl @@ -24,4 +24,4 @@ * International Registered Trademark & Property of PrestaShop SA *} -
    • {l s='My favorite products' mod='favoriteproducts'}
    • +
    • {l s='My favorite products' mod='favoriteproducts'}
    • diff --git a/modules/fianetfraud/fianetfraud.php b/modules/fianetfraud/fianetfraud.php index 586a645fd..4eeacf960 100644 --- a/modules/fianetfraud/fianetfraud.php +++ b/modules/fianetfraud/fianetfraud.php @@ -194,7 +194,7 @@ class Fianetfraud extends Module if (!$error) { $dataSync = ((($site_id = Configuration::get('SAC_SITEID')) AND Configuration::get('SAC_PRODUCTION')) - ? '' + ? '' : '' ); $this->_html .= '
      '.$this->l('Settings are updated').$dataSync.'
      '; diff --git a/modules/fianetsceau/fianetsceau.php b/modules/fianetsceau/fianetsceau.php index ad69abba2..9a839c66e 100644 --- a/modules/fianetsceau/fianetsceau.php +++ b/modules/fianetsceau/fianetsceau.php @@ -81,7 +81,7 @@ class FianetSceau extends Module Configuration::updateValue('FIANET_SCEAU_PRIVATEKEY', Tools::getValue('FIANET_SCEAU_PRIVATEKEY')); if ((int)Tools::getValue('fia_net_mode')) - $dataSync = (($site_id = Configuration::get('FIANET_SCEAU_SITEID')) ? '' : 'toto'); + $dataSync = (($site_id = Configuration::get('FIANET_SCEAU_SITEID')) ? '' : 'toto'); else $dataSync = ''; return $this->_html .= $this->displayConfirmation($this->l('Configuration updated').$dataSync); } diff --git a/modules/hipay/hipay.php b/modules/hipay/hipay.php index 02f2b267c..8be233509 100644 --- a/modules/hipay/hipay.php +++ b/modules/hipay/hipay.php @@ -385,7 +385,7 @@ class Hipay extends PaymentModule } $i = 1; - $dataSync = 'http://api.prestashop.com/modules/hipay.png?mode='.($this->prod ? 'prod' : 'test'); + $dataSync = 'http://www.prestashop.com/modules/hipay.png?mode='.($this->prod ? 'prod' : 'test'); foreach ($accounts as $account => $null) $dataSync .= '&account'.($i++).'='.urlencode($account); @@ -612,7 +612,7 @@ class Hipay extends PaymentModule if (!is_array($this->arrayCategories)) { $this->arrayCategories = array(); - if ($xml = simplexml_load_string(file_get_contents('https://api.prestashop.com/partner/hipay/ws.php?site='.$hipaySiteId.'&accountId='.$hipayAccountId.($prod ? '&prod' : '')))) + if ($xml = simplexml_load_string(file_get_contents('https://www.prestashop.com/partner/hipay/ws.php?site='.$hipaySiteId.'&accountId='.$hipayAccountId.($prod ? '&prod' : '')))) { foreach ($xml->children() as $categoriesList) foreach ($categoriesList->children() as $category) diff --git a/modules/homefeatured/homefeatured.css b/modules/homefeatured/homefeatured.css new file mode 100644 index 000000000..c24c03155 --- /dev/null +++ b/modules/homefeatured/homefeatured.css @@ -0,0 +1,59 @@ +#featured-products_block_center li { + margin-right:10px; + padding:10px 0; + width:126px; +} +#featured-products_block_center li.last_item_of_line {margin-right:0;} +#featured-products_block_center h5 { + padding-top:5px; + height:30px; + font-size:12px; + color:#222 +} + +#featured-products_block_center .product_image { + display:block; + position:relative; + overflow:hidden +} +#featured-products_block_center .product_image span.new { + display: block; + position: absolute; + top: 15px; + right:-30px; + padding: 1px 4px; + width: 101px; + font-size:10px; + color: #fff; + text-align: center; + text-transform: uppercase; + -moz-transform: rotate(45deg); + -webkit-transform: rotate(45deg); + background-color: #990000 +} + +#featured-products_block_center .product_desc {height:45px;} +#featured-products_block_center .product_desc, +#featured-products_block_center .product_desc a { + color:#666 +} +#featured-products_block_center .lnk_more { + display:inline; + padding-right:10px; + font-weight:bold; + font-size:10px; + color:#0088cc; + background:url(../img/arrow_right_1.png) no-repeat 100% 3px; +} +#featured-products_block_center .price_container { + margin-top:10px; + padding:0; +} +#featured-products_block_center .price { + font-weight:bold; + font-size:14px; + color:#990000 +} +#featured-products_block_center li .ajax_add_to_cart_button {display:none;} +#featured-products_block_center li span.exclusive {display:none;} + diff --git a/modules/homefeatured/homefeatured.php b/modules/homefeatured/homefeatured.php index 9146b0897..9f6e06dea 100644 --- a/modules/homefeatured/homefeatured.php +++ b/modules/homefeatured/homefeatured.php @@ -90,7 +90,12 @@ class HomeFeatured extends Module return $output; } - function hookHome($params) + public function hookDisplayHeader($params) + { + $this->context->controller->addCss($this->_path.'homefeatured.css'); + } + + public function hookDisplayHome($params) { $category = new Category(Context::getContext()->shop->getCategory(), Configuration::get('PS_LANG_DEFAULT')); $nb = (int)(Configuration::get('HOME_FEATURED_NBR')); diff --git a/modules/homefeatured/homefeatured.tpl b/modules/homefeatured/homefeatured.tpl index b977fc076..f23d9b070 100644 --- a/modules/homefeatured/homefeatured.tpl +++ b/modules/homefeatured/homefeatured.tpl @@ -1,5 +1,5 @@ {* -* 2007-2011 PrestaShop +* 2007-2011 PrestaShop * * NOTICE OF LICENSE * @@ -19,33 +19,34 @@ * * @author PrestaShop SA * @copyright 2007-2011 PrestaShop SA -* @version Release: $Revision: 7465 $ +* @version Release: $Revision: 6594 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA *} -