[+] Project : default theme added

This commit is contained in:
mMarinetti
2011-12-02 15:24:40 +00:00
parent a2be24ee90
commit 7320307212
431 changed files with 21629 additions and 1679 deletions
+269 -10
View File
@@ -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), (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), (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), (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_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_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), * rightcolumn=6, leftcolumn=7, home=8, header=9, top=14,
(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); 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` ( CREATE TABLE `PREFIX_pagenotfound` (
`id_pagenotfound` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, `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 INSERT INTO `PREFIX_order_carrier` (`id_order`, `id_carrier`, `date_add`) VALUES
(1, 2, NOW()); (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;
+6 -5
View File
@@ -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), (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), (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), (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 INSERT INTO `PREFIX_configuration` (`id_configuration`, `name`, `value`, `date_add`, `date_upd`) VALUES
(1, 'PS_LANG_DEFAULT', '1', NOW(), NOW()), (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 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), (1, 'small', 45, 45, 1, 1, 1, 1, 0, 0),
(2, 'medium', 80, 80, 1, 1, 1, 1, 0, 1), (2, 'medium', 58, 58, 1, 1, 1, 1, 0, 1),
(3, 'large', 300, 300, 1, 1, 1, 1, 0, 0), (3, 'large', 264, 264, 1, 1, 1, 1, 0, 0),
(4, 'thickbox', 600, 600, 1, 0, 0, 0, 0, 0), (4, 'thickbox', 600, 600, 1, 0, 0, 0, 0, 0),
(5, 'category', 500, 150, 0, 1, 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), (7, 'large_scene', 556, 200, 0, 0, 0, 0, 1, 0),
(8, 'thumb_scene', 161, 58, 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_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_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 UPDATE `PREFIX_address_format` set `format`= 'firstname lastname
company company
+1 -1
View File
@@ -201,7 +201,7 @@ class authorizeAIM extends PaymentModule
public function hookHeader() 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');
} }
/** /**
-4
View File
@@ -204,7 +204,6 @@ class BankWire extends PaymentModule
$state = $params['objOrder']->getCurrentState(); $state = $params['objOrder']->getCurrentState();
if ($state == Configuration::get('PS_OS_BANKWIRE') OR $state == Configuration::get('PS_OS_OUTOFSTOCK')) if ($state == Configuration::get('PS_OS_BANKWIRE') OR $state == Configuration::get('PS_OS_OUTOFSTOCK'))
{
$this->context->smarty->assign(array( $this->context->smarty->assign(array(
'total_to_pay' => Tools::displayPrice($params['total_to_pay'], $params['currencyObj'], false), 'total_to_pay' => Tools::displayPrice($params['total_to_pay'], $params['currencyObj'], false),
'bankwireDetails' => Tools::nl2br($this->details), 'bankwireDetails' => Tools::nl2br($this->details),
@@ -213,9 +212,6 @@ class BankWire extends PaymentModule
'status' => 'ok', 'status' => 'ok',
'id_order' => $params['objOrder']->id 'id_order' => $params['objOrder']->id
)); ));
if (isset($params['objOrder']->reference) && !empty($params['objOrder']->reference))
$this->context->smarty->assign('reference', $params['objOrder']->reference);
}
else else
$this->context->smarty->assign('status', 'failed'); $this->context->smarty->assign('status', 'failed');
return $this->display(__FILE__, 'payment_return.tpl'); return $this->display(__FILE__, 'payment_return.tpl');
+1 -5
View File
@@ -32,11 +32,7 @@
<br /><br />- {l s='to the account owner of' mod='bankwire'} <span class="bold">{if $bankwireOwner}{$bankwireOwner}{else}___________{/if}</span> <br /><br />- {l s='to the account owner of' mod='bankwire'} <span class="bold">{if $bankwireOwner}{$bankwireOwner}{else}___________{/if}</span>
<br /><br />- {l s='with these details' mod='bankwire'} <span class="bold">{if $bankwireDetails}{$bankwireDetails}{else}___________{/if}</span> <br /><br />- {l s='with these details' mod='bankwire'} <span class="bold">{if $bankwireDetails}{$bankwireDetails}{else}___________{/if}</span>
<br /><br />- {l s='to this bank' mod='bankwire'} <span class="bold">{if $bankwireAddress}{$bankwireAddress}{else}___________{/if}</span> <br /><br />- {l s='to this bank' mod='bankwire'} <span class="bold">{if $bankwireAddress}{$bankwireAddress}{else}___________{/if}</span>
{if !isset($reference)} <br /><br />- {l s='Do not forget to insert your order #' mod='bankwire'} <span class="bold">{$id_order}</span> {l s='in the subject of your bank wire' mod='bankwire'}
<br /><br />- {l s='Do not forget to insert your order number #' mod='bankwire'} <span class="bold">{$id_order}</span> {l s='in the subject of your bank wire' mod='bankwire'}
{else}
<br /><br />- {l s='Do not forget to insert your order reference' mod='bankwire'} <span class="bold">{$reference}</span> {l s='in the subject of your bank wire' mod='bankwire'}
{/if}
<br /><br />{l s='An e-mail has been sent to you with this information.' mod='bankwire'} <br /><br />{l s='An e-mail has been sent to you with this information.' mod='bankwire'}
<br /><br /><span class="bold">{l s='Your order will be sent as soon as we receive your settlement.' mod='bankwire'}</span> <br /><br /><span class="bold">{l s='Your order will be sent as soon as we receive your settlement.' mod='bankwire'}</span>
<br /><br />{l s='For any questions or for further information, please contact our' mod='bankwire'} <a href="{$link->getPageLink('contact', true)}">{l s='customer support' mod='bankwire'}</a>. <br /><br />{l s='For any questions or for further information, please contact our' mod='bankwire'} <a href="{$link->getPageLink('contact', true)}">{l s='customer support' mod='bankwire'}</a>.
@@ -0,0 +1,2 @@
/* Block advertising */
.advertising_block { width: 191px; margin-bottom: 1em; text-align: center }
@@ -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}
+14 -8
View File
@@ -30,15 +30,21 @@
<div class="block_content"> <div class="block_content">
{if $best_sellers|@count > 0} {if $best_sellers|@count > 0}
<ul class="product_images"> <ul class="product_images">
<li><a href="{$best_sellers.0.link}" title="{$best_sellers.0.legend|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($best_sellers.0.link_rewrite, $best_sellers.0.id_image, 'medium')}" height="{$mediumSize.height}" width="{$mediumSize.width}" alt="{$best_sellers.0.legend|escape:'htmlall':'UTF-8'}" /></a></li> {foreach from=$best_sellers item=product name=myLoop}
{if $best_sellers|@count > 1}<li><a href="{$best_sellers.1.link}" title="{$best_sellers.1.legend|escape:'htmlall':'UTF-8'}"><img src="{$link->getImageLink($best_sellers.1.link_rewrite, $best_sellers.1.id_image, 'medium')}" height="{$mediumSize.height}" width="{$mediumSize.width}" alt="{$best_sellers.1.legend|escape:'htmlall':'UTF-8'}" /></a></li>{/if} <li class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if} clearfix">
</ul> <a href="{$product.link}" title="{$product.legend|escape:'htmlall':'UTF-8'}" class="content_img clearfix">
<dl> <span class="number">{$smarty.foreach.myLoop.iteration}</span>
{foreach from=$best_sellers item=product name=myLoop} <img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'small')}" height="{$smallSize.height}" width="{$smallSize.width}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" />
<dt class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}"><a href="{$product.link}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|strip_tags:'UTF-8'|escape:'htmlall':'UTF-8'}</a></dt>
</a>
<p><a href="{$product.link}" title="{$product.legend|escape:'htmlall':'UTF-8'}">
{$product.name|strip_tags:'UTF-8'|escape:'htmlall':'UTF-8'}<br />
<span class="price">{$product.price}</span>
</a></p>
</li>
{/foreach} {/foreach}
</dl> </ul>
<p><a href="{$link->getPageLink('best-sales')}" title="{l s='All best sellers' mod='blockbestsellers'}" class="button_large">{l s='All best sellers' mod='blockbestsellers'}</a></p> <p class="lnk"><a href="{$link->getPageLink('best-sales')}" title="{l s='All best sellers' mod='blockbestsellers'}" class="button_large">&raquo; {l s='All best sellers' mod='blockbestsellers'}</a></p>
{else} {else}
<p>{l s='No best sellers at this time' mod='blockbestsellers'}</p> <p>{l s='No best sellers at this time' mod='blockbestsellers'}</p>
{/if} {/if}
+71 -78
View File
@@ -19,7 +19,7 @@
* *
* @author PrestaShop SA <contact@prestashop.com> * @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 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) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*/ */
@@ -89,20 +89,18 @@ var ajaxCart = {
// try to expand the cart // try to expand the cart
expand : function(){ 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')) $('#cart_block #cart_block_summary').slideUp(200, function(){
{
$('#'+parentId+' #cart_block #cart_block_summary').slideUp(200, function(){
$(this).addClass('collapsed').removeClass('expanded'); $(this).addClass('collapsed').removeClass('expanded');
$('#'+parentId+' #cart_block #cart_block_list').slideDown({ $('#cart_block #cart_block_list').slideDown({
duration: 600, duration: 600,
complete: function(){$(this).addClass('expanded').removeClass('collapsed');} complete: function(){$(this).addClass('expanded').removeClass('collapsed');}
}); });
}); });
// toogle the button expand/collapse button // toogle the button expand/collapse button
$('#'+parentId+' #cart_block h4 span#block_cart_expand').fadeOut('slow', function(){ $('#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_collapse').fadeIn('fast');
}); });
// save the expand statut in the user cookie // save the expand statut in the user cookie
@@ -112,8 +110,9 @@ var ajaxCart = {
async: true, async: true,
data: 'ajax_blockcart_display=expand' + '&rand=' + new Date().getTime() data: 'ajax_blockcart_display=expand' + '&rand=' + new Date().getTime()
}); });
} }
});
}, },
// cart to fix display when using back and previous browsers buttons // cart to fix display when using back and previous browsers buttons
refresh : function(){ refresh : function(){
@@ -137,6 +136,7 @@ var ajaxCart = {
// try to collapse the cart // try to collapse the cart
collapse : function(){ collapse : function(){
if ($('#cart_block #cart_block_list').hasClass('expanded')) if ($('#cart_block #cart_block_list').hasClass('expanded'))
{ {
$('#cart_block #cart_block_list').slideUp('slow', function(){ $('#cart_block #cart_block_list').slideUp('slow', function(){
@@ -215,7 +215,7 @@ var ajaxCart = {
$picture.css({'position': 'absolute', 'top': pictureOffsetOriginal.top, 'left': pictureOffsetOriginal.left}); $picture.css({'position': 'absolute', 'top': pictureOffsetOriginal.top, 'left': pictureOffsetOriginal.left});
var pictureOffset = $picture.offset(); var pictureOffset = $picture.offset();
var cartBlockOffset = $('#cart_block').offset(); var cartBlockOffset = $('#shopping_cart').offset();
// Check if the block cart is activated for the animation // Check if the block cart is activated for the animation
if (cartBlockOffset != undefined && $picture.size()) 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 //hide the products displayed in the page but no more in the json data
hideOldProducts : function(jsonData) { 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!) //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) if($('#cart_block #cart_block_list dl.products').length > 0)
{ {
@@ -272,8 +270,7 @@ var ajaxCart = {
var removedProductData = null; var removedProductData = null;
var removedProductDomId = null; var removedProductDomId = null;
//look for a product to delete... //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 //retrieve idProduct and idCombination from the displayed product in the block cart
var domIdProduct = $(this).attr('id'); var domIdProduct = $(this).attr('id');
var firstCut = domIdProduct.replace('cart_block_product_', ''); var firstCut = domIdProduct.replace('cart_block_product_', '');
@@ -298,6 +295,7 @@ var ajaxCart = {
removedProductId = $(this).attr('id'); removedProductId = $(this).attr('id');
//return false; // Regarding that the customer can only remove products one by one, we break the loop //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 there is a removed product, delete it from the displayed block cart
if (removedProductId != null) if (removedProductId != null)
@@ -305,52 +303,48 @@ var ajaxCart = {
var firstCut = removedProductId.replace('cart_block_product_', ''); var firstCut = removedProductId.replace('cart_block_product_', '');
var ids = firstCut.split('_'); var ids = firstCut.split('_');
$('#'+parentId+' #'+removedProductId).addClass('strike').fadeTo('slow', 0, function(){ $('#'+removedProductId).addClass('strike').fadeTo('slow', 0, function(){
$(this).slideUp('slow', function(){ $(this).slideUp('slow', function(){
$(this).remove(); $(this).remove();
//if the cart is now empty, show the 'no product in the cart' message //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'); $('p#cart_block_no_products:hidden').slideDown('fast');
$('#'+parentId+' div#cart_block dl.products').remove(); $('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).slideUp('fast', function(){
$(this).remove(); $(this).remove();
}); });
}); });
} }
});
} }
});
}, },
hideOldProductCustomizations : function (product, domIdProduct) 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']); $(customizationList).find("li").each(function(){
if(customizationList.length > 0) $(this).find("div").each(function() {
{ var customizationDiv = $(this).attr('id');
$(customizationList).find("li").each(function(){ var tmp = customizationDiv.replace('deleteCustomizableProduct_', '');
$(this).find("div").each(function() { var ids = tmp.split('_');
var customizationDiv = $(this).attr('id'); if ((parseInt(product.idCombination) == parseInt(ids[2])) && !ajaxCart.doesCustomizationStillExist(product, ids[0]))
var tmp = customizationDiv.replace('deleteCustomizableProduct_', ''); $('#' + customizationDiv).parent().addClass('strike').fadeTo('slow', 0, function(){
var ids = tmp.split('_'); $(this).slideUp('slow');
if ((parseInt(product.idCombination) == parseInt(ids[2])) && !ajaxCart.doesCustomizationStillExist(product, ids[0])) $(this).remove();
$('#' + 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) var removeLinks = $('#cart_block_product_' + domIdProduct).find('a.ajax_cart_block_remove_link');
$('#'+parentId+' #' + domIdProduct + ' span.remove_link').html('<a class="ajax_cart_block_remove_link" rel="nofollow" href="' + baseDir + 'index.php?controller=cart&amp;delete&amp;id_product=' + product['id'] + '&amp;ipa=' + product['idCombination'] + '&amp;token=' + static_token + '" title="' + removingLinkText + '"> </a>'); if (!product.hasCustomizedDatas && !removeLinks.length)
}); $('#' + domIdProduct + ' span.remove_link').html('<a class="ajax_cart_block_remove_link" rel="nofollow" href="' + baseDir + 'index.php?controller=cart&amp;delete&amp;id_product=' + product['id'] + '&amp;ipa=' + product['idCombination'] + '&amp;token=' + static_token + '"> </a>');
}, },
doesCustomizationStillExist : function (product, customizationId) doesCustomizationStillExist : function (product, customizationId)
@@ -399,9 +393,7 @@ var ajaxCart = {
// Update product quantity // Update product quantity
updateProductQuantity : function (product, quantity) { updateProductQuantity : function (product, quantity) {
$(['left_column', 'right_column']).each(function(id, parentId) $('dt#cart_block_product_' + product.id + (product.idCombination ? '_' + product.idCombination : '') + ' .quantity').fadeTo('fast', 0, function() {
{
$('#'+parentId+' dt#cart_block_product_' + product.id + (product.idCombination ? '_' + product.idCombination : '') + ' .quantity').fadeTo('fast', 0, function() {
$(this).text(quantity); $(this).text(quantity);
$(this).fadeTo('fast', 1, function(){ $(this).fadeTo('fast', 1, function(){
$(this).fadeTo('fast', 0, function(){ $(this).fadeTo('fast', 0, function(){
@@ -413,29 +405,27 @@ var ajaxCart = {
}); });
}); });
}); });
});
}, },
//display the products witch are in json data but not already displayed //display the products witch are in json data but not already displayed
displayNewProducts : function(jsonData) { displayNewProducts : function(jsonData) {
$(['left_column', 'right_column']).each(function(id, parentId)
{
//add every new products or update displaying of every updated products //add every new products or update displaying of every updated products
$(jsonData.products).each(function(){ $(jsonData.products).each(function(){
//fix ie6 bug (one more item 'undefined' in IE6) //fix ie6 bug (one more item 'undefined' in IE6)
if (this.id != undefined) 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) //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) if ($('div#cart_block dl.products').length == 0)
$('#'+parentId+' p#cart_block_no_products').fadeTo('fast', 0, function(){ {
$(this).slideUp('fast').fadeTo(0, 1); $('p#cart_block_no_products').before('<dl class="products"></dl>');
}).before('<dl class="products"></dl>'); $('p#cart_block_no_products').hide();
}
//if product is not in the displayed cart, add a new product's line //if product is not in the displayed cart, add a new product's line
var domIdProduct = this.id + (this.idCombination ? '_' + this.idCombination : ''); var domIdProduct = this.id + (this.idCombination ? '_' + this.idCombination : '');
var domIdProductAttribute = this.id + '_' + (this.idCombination ? this.idCombination : '0'); 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 productId = parseInt(this.id);
var productAttributeId = (this.hasAttributes ? parseInt(this.attributes) : 0); var productAttributeId = (this.hasAttributes ? parseInt(this.attributes) : 0);
@@ -451,53 +441,51 @@ var ajaxCart = {
if (this.hasCustomizedDatas) if (this.hasCustomizedDatas)
content += ajaxCart.displayNewCustomizedDatas(this); content += ajaxCart.displayNewCustomizedDatas(this);
if (this.hasAttributes) content += '</dd>'; if (this.hasAttributes) content += '</dd>';
$('#'+parentId+' #cart_block dl.products').append(content);
$('#cart_block dl.products').append(content);
} }
//else update the product's line //else update the product's line
else{ else{
var jsonProduct = this; 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 // 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); ajaxCart.updateProductQuantity(jsonProduct, jsonProduct.quantity);
// Customized product // Customized product
if (jsonProduct.hasCustomizedDatas) if (jsonProduct.hasCustomizedDatas)
{ {
customizationFormatedDatas = ajaxCart.displayNewCustomizedDatas(jsonProduct); customizationFormatedDatas = ajaxCart.displayNewCustomizedDatas(jsonProduct);
if (!$('#'+parentId+' #cart_block ul#customization_' + domIdProductAttribute).length) if (!$('#cart_block ul#customization_' + domIdProductAttribute).length)
{ {
if (jsonProduct.hasAttributes) 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 else
$('#'+parentId+' #cart_block dl.products').append(customizationFormatedDatas); $('#cart_block dl.products').append(customizationFormatedDatas);
} }
else 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) if (this.hasCustomizedDatas && removeLinks.length)
$(removeLinks).each(function() { $(removeLinks).each(function() {
$(this).remove(); $(this).remove();
}); });
} }
}); });
});
}, },
displayNewCustomizedDatas : function(product) displayNewCustomizedDatas : function(product)
{ {
$(['left_column', 'right_column']).each(function(id, parentId)
{
var content = ''; var content = '';
var productId = parseInt(product.id); var productId = parseInt(product.id);
var productAttributeId = typeof(product.idCombination) == 'undefined' ? 0 : parseInt(product.idCombination); 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) if (!hasAlreadyCustomizations)
{ {
@@ -510,7 +498,7 @@ var ajaxCart = {
customizationId = parseInt(this.customizationId); customizationId = parseInt(this.customizationId);
productAttributeId = typeof(product.idCombination) == 'undefined' ? 0 : parseInt(product.idCombination); productAttributeId = typeof(product.idCombination) == 'undefined' ? 0 : parseInt(product.idCombination);
// If the customization is already displayed on the cart, no update's needed // 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 (''); return ('');
content += '<li name="customization"><div class="deleteCustomizableProduct" id="deleteCustomizableProduct_' + customizationId + '_' + productId + '_' + (productAttributeId ? productAttributeId : '0') + '"><a rel="nofollow" class="ajax_cart_block_remove_link" href="' + baseDir + 'index.php?controller=cart&amp;delete&amp;id_product=' + productId + '&amp;ipa=' + productAttributeId + '&amp;id_customization=' + customizationId + '&amp;token=' + static_token + '"> </a></div><span class="quantity-formated"><span class="quantity">' + parseInt(this.quantity) + '</span>x</span>'; content += '<li name="customization"><div class="deleteCustomizableProduct" id="deleteCustomizableProduct_' + customizationId + '_' + productId + '_' + (productAttributeId ? productAttributeId : '0') + '"><a rel="nofollow" class="ajax_cart_block_remove_link" href="' + baseDir + 'index.php?controller=cart&amp;delete&amp;id_product=' + productId + '&amp;ipa=' + productAttributeId + '&amp;id_customization=' + customizationId + '&amp;token=' + static_token + '"> </a></div><span class="quantity-formated"><span class="quantity">' + parseInt(this.quantity) + '</span>x</span>';
@@ -536,8 +524,8 @@ var ajaxCart = {
// Field cleaning // Field cleaning
if (customizationId) if (customizationId)
{ {
$('#'+parentId+' #uploadable_files li div.customizationUploadBrowse img').remove(); $('#uploadable_files li div.customizationUploadBrowse img').remove();
$('#'+parentId+' #text_fields li input').attr('value', ''); $('#text_fields li input').attr('value', '');
} }
}); });
@@ -547,7 +535,6 @@ var ajaxCart = {
if (!product.hasAttributes) content += '</dd>'; if (!product.hasAttributes) content += '</dd>';
} }
return (content); return (content);
});
}, },
@@ -571,13 +558,10 @@ var ajaxCart = {
ajaxCart.refreshVouchers(jsonData); ajaxCart.refreshVouchers(jsonData);
//update 'first' and 'last' item classes //update 'first' and 'last' item classes
$(['left_column', 'right_column']).each(function(id, parentId) $('#cart_block dl.products dt').removeClass('first_item').removeClass('last_item').removeClass('item');
{ $('#cart_block dl.products dt:first').addClass('first_item');
$('#'+parentId+' #cart_block dl.products dt').removeClass('first_item').removeClass('last_item').removeClass('item'); $('#cart_block dl.products dt:not(:first,:last)').addClass('item');
$('#'+parentId+' #cart_block dl.products dt:first').addClass('first_item'); $('#cart_block dl.products dt:last').addClass('last_item');
$('#'+parentId+' #cart_block dl.products dt:not(:first,:last)').addClass('item');
$('#'+parentId+' #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) //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(); ajaxCart.overrideButtonsInThePage();
@@ -630,9 +614,9 @@ var ajaxCart = {
} }
}; };
//when document is loaded... //when document is loaded...
$(document).ready(function(){ $(document).ready(function(){
// expand/collapse management // expand/collapse management
$('#block_cart_collapse').click(function(){ $('#block_cart_collapse').click(function(){
ajaxCart.collapse(); ajaxCart.collapse();
@@ -642,5 +626,14 @@ $(document).ready(function(){
}); });
ajaxCart.overrideButtonsInThePage(); ajaxCart.overrideButtonsInThePage();
ajaxCart.refresh(); 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);
});
}); });
+97
View File
@@ -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
}
+1
View File
@@ -93,6 +93,7 @@ class BlockCart extends Module
'wrapping_cost' => Tools::displayPrice($wrappingCost, $currency), 'wrapping_cost' => Tools::displayPrice($wrappingCost, $currency),
'product_total' => Tools::displayPrice($params['cart']->getOrderTotal($useTax, Cart::BOTH_WITHOUT_SHIPPING), $currency), 'product_total' => Tools::displayPrice($params['cart']->getOrderTotal($useTax, Cart::BOTH_WITHOUT_SHIPPING), $currency),
'total' => Tools::displayPrice($totalToPay, $currency), 'total' => Tools::displayPrice($totalToPay, $currency),
'id_carrier' => (int)($params['cart']->id_carrier),
'order_process' => Configuration::get('PS_ORDER_PROCESS_TYPE') ? 'order-opc' : 'order', 'order_process' => Configuration::get('PS_ORDER_PROCESS_TYPE') ? 'order-opc' : 'order',
'ajax_allowed' => (int)(Configuration::get('PS_BLOCK_CART_AJAX')) == 1 ? true : false 'ajax_allowed' => (int)(Configuration::get('PS_BLOCK_CART_AJAX')) == 1 ? true : false
)); ));
+7 -10
View File
@@ -19,7 +19,7 @@
* *
* @author PrestaShop SA <contact@prestashop.com> * @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 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) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * 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} {assign var='productAttributeId' value=$product.id_product_attribute}
<dt id="cart_block_product_{$product.id_product}{if $product.id_product_attribute}_{$product.id_product_attribute}{/if}" class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}"> <dt id="cart_block_product_{$product.id_product}{if $product.id_product_attribute}_{$product.id_product_attribute}{/if}" class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}">
<span class="quantity-formated"><span class="quantity">{$product.cart_quantity}</span>x</span> <span class="quantity-formated"><span class="quantity">{$product.cart_quantity}</span>x</span>
<a class="cart_block_product_name" href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category, null, null, $product.id_shop, $product.id_product_attribute)}" title="{$product.name|escape:html:'UTF-8'}"> <a class="cart_block_product_name" href="{$link->getProductLink($product)}" title="{$product.name|escape:html:'UTF-8'}">
{$product.name|truncate:13:'...'|escape:html:'UTF-8'}</a> {$product.name|truncate:13:'...'|escape:html:'UTF-8'}</a>
<span class="remove_link">{if !isset($blockcart_customizedDatas.$productId.$productAttributeId)}<a rel="nofollow" class="ajax_cart_block_remove_link" href="{$link->getPageLink('cart', true, NULL, "delete&amp;id_product={$product.id_product}&amp;ipa={$product.id_product_attribute}&amp;token={$static_token}")}" title="{l s='remove this product from my cart' mod='blockcart'}">&nbsp;</a>{/if}</span> <span class="remove_link">{if !isset($blockcart_customizedDatas.$productId.$productAttributeId)}<a rel="nofollow" class="ajax_cart_block_remove_link" href="{$link->getPageLink('cart', true, NULL, "delete&amp;id_product={$product.id_product}&amp;ipa={$product.id_product_attribute}&amp;token={$static_token}")}" title="{l s='remove this product from my cart' mod='blockcart'}">&nbsp;</a>{/if}</span>
<span class="price">{if $priceDisplay == $smarty.const.PS_TAX_EXC}{displayWtPrice p="`$product.total`"}{else}{displayWtPrice p="`$product.total_wt`"}{/if}</span> <span class="price">{if $priceDisplay == $smarty.const.PS_TAX_EXC}{displayWtPrice p="`$product.total`"}{else}{displayWtPrice p="`$product.total_wt`"}{/if}</span>
</dt> </dt>
{if isset($product.attributes_small)} {if isset($product.attributes_small)}
<dd id="cart_block_combination_of_{$product.id_product}{if $product.id_product_attribute}_{$product.id_product_attribute}{/if}" class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}"> <dd id="cart_block_combination_of_{$product.id_product}{if $product.id_product_attribute}_{$product.id_product_attribute}{/if}" class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}">
<a href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category, null, null, $product.id_shop, $product.id_product_attribute)}" title="{l s='Product detail'}">{$product.attributes_small}</a> <a href="{$link->getProductLink($product)}" title="{l s='Product detail'}">{$product.attributes_small}</a>
{/if} {/if}
<!-- Customizable datas --> <!-- Customizable datas -->
{if isset($blockcart_customizedDatas.$productId.$productAttributeId)} {if isset($customizedDatas.$productId.$productAttributeId)}
{if !isset($product.attributes_small)}<dd id="cart_block_combination_of_{$product.id_product}{if $product.id_product_attribute}_{$product.id_product_attribute}{/if}" class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}">{/if} {if !isset($product.attributes_small)}<dd id="cart_block_combination_of_{$product.id_product}{if $product.id_product_attribute}_{$product.id_product_attribute}{/if}" class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}">{/if}
<ul class="cart_block_customizations" id="customization_{$productId}_{$productAttributeId}"> <ul class="cart_block_customizations" id="customization_{$productId}_{$productAttributeId}">
{foreach from=$blockcart_customizedDatas.$productId.$productAttributeId[$product.id_address_delivery] key='id_customization' item='customization' name='customizations'} {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'
<tr class="bloc_cart_voucher" id="bloc_cart_voucher_{$discount.id_discount}"> <tr class="bloc_cart_voucher" id="bloc_cart_voucher_{$discount.id_discount}">
<td class="name" title="{$discount.description}">{$discount.name|cat:' : '|cat:$discount.description|truncate:18:'...'|escape:'htmlall':'UTF-8'}</td> <td class="name" title="{$discount.description}">{$discount.name|cat:' : '|cat:$discount.description|truncate:18:'...'|escape:'htmlall':'UTF-8'}</td>
<td class="price">-{if $discount.value_real != '!'}{if $priceDisplay == 1}{convertPrice price=$discount.value_tax_exc}{else}{convertPrice price=$discount.value_real}{/if}{/if}</td> <td class="price">-{if $discount.value_real != '!'}{if $priceDisplay == 1}{convertPrice price=$discount.value_tax_exc}{else}{convertPrice price=$discount.value_real}{/if}{/if}</td>
<td class="delete"><a href="{$link->getPageLink("$blockcart_order_process", true, NULL, "deleteDiscount={$discount.id_discount}")}" title="{l s='Delete'}"><img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" width="11" height="13" class="icon" /></a></td> <td class="delete"><a href="{$link->getPageLink("$blockcart_order_process.php", true)}?deleteDiscount={$discount.id_discount}" title="{l s='Delete'}"><img src="{$img_dir}icon/delete.gif" alt="{l s='Delete'}" width="11" height="13" class="icon" /></a></td>
</tr> </tr>
{/foreach} {/foreach}
</tbody> </tbody>
@@ -141,11 +141,8 @@ var removingLinkText = '{l s='remove this product from my cart' mod='blockcart'
{/if} {/if}
{/if} {/if}
<p id="cart-buttons"> <p id="cart-buttons">
{capture name=step_order_process} {if $blockcart_order_process == 'order'}<a href="{$link->getPageLink("$blockcart_order_process.php", true)}" class="button_small" title="{l s='Cart' mod='blockcart'}">{l s='Cart' mod='blockcart'}</a>{/if}
{if $blockcart_order_process == 'order'}step=1{/if} <a href="{$link->getPageLink("$blockcart_order_process.php", true)}{if $blockcart_order_process == 'order'}?step=1{/if}" id="button_order_cart" class="exclusive{if $blockcart_order_process == 'order-opc'}_large{/if}" title="{l s='Check out' mod='blockcart'}"><span></span>{l s='Check out' mod='blockcart'}</a>
{/capture}
{if $blockcart_order_process == 'order'}<a href="{$link->getPageLink("$blockcart_order_process", true)}" class="button_small" title="{l s='Cart' mod='blockcart'}">{l s='Cart' mod='blockcart'}</a>{/if}
<a href="{$link->getPageLink("$blockcart_order_process", true, NULL, "{$smarty.capture.step_order_process}")}" id="button_order_cart" class="exclusive{if $blockcart_order_process == 'order-opc'}_large{/if}" title="{l s='Check out' mod='blockcart'}">{l s='Check out' mod='blockcart'}</a>
</p> </p>
</div> </div>
</div> </div>
@@ -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}
Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

+11
View File
@@ -0,0 +1,11 @@
/* footer */
#footer .block_various_links {padding:15px 10px;}
/* Block CMS links */
.informations_block_left li {border-bottom:1px dotted #eee}
.informations_block_left li.last { border:none;}
.informations_block_left li a {
display:block;
padding:7px 11px 5px 22px;
color:#333;
}
+17 -15
View File
@@ -19,7 +19,7 @@
* *
* @author PrestaShop SA <contact@prestashop.com> * @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA * @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision: 7471 $ * @version Release: $Revision: 6594 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
@@ -45,20 +45,22 @@
<!-- /Block CMS module --> <!-- /Block CMS module -->
{else} {else}
<!-- MODULE Block footer --> <!-- MODULE Block footer -->
<ul class="block_various_links" id="block_various_links_footer"> <div class="block_various_links" id="block_various_links_footer">
{if !$PS_CATALOG_MODE}<li class="first_item"><a href="{$link->getPageLink('prices-drop')}" title="{l s='Specials' mod='blockcms'}">{l s='Specials' mod='blockcms'}</a></li>{/if} <h4>{l s='Informations' mod='blockcms'}</h4>
<li class="{if $PS_CATALOG_MODE}first_{/if}item"><a href="{$link->getPageLink('new-products')}" title="{l s='New products' mod='blockcms'}">{l s='New products' mod='blockcms'}</a></li> <ul>
{if !$PS_CATALOG_MODE}<li class="item"><a href="{$link->getPageLink('best-sales')}" title="{l s='Top sellers' mod='blockcms'}">{l s='Top sellers' mod='blockcms'}</a></li>{/if} {if !$PS_CATALOG_MODE}<li class="first_item"><a href="{$link->getPageLink('prices-drop')}" title="{l s='Specials' mod='blockcms'}">{l s='Specials' mod='blockcms'}</a></li>{/if}
{if $blockcms_display_stores_footer}<li class="item"><a href="{$link->getPageLink('stores')}" title="{l s='Our stores' mod='blockcms'}">{l s='Our stores' mod='blockcms'}</a></li>{/if} <li class="{if $PS_CATALOG_MODE}first_{/if}item"><a href="{$link->getPageLink('new-products')}" title="{l s='New products' mod='blockcms'}">{l s='New products' mod='blockcms'}</a></li>
<li class="item"><a href="{$link->getPageLink('contact', true)}" title="{l s='Contact us' mod='blockcms'}">{l s='Contact us' mod='blockcms'}</a></li> {if !$PS_CATALOG_MODE}<li class="item"><a href="{$link->getPageLink('best-sales')}" title="{l s='Top sellers' mod='blockcms'}">{l s='Top sellers' mod='blockcms'}</a></li>{/if}
{foreach from=$blockcms_cmslinks item=cmslink} {if $blockcms_display_stores_footer}<li class="item"><a href="{$link->getPageLink('stores')}" title="{l s='Our stores' mod='blockcms'}">{l s='Our stores' mod='blockcms'}</a></li>{/if}
{if $cmslink.meta_title != ''} <li class="item"><a href="{$link->getPageLink('contact-form', true)}" title="{l s='Contact us' mod='blockcms'}">{l s='Contact us' mod='blockcms'}</a></li>
<li class="item"><a href="{$cmslink.link|addslashes}" title="{$cmslink.meta_title|escape:'htmlall':'UTF-8'}">{$cmslink.meta_title|escape:'htmlall':'UTF-8'}</a></li> {foreach from=$blockcms_cmslinks item=cmslink}
{/if} {if $cmslink.meta_title != ''}
{/foreach} <li class="item"><a href="{$cmslink.link|addslashes}" title="{$cmslink.meta_title|escape:'htmlall':'UTF-8'}">{$cmslink.meta_title|escape:'htmlall':'UTF-8'}</a></li>
{if $blockcms_display_poweredby}<li class="last_item">{l s='Powered by' mod='blockcms'} <a href="http://www.prestashop.com">PrestaShop</a>&trade;</li>{/if} {/if}
</ul> {/foreach}
{if $blockcms_display_poweredby}<li class="last_item">{l s='Powered by' mod='blockcms'} <a href="http://www.prestashop.com">PrestaShop</a>&trade;</li>{/if}
</ul>
{$blockcms_footer_text} {$blockcms_footer_text}
</div>
<!-- /MODULE Block footer --> <!-- /MODULE Block footer -->
{/if} {/if}
+31
View File
@@ -0,0 +1,31 @@
/* block CONTACT ******************************************************************************* */
#contact_block .block_content {
padding:10px 0 15px 0;
background: url(img/block_contact_bg.jpg) no-repeat left 50px transparent
}
#contact_block p {
padding:0 5px 15px 5px;
font-size: 13px;
line-height: 18px
}
#contact_block p.tel {
margin:0 0 0 60px;
padding-left: 26px;
font: bold 12px/20px Arial,Verdana,sans-serif;
background: url(img/block_contact_pict_tel.png) no-repeat 0 0 transparent
}
#contact_block a {
display:block;
margin-left:60px;
padding:6px 8px;
font:bold 10px Arial,Verdana,sans-serif;
color:#fff;
text-shadow:0 -1px 0 #000;
text-transform:uppercase;
-moz-border-radius:3px;
-webkit-border-radius:3px;
border-radius:3px;
background:url(img/bloc_contact_a_bg.png) repeat-x 0 0 #000
}
#contact_block a:hover {text-decoration:none}
+21 -13
View File
@@ -1,13 +1,13 @@
<?php <?php
/* /*
* 2007-2011 PrestaShop * 2007-2010 PrestaShop
* *
* NOTICE OF LICENSE * 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. * that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL: * 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 * 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 * obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately. * to license@prestashop.com so we can send you a copy immediately.
@@ -18,10 +18,10 @@
* versions in the future. If you wish to customize PrestaShop for your * versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information. * needs please refer to http://www.prestashop.com for more information.
* *
* @author PrestaShop SA <contact@prestashop.com> * @author Prestashop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA * @copyright 2007-2010 Prestashop SA
* @version Release: $Revision: 6844 $ * @version Release: $Revision: 1.4 $
* @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 * International Registered Trademark & Property of PrestaShop SA
*/ */
@@ -44,7 +44,7 @@ class blockcontact extends Module
public function install() public function install()
{ {
return (parent::install() AND Configuration::updateValue('blockcontact_telnumber', '') AND Configuration::updateValue('blockcontact_email', '') AND $this->registerHook('rightColumn')); return (parent::install() AND Configuration::updateValue('blockcontact_telnumber', '') AND Configuration::updateValue('blockcontact_email', '') AND $this->registerHook('rightColumn') && $this->registerHook('header'));
} }
public function uninstall() public function uninstall()
@@ -66,19 +66,27 @@ class blockcontact extends Module
return ' return '
<h2>'.$this->displayName.'</h2> <h2>'.$this->displayName.'</h2>
<form action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" method="post"> <form action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" method="post">
<fieldset> <fieldset class="width2">
<label for="telnumber">'.$this->l('Telephone number : ').'</label> <label for="telnumber">'.$this->l('Telephone number : ').'</label>
<input type="text" id="telnumber" name="telnumber" value="'.((Configuration::get('blockcontact_telnumber') != "") ? Configuration::get('blockcontact_telnumber') : "").'" /> <input type="text" id="telnumber" name="telnumber" value="'.((Configuration::get('blockcontact_telnumber') != "") ? Configuration::get('blockcontact_telnumber') : "").'" />
<div class="clear">&nbsp;</div> <div class="clear">&nbsp;</div>
<label for="email">'.$this->l('Email : ').'</label> <label for="email">'.$this->l('Email : ').'</label>
<input type="text" id="email" name="email" value="'.((Configuration::get('blockcontact_email') != "") ? Configuration::get('blockcontact_email') : "").'" /> <input type="text" id="email" name="email" value="'.((Configuration::get('blockcontact_email') != "") ? Configuration::get('blockcontact_email') : "").'" />
<div class="clear">&nbsp;</div> <div class="clear">&nbsp;</div>
<div class="margin-form"> <br /><center><input type="submit" name="submitModule" value="'.$this->l('Update settings').'" class="button" /></center>
<input type="submit" name="submitModule" value="'.$this->l('Update settings').'" class="button" /></center>
</div>
</fieldset> </fieldset>
</form> </form>
'; <div class="clear">&nbsp;</div>
<fieldset>
<legend>Addons</legend>
'.$this->l('This module has been developped by PrestaShop and can only be sold through').' <a href="http://addons.prestashop.com">addons.prestashop.com</a>.<br />
'.$this->l('Please report all bugs to').' <a href="mailto:addons@prestashop.com">addons@prestashop.com</a> '.$this->l('or using our').' <a href="http://addons.prestashop.com/contact-form.php">'.$this->l('contact form').'</a>.
</fieldset>';
}
public function hookHeader()
{
$this->context->controller->addCSS(($this->_path).'blockcontact.css', 'all');
} }
public function hookRightColumn() public function hookRightColumn()
Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 B

@@ -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;}
+28 -18
View File
@@ -1,13 +1,13 @@
<?php <?php
/* /*
* 2007-2011 PrestaShop * 2007-2010 PrestaShop
* *
* NOTICE OF LICENSE * 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. * that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL: * 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 * 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 * obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately. * to license@prestashop.com so we can send you a copy immediately.
@@ -18,10 +18,10 @@
* versions in the future. If you wish to customize PrestaShop for your * versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information. * needs please refer to http://www.prestashop.com for more information.
* *
* @author PrestaShop SA <contact@prestashop.com> * @author Prestashop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA * @copyright 2007-2010 Prestashop SA
* @version Release: $Revision: 6844 $ * @version Release: $Revision: 1.4 $
* @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 * International Registered Trademark & Property of PrestaShop SA
*/ */
@@ -50,7 +50,8 @@ class blockcontactinfos extends Module
return (parent::install() return (parent::install()
AND Configuration::updateValue('blockcontactinfos_company', Configuration::get('PS_SHOP_NAME')) AND Configuration::updateValue('blockcontactinfos_company', Configuration::get('PS_SHOP_NAME'))
AND Configuration::updateValue('blockcontactinfos_address', '') AND Configuration::updateValue('blockcontactinfos_phone', '') 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() public function uninstall()
@@ -77,34 +78,43 @@ class blockcontactinfos extends Module
$content = ' $content = '
<h2>'.$this->displayName.'</h2> <h2>'.$this->displayName.'</h2>
<form action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" method="post"> <form action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" method="post">
<fieldset> <fieldset class="width2">
<p><label for="company">'.$this->l('Company name').' :</label> <p><label for="company">'.$this->l('Company name').' :</label>
<input type="text" id="company" name="company" value="'.Configuration::get('blockcontactinfos_company').'" /></p> <input type="text" id="company" name="company" value="'.Configuration::get('blockcontactinfos_company').'" /></p>
<p><label for="address">'.$this->l('Address').' :</label> <p><label for="address">'.$this->l('Address').' :</label>
<textarea id="address" name="address" cols="60" rows="4">'.Configuration::get('blockcontactinfos_address').'</textarea></p> <textarea id="address" name="address">'.Configuration::get('blockcontactinfos_address').'</textarea></p>
<p><label for="phone">'.$this->l('Phone number').' :</label> <p><label for="phone">'.$this->l('Phone number').' :</label>
<input type="text" id="phone" name="phone" value="'.Configuration::get('blockcontactinfos_phone').'" /></p> <input type="text" id="phone" name="phone" value="'.Configuration::get('blockcontactinfos_phone').'" /></p>
<p><label for="email">'.$this->l('Email').' :</label> <p><label for="email">'.$this->l('Email').' :</label>
<input type="text" id="email" name="email" value="'.Configuration::get('blockcontactinfos_email').'" /> </p> <input type="text" id="email" name="email" value="'.Configuration::get('blockcontactinfos_email').'" /> </p>
<div class="margin-form"> <div class="clear">&nbsp;</div>
<input type="submit" name="submitModule" value="'.$this->l('Update settings').'" class="button" /></center> <br /><center><input type="submit" name="submitModule" value="'.$this->l('Update settings').'" class="button" /></center>
</div>
</fieldset> </fieldset>
</form> </form>
'; <div class="clear">&nbsp;</div>
<fieldset>
<legend>Addons</legend>
'.$this->l('This module has been developped by PrestaShop and can only be sold through').' <a href="http://addons.prestashop.com">addons.prestashop.com</a>.<br />
'.$this->l('Please report all bugs to').' <a href="mailto:addons@prestashop.com">addons@prestashop.com</a> '.$this->l('or using our').' <a href="http://addons.prestashop.com/contact-form.php">'.$this->l('contact form').'</a>.
</fieldset>';
return $content; return $content;
} }
public function hookHeader()
{
$this->context->controller->addCSS(($this->_path).'blockcontactinfos.css', 'all');
}
public function hookFooter($params) public function hookFooter($params)
{ {
global $smarty; global $smarty;
$smarty->assign(array( $smarty->assign(array(
'company' => Configuration::get('blockcontactinfos_company'), 'blockcontactinfos_company' => Configuration::get('blockcontactinfos_company'),
'address' => Configuration::get('blockcontactinfos_address'), 'blockcontactinfos_address' => Configuration::get('blockcontactinfos_address'),
'phone' => Configuration::get('blockcontactinfos_phone'), 'blockcontactinfos_phone' => Configuration::get('blockcontactinfos_phone'),
'email' => Configuration::get('blockcontactinfos_email') 'blockcontactinfos_email' => Configuration::get('blockcontactinfos_email')
)); ));
return $this->display(__FILE__, 'blockcontactinfos.tpl'); return $this->display(__FILE__, 'blockcontactinfos.tpl');
} }
@@ -28,10 +28,10 @@
<div id="block_contact_infos"> <div id="block_contact_infos">
<h4>{l s='Contact us' mod='blockcontactinfos'}</h4> <h4>{l s='Contact us' mod='blockcontactinfos'}</h4>
<ul> <ul>
{if $company != ''}<li><strong>{$company}</strong></li>{/if} {if $blockcontactinfos_company != ''}<li><strong>{$blockcontactinfos_company}</strong></li>{/if}
{if $address != ''}<li><pre>{$address}</pre></li>{/if} {if $blockcontactinfos_address != ''}<li><pre>{$blockcontactinfos_address}</pre></li>{/if}
{if $phone != ''}<li>{l s='Tel:'} {$phone}</li>{/if} {if $blockcontactinfos_phone != ''}<li>{l s='Tel:'} {$blockcontactinfos_phone}</li>{/if}
{if $email != ''}<li>{l s='Email:'} <a href="mailto:{$email}">{$email}</a></li>{/if} {if $blockcontactinfos_email != ''}<li>{l s='Email:'} {mailto address=$blockcontactinfos_email encode="hex"}</li>{/if}
</ul> </ul>
</div> </div>
<!-- /MODULE Block contact infos --> <!-- /MODULE Block contact infos -->
@@ -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;}
+1 -1
View File
@@ -62,7 +62,7 @@ class BlockCurrencies extends Module
if (!count(Currency::getCurrencies())) if (!count(Currency::getCurrencies()))
return ''; return '';
$this->context->smarty->assign('blockcurrencies_sign', $this->context->currency->sign);
return $this->display(__FILE__, 'blockcurrencies.tpl'); return $this->display(__FILE__, 'blockcurrencies.tpl');
} }
+27 -7
View File
@@ -19,26 +19,46 @@
* *
* @author PrestaShop SA <contact@prestashop.com> * @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 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) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<!-- Block currencies module --> <!-- Block currencies module -->
<script type="text/javascript">
$(document).ready(function () {
$("#setCurrency").mouseover(function(){
$(this).addClass("countries_hover");
$(".currencies_ul").addClass("currencies_ul_hover");
});
$("#setCurrency").mouseout(function(){
$(this).removeClass("countries_hover");
$(".currencies_ul").removeClass("currencies_ul_hover");
});
$('ul#first-currencies li:not(.selected)').css('opacity', 0.3);
$('ul#first-currencies li:not(.selected)').hover(function(){
$(this).css('opacity', 1);
}, function(){
$(this).css('opacity', 0.3);
});
});
</script>
<div id="currencies_block_top"> <div id="currencies_block_top">
<form id="setCurrency" action="{$request_uri}" method="post"> <form id="setCurrency" action="{$request_uri}" method="post">
<ul> <p>
<input type="hidden" name="id_currency" id="id_currency" value=""/>
<input type="hidden" name="SubmitCurrency" value="" />
{l s='Currency' mod='blockcurrencies'} : {$blockcurrencies_sign}
</p>
<ul id="first-currencies" class="currencies_ul">
{foreach from=$currencies key=k item=f_currency} {foreach from=$currencies key=k item=f_currency}
<li {if $cookie->id_currency == $f_currency.id_currency}class="selected"{/if}> <li {if $cookie->id_currency == $f_currency.id_currency}class="selected"{/if}>
<a href="javascript:setCurrency({$f_currency.id_currency});" title="{$f_currency.name}">{$f_currency.sign}</a> <a href="javascript:setCurrency({$f_currency.id_currency});" title="{$f_currency.name}">{$f_currency.sign}</a>
</li> </li>
{/foreach} {/foreach}
</ul> </ul>
<p>
<input type="hidden" name="id_currency" id="id_currency" value=""/>
<input type="hidden" name="SubmitCurrency" value="" />
{l s='Currency' mod='blockcurrencies'}
</p>
</form> </form>
</div> </div>
<!-- /Block currencies module --> <!-- /Block currencies module -->
Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

@@ -1,13 +1,13 @@
<?php <?php
/* /*
* 2007-2011 PrestaShop * 2007-2010 PrestaShop
* *
* NOTICE OF LICENSE * 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. * that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL: * 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 * 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 * obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately. * to license@prestashop.com so we can send you a copy immediately.
@@ -18,10 +18,10 @@
* versions in the future. If you wish to customize PrestaShop for your * versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information. * needs please refer to http://www.prestashop.com for more information.
* *
* @author PrestaShop SA <contact@prestashop.com> * @author Prestashop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA * @copyright 2007-2010 Prestashop SA
* @version Release: $Revision: 6844 $ * @version Release: $Revision: 1.4 $
* @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 * International Registered Trademark & Property of PrestaShop SA
*/ */
@@ -56,5 +56,5 @@
<p class="required"> <p class="required">
<input type="checkbox" value="1" id="customer_privacy" name="customer_privacy" style="float:left;margin: 15px;" /> <input type="checkbox" value="1" id="customer_privacy" name="customer_privacy" style="float:left;margin: 15px;" />
</p> </p>
<label for="customer_privacy" style="float:left;width:80%;text-align:left;cursor:pointer">{$privacy_message}</label> <label for="customer_privacy">{$privacy_message}</label>
</fieldset> </fieldset>
+58
View File
@@ -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;
}
+46 -20
View File
@@ -19,40 +19,66 @@
* *
* @author PrestaShop SA <contact@prestashop.com> * @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 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) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<!-- Block languages module --> <!-- Block languages module -->
<div id="languages_block_top"> <div id="languages_block_top">
<ul id="first-languages"> <div id="countries">
{* @todo fix display current languages, removing the first foreach loop *}
{foreach from=$languages key=k item=language name="languages"}
{if $language.iso_code == $lang_iso}
<p class="selected_language">
{if $language.iso_code != $lang_iso}
{assign var=indice_lang value=$language.id_lang}
{if isset($lang_rewrite_urls.$indice_lang)}
<a href="{$lang_rewrite_urls.$indice_lang}" title="{$language.name}">
{else}
<a href="{$link->getLanguageLink($language.id_lang, $language.name)}" title="{$language.name}">
{/if}
{/if}
<img src="{$img_lang_dir}{$language.id_lang}.jpg" alt="{$language.iso_code}" width="16" height="11" />
{if $language.iso_code != $lang_iso}
</a>
{/if}
</p>
{/if}
{/foreach}
<ul id="first-languages" class="countries_ul">
{foreach from=$languages key=k item=language name="languages"} {foreach from=$languages key=k item=language name="languages"}
<li {if $language.iso_code == $lang_iso}class="selected_language"{/if}> <li {if $language.iso_code == $lang_iso}class="selected_language"{/if}>
{if $language.iso_code != $lang_iso} {if $language.iso_code != $lang_iso}
{assign var=indice_lang value=$language.id_lang} {assign var=indice_lang value=$language.id_lang}
{if isset($blocklanguages_lang_rewrite_urls.$indice_lang)} {if isset($lang_rewrite_urls.$indice_lang)}
<a href="{$blocklanguages_lang_rewrite_urls.$indice_lang}" title="{$language.name}"> <a href="{$blocklanguages_lang_rewrite_urls.$indice_lang}" title="{$language.name}">
{else} {else}
<a href="{$link->getLanguageLink($language.id_lang)}" title="{$language.name}"> <a href="{$link->getLanguageLink($language.id_lang)}" title="{$language.name}">
{/if}
{/if} {/if}
{/if}
<img src="{$img_lang_dir}{$language.id_lang}.jpg" alt="{$language.iso_code}" width="16" height="11" /> <img src="{$img_lang_dir}{$language.id_lang}.jpg" alt="{$language.iso_code}" width="16" height="11" />
{if $language.iso_code != $lang_iso} {if $language.iso_code != $lang_iso}
</a> </a>
{/if} {/if}
</li> </li>
{/foreach} {/foreach}
</ul> </ul>
</div>
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$('ul#first-languages li:not(.selected_language)').css('opacity', 0.3); $(document).ready(function () {
$('ul#first-languages li:not(.selected_language)').hover(function(){ldelim} $("#countries").mouseover(function(){
$(this).css('opacity', 1); $(this).addClass("countries_hover");
{rdelim}, function(){ldelim} $(".countries_ul").addClass("countries_ul_hover");
$(this).css('opacity', 0.3); });
{rdelim}); $("#countries").mouseout(function(){
$(this).removeClass("countries_hover");
$(".countries_ul").removeClass("countries_ul_hover");
});
});
</script> </script>
<!-- /Block languages module --> <!-- /Block languages module -->
Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

+52 -73
View File
@@ -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 { #layered_block_left div.block_content {
padding: 6px; padding: 6px;
} }
#layered_block_left ul { #layered_block_left ul {
padding-left: 0; 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 { #layered_block_left ul li {
@@ -32,9 +59,11 @@
list-style-type: none; 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; font-size: 10px;
padding-bottom: 5px; padding-bottom: 10px;
margin-bottom: 5px;
border-bottom: 1px dotted #CCC;
} }
#layered_block_left #enabled_filters ul li { #layered_block_left #enabled_filters ul li {
@@ -57,31 +86,7 @@
color: #FFF; 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 { #layered_block_left ul li input.checkbox {
vertical-align: middle; vertical-align: middle;
@@ -91,30 +96,4 @@
#layered_block_left ul li .disabled { #layered_block_left ul li .disabled {
color: #666; 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;
}
@@ -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
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

@@ -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
}
@@ -0,0 +1,105 @@
<?php
/*
* 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 <contact@prestashop.com>
* @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');
}
}
@@ -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 <contact@prestashop.com>
* @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
*}
<!-- Block myaccount module -->
<div class="block myaccount">
<h4><a href="{$link->getPageLink('my-account.php', true)}">{l s='My account' mod='blockmyaccountfooter'}</a></h4>
<div class="block_content">
<ul class="bullet">
<li><a href="{$link->getPageLink('history.php', true)}" title="">{l s='My orders' mod='blockmyaccountfooter'}</a></li>
{if $returnAllowed}<li><a href="{$link->getPageLink('order-follow.php', true)}" title="">{l s='My merchandise returns' mod='blockmyaccountfooter'}</a></li>{/if}
<li><a href="{$link->getPageLink('order-slip.php', true)}" title="">{l s='My credit slips' mod='blockmyaccountfooter'}</a></li>
<li><a href="{$link->getPageLink('addresses.php', true)}" title="">{l s='My addresses' mod='blockmyaccountfooter'}</a></li>
<li><a href="{$link->getPageLink('identity.php', true)}" title="">{l s='My personal info' mod='blockmyaccountfooter'}</a></li>
{if $voucherAllowed}<li><a href="{$link->getPageLink('discount.php', true)}" title="">{l s='My vouchers' mod='blockmyaccountfooter'}</a></li>{/if}
{$HOOK_BLOCK_MY_ACCOUNT}
</ul>
<p class="logout"><a href="{$link->getPageLink('index.php')}?mylogout" title="{l s='Sign out' mod='blockmyaccountfooter'}">{l s='Sign out' mod='blockmyaccount'}</a></p>
</div>
</div>
<!-- /Block myaccount module -->
+12
View File
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>blockmyaccountfooter</name>
<displayName><![CDATA[My Account block on footer]]></displayName>
<version><![CDATA[1.2]]></version>
<description><![CDATA[Displays a block with links relative to user account.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[front_office_features]]></tab>
<is_configurable>0</is_configurable>
<need_instance>0</need_instance>
<limited_countries></limited_countries>
</module>
+36
View File
@@ -0,0 +1,36 @@
<?php
/*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision$
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("Location: ../");
exit;
Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

@@ -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}
@@ -19,7 +19,7 @@
* *
* @author PrestaShop SA <contact@prestashop.com> * @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 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) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
@@ -39,12 +39,12 @@
<dl class="products"> <dl class="products">
{foreach from=$blocknewproducts_new_products item=newproduct name=myLoop} {foreach from=$blocknewproducts_new_products item=newproduct name=myLoop}
<dt class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}"><a href="{$newproduct.link}" title="{$newproduct.name|escape:html:'UTF-8'}">{$newproduct.name|strip_tags|escape:html:'UTF-8'}</a></dt> <dt class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}"><a href="{$newproduct.link}" title="{$newproduct.name|escape:html:'UTF-8'}">{$newproduct.name|strip_tags|escape:html:'UTF-8'}</a></dt>
{if $newproduct.description_short}<dd class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}"><a href="{$newproduct.link}">{$newproduct.description_short|strip_tags:'UTF-8'|truncate:50:'...'}</a>&nbsp;<a href="{$newproduct.link}"><img src="{$img_dir}bullet.gif" alt="&gt;&gt;" width="10" height="7" /></a></dd>{/if} {if $newproduct.description_short}<dd class="{if $smarty.foreach.myLoop.first}first_item{elseif $smarty.foreach.myLoop.last}last_item{else}item{/if}"><a href="{$newproduct.link}">{$newproduct.description_short|strip_tags:'UTF-8'|truncate:75:'...'}</a><br /><a href="{$newproduct.link}" class="lnk_more">{l s='Read more'}</a></dd>{/if}
{/foreach} {/foreach}
</dl> </dl>
<p><a href="{$link->getPageLink('new-products')}" title="{l s='All new products' mod='blocknewproducts'}" class="button_large">{l s='All new products' mod='blocknewproducts'}</a></p> <p><a href="{$link->getPageLink('new-products')}" title="{l s='All new products' mod='blocknewproducts'}" class="button_large">&raquo; {l s='All new products' mod='blocknewproducts'}</a></p>
{else} {else}
<p>{l s='No new products at this time' mod='blocknewproducts'}</p> <p>&raquo; {l s='No new products at this time' mod='blocknewproducts'}</p>
{/if} {/if}
</div> </div>
</div> </div>
Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

@@ -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 */
}/* */
+9 -4
View File
@@ -19,7 +19,7 @@
* *
* @author PrestaShop SA <contact@prestashop.com> * @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 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) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
@@ -33,16 +33,21 @@
<p class="{if $nw_error}warning_inline{else}success_inline{/if}">{$msg}</p> <p class="{if $nw_error}warning_inline{else}success_inline{/if}">{$msg}</p>
{/if} {/if}
<form action="{$link->getPageLink('index')}" method="post"> <form action="{$link->getPageLink('index')}" method="post">
<p><input type="text" name="email" size="18" value="{if isset($value) && $value}{$value}{else}{l s='your e-mail' mod='blocknewsletter'}{/if}" onfocus="javascript:if(this.value=='{l s='your e-mail' mod='blocknewsletter'}')this.value='';" onblur="javascript:if(this.value=='')this.value='{l s='your e-mail' mod='blocknewsletter'}';" /></p>
<p> <p>
{* @todo use jquery (focusin, focusout) instead of onblur and onfocus *}
<input class="" type="text" name="email" size="18"
value="{if isset($value) && $value}{$value}{else}{l s='your e-mail' mod='blocknewsletter'}{/if}"
onfocus="javascript:if(this.value=='{l s='your e-mail' mod='blocknewsletter'}')this.value='';"
onblur="javascript:if(this.value=='')this.value='{l s='your e-mail' mod='blocknewsletter'}';"
class="inputNew" />
<select name="action"> <select name="action">
<option value="0"{if isset($action) && $action == 0} selected="selected"{/if}>{l s='Subscribe' mod='blocknewsletter'}</option> <option value="0"{if isset($action) && $action == 0} selected="selected"{/if}>{l s='Subscribe' mod='blocknewsletter'}</option>
<option value="1"{if isset($action) && $action == 1} selected="selected"{/if}>{l s='Unsubscribe' mod='blocknewsletter'}</option> <option value="1"{if isset($action) && $action == 1} selected="selected"{/if}>{l s='Unsubscribe' mod='blocknewsletter'}</option>
</select> </select>
<input type="submit" value="ok" class="button_mini" name="submitNewsletter" /> <input type="submit" value="ok" class="button_mini" name="submitNewsletter" />
<input type="hidden" name="action" value="0" />
</p> </p>
</form> </form>
</div> </div>
</div> </div>
<!-- /Block Newsletter module--> <!-- /Block Newsletter module-->
@@ -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 }
@@ -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
}
@@ -55,7 +55,7 @@ class BlockPermanentLinks extends Module
* @param array $params Parameters * @param array $params Parameters
* @return string Content * @return string Content
*/ */
function hookTop($params) function hookDisplayTop($params)
{ {
return $this->display(__FILE__, 'blockpermanentlinks-header.tpl'); return $this->display(__FILE__, 'blockpermanentlinks-header.tpl');
} }
@@ -76,12 +76,12 @@ class BlockPermanentLinks extends Module
return $this->hookLeftColumn($params); return $this->hookLeftColumn($params);
} }
function hookFooter($params) function hookDisplayFooter($params)
{ {
return $this->display(__FILE__, 'blockpermanentlinks-footer.tpl'); return $this->display(__FILE__, 'blockpermanentlinks-footer.tpl');
} }
function hookHeader($params) function hookDisplayHeader($params)
{ {
$this->context->controller->addCSS(($this->_path).'blockpermanentlinks.css', 'all'); $this->context->controller->addCSS(($this->_path).'blockpermanentlinks.css', 'all');
} }
+265 -140
View File
@@ -1,13 +1,13 @@
<?php <?php
/* /*
* 2007-2011 PrestaShop * 2007-2010 PrestaShop
* *
* NOTICE OF LICENSE * 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. * that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL: * 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 * 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 * obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately. * to license@prestashop.com so we can send you a copy immediately.
@@ -18,189 +18,314 @@
* versions in the future. If you wish to customize PrestaShop for your * versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information. * needs please refer to http://www.prestashop.com for more information.
* *
* @author PrestaShop SA <contact@prestashop.com> * @author Prestashop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA * @copyright 2007-2010 Prestashop SA
* @version Release: $Revision: 6844 $ * @version Release: $Revision: 1.4 $
* @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 * International Registered Trademark & Property of PrestaShop SA
*/ */
if (!defined('_CAN_LOAD_FILES_')) if (!defined('_PS_VERSION_'))
exit; exit;
class blockreinsurance extends Module class Blockreinsurance extends Module
{ {
protected $_html = '';
public function __construct() public function __construct()
{ {
$this->name = 'blockreinsurance'; $this->name = 'blockreinsurance';
if(version_compare(_PS_VERSION_, '1.4.0.0') >= 0) $this->tab = 'front_office_features';
$this->tab = 'front_office_features';
else
$this->tab = 'Blocks';
$this->version = '1.0'; $this->version = '1.0';
$this->author = 'PrestaShop';
$this->need_instance = 0;
parent::__construct(); parent::__construct();
$this->displayName = $this->l('Bloc reinsurance'); $this->displayName = $this->l('Block reinsurance');
$this->description = $this->l('Add a block to display more infos to reassure your customers'); $this->description = $this->l('Adds a block to display more infos to reassure your customers');
} }
public function install() public function install()
{ {
return (parent::install() AND $this->installDB() AND Configuration::updateValue('blockreinsurance_nbblocks', 5) AND $this->registerHook('footer')); // Module installation
} $res = parent::install();
public function installDB() // Table creation
{ $res &= Db::getInstance()->Execute('
return Db::getInstance()->execute('
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'reinsurance` ( 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, `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, `text` VARCHAR(300) NOT NULL,
PRIMARY KEY (`id_contactinfos`) PRIMARY KEY (`id_reinsurance`, `id_lang`)
) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 ;'); ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8');
$res &= $this->registerHook('header') AND $this->example();
return $res;
} }
public function uninstall() public function uninstall()
{ {
//Delete configuration // Drop table
return (Configuration::deleteByName('blockreinsurance_nbblocks') AND $this->uninstallDB() AND parent::uninstall()); $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()
{
return Db::getInstance()->execute('
DROP TABLE IF EXISTS `'._DB_PREFIX_.'reinsurance`');
}
public function addToDB() private function example()
{ {
if(isset($_POST['nbblocks'])) $res = Db::getInstance()->Execute("INSERT INTO `"._DB_PREFIX_."reinsurance` VALUES
{ (1, '10299ef6635307f2b4da1e04471ec981.jpg'),
for($i = 1; $i <= (int)$_POST['nbblocks']; $i++) (2, 'd02eaac9390f84f26fe9c5cae966a8f7.jpg'),
{ (3, 'b889e72091b006fd444f63e5de030604.jpg'),
$filename = explode('.', $_FILES['info'.$i.'_file']['name']); (4, 'a215cb7a215c6976be8b2b80f02765b0.jpg'),
if (isset($_FILES['info'.$i.'_file']) AND isset($_FILES['info'.$i.'_file']['tmp_name']) AND !empty($_FILES['info'.$i.'_file']['tmp_name'])) (5, '0f9d7fd7d13cfb5672ac7830be60d6a8.jpg');");
{ $res &= Db::getInstance()->Execute("INSERT INTO `"._DB_PREFIX_."reinsurance_lang` VALUES
if ($error = checkImage($_FILES['info'.$i.'_file'])) (1, 1, 'Money-back guarantee'),
return false; (1, 2, 'SATISFAIT OU REMBOURSE'),
elseif (!$tmpName = tempnam(_PS_TMP_IMG_DIR_, 'PS') OR !move_uploaded_file($_FILES['info'.$i.'_file']['tmp_name'], $tmpName)) (1, 3, 'Money-back guarantee'),
return false; (1, 4, 'Money-back guarantee'),
elseif (!imageResize($tmpName, dirname(__FILE__).'/img/'.$filename[0].'.jpg')) (1, 5, 'Money-back guarantee'),
return false; (2, 1, 'Satisfied or refunded'),
unlink($tmpName); (2, 2, 'ECHANGE EN MAGASIN'),
} (2, 3, 'Satisfied or refunded'),
Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'reinsurance` (`filename`,`text`) (2, 4, 'Satisfied or refunded'),
VALUES ("'.((isset($filename[0]) AND $filename[0] != '') ? pSQL($filename[0]) : ''). (2, 5, 'Satisfied or refunded'),
'", "'.((isset($_POST['info'.$i.'_text']) AND $_POST['info'.$i.'_text'] != '') ? pSQL($_POST['info'.$i.'_text']) : '').'")'); (3, 1, 'Shipped and paid'),
} (3, 2, 'PAIEMENT A L''EXPEDITION'),
return true; (3, 3, 'Shipped and paid'),
} else (3, 4, 'Shipped and paid'),
return false; (3, 5, 'Shipped and paid'),
} (4, 1, 'Free delivery'),
(4, 2, 'LIVRAISON GRATUITE'),
public function removeFromDB() (4, 3, 'Free delivery'),
{ (4, 4, 'Free delivery'),
$dir = opendir(dirname(__FILE__).'/img'); (4, 5, 'Free delivery'),
while (false !== ($file = readdir($dir))) (5, 1, 'Secure payment'),
{ (5, 2, 'PAIEMENT 100% SECURISE'),
$path = dirname(__FILE__).'/img/'.$file; (5, 3, 'Secure payment'),
if ($file != ".." AND $file != "." AND !is_dir($file)) (5, 4, 'Secure payment'),
{ (5, 5, 'Secure payment');");
unlink($path); return $res;
}
}
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() public function getContent()
{ {
// If we try to update the settings $this->_html = '<h2>'.$this->displayName.'.</h2>';
if (isset($_POST['submitModule']))
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 .= '
<script type="text/javascript">id_language = Number('.$default_language.');</script>
<form method="POST" action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" enctype="multipart/form-data">
<fieldset class="width2">
<legend>'.$this->l('Block configuration').'</legend>
';
for ($i = 1; $i != 6; $i++)
{ {
Configuration::updateValue('blockreinsurance_nbblocks', ((isset($_POST['nbblocks']) AND $_POST['nbblocks'] != '') ? (int)$_POST['nbblocks'] : '')); $this->_html .= '
if($this->removeFromDB() && $this->addToDB()) <h3>Block '.$i.'</h3>
echo '<div class="conf confirm"><img src="../img/admin/ok.gif"/>'.$this->l('Configuration updated').'</div>'; ';
else if ($i == 1)
echo '<div class="conf error"><img src="../img/admin/disabled.gif"/>'.$this->l('An error occurred during the save').'</div>'; $this->_html .= '<p style="color: red;">'.$this->l('This block is required').'</p>';
if (isset($reinssuarances[$i][$default_language]) && $reinssuarances[$i][$default_language]['filename'] != null)
$this->_html .= '<div class="margin-form">
<img src="'.$this->_path.'/img/'.$reinssuarances[$i][$default_language]['filename'].'" alt="'.$reinssuarances[$i][$default_language]['text'].'" />
</div>';
$this->_html .= '
<label>'.$this->l('Image:').'</label>
<div class="margin-form">
<input type="file" name="images['.$i.']" />
</div>
';
foreach ($languages as $lang)
$this->_html .= '
<div id="block_'.$i.'_language_'.$lang['id_lang'].'" style="display: '.($lang['id_lang'] == $default_language ? 'block' : 'none').'; float:left;">
<label>'.$this->l('Text:').'</label>
<input type="text" name="texts['.$i.']['.$lang['id_lang'].']" value="'.((isset($reinssuarances[$i][$lang['id_lang']]) && $reinssuarances[$i][$lang['id_lang']]['text']) ? Tools::htmlentitiesUTF8($reinssuarances[$i][$lang['id_lang']]['text']) : 'default').'" />
</div>
';
$this->_html .= $this->displayFlags($languages, $default_language, $div_id_language, 'block_'.$i.'_language', true);
$this->_html .= '
<div class="clear"></div>
';
if ($i != 5)
$this->_html.= '<hr />';
}
$this->_html .= '
<p class="center">
<input type="submit" class="button" name="submitBlock" value="'.$this->l('Save').'" />
</p>
</fieldset>
</form>
';
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'); foreach ($_POST['texts'] as $key => $text)
$infos = $this->getAllFromDB(); {
$res &= $this->cleanTxt($key);
$content = ' if ($text[$default_language] != null && Validate::isCleanHtml($text[$default_language]))
<script type="text/javascript"> {
$(document).ready(function(){ if (!sizeof($errors))
var nb_blocks = 5;
nb_blocks = $("select[name=nbblocks]").val();
$("div.container_infos").each(function(){
id_div = $(this).attr("id").split("container_infos");
if(parseInt(id_div[1]) <= nb_blocks)
$(this).show();
else
$(this).hide();
});
$("select[name=nbblocks]").change(function(){
nb_blocks = $("select[name=nbblocks]").val();
$("div.container_infos").each(function(){
id_div = $(this).attr("id").split("container_infos");
if(parseInt(id_div[1]) <= nb_blocks)
$(this).show();
else
$(this).hide();
});
});
});
</script>
<h2>'.$this->displayName.'</h2>
<form method="post" action="'.Tools::htmlentitiesutf8($_SERVER['REQUEST_URI']).'" enctype="multipart/form-data">
<fieldset class="width2">
<select name="nbblocks">';
// Show by default 5 blocks maximum
for($i = 1; $i <= 5; $i++)
{
$content .= '<option value="'.$i.'" '.(($i == $nb_blocks) ? 'selected="selected"' : '').'>'.$i.' '.$this->l('block(s)').'</option>';
}
$content .= '</select>
<div class="clear">&nbsp;</div>';
// Show by default 5 blocks maximum
for($i = 1; $i <= 5; $i++)
{ {
$content .= '<div id="container_infos'.$i.'" class="container_infos"><h3>'.$this->l('Block number').' '.$i.'</h3>'. foreach ($languages as $lang)
((!empty($infos[$i-1]) && $infos[$i-1]['filename'] != '') ? '<img src="'.Tools::getHttpHost(true)._MODULE_DIR_.$this->name.'/img/'.$infos[$i-1]['filename'].'.jpg" />' : ''). {
'<div class="clear">&nbsp;</div> if ($text[$lang['id_lang']] == '' || !Validate::isCleanHtml($text[$lang['id_lang']]))
<p><label for="info'.$i.'_file">'.$this->l('Image for this block').' :</label> $text[$lang['id_lang']] = $text[$default_language];
<input type="file" name="info'.$i.'_file" /></p>
<p><label for="info'.$i.'_text">'.$this->l('Alternative text for this block').' :</label>
<input type="text" id="info'.$i.'_text" name="info'.$i.'_text" value="'.((!empty($infos[$i-1]) && $infos[$i-1]['text'] != '') ? $infos[$i-1]['text'] : '').'" /></p></div>';
}
$content .= '<div class="clear">&nbsp;</div>
<br /><center><input type="submit" name="submitModule" value="'.$this->l('Update settings').'" class="button" /></center>
</fieldset>
</form>';
return $content; $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 ');
}
}
if (!sizeof($errors))
$this->_html .= $this->displayConfirmation($this->l('Configuration updated'));
else
$this->_html .= $this->displayError(implode('<br />', $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) public function hookFooter($params)
{ {
global $smarty; global $smarty, $cookie;
$infos = $this->getAllFromDB(); $reinssuarances = $this->getAllReinsurances($cookie->id_lang);
if (!$nb_reinssurance = sizeof($reinssuarances))
return;
$smarty->assign(array( $smarty->assign(array(
'nbblocks' => Configuration::get('blockreinsurance_nbblocks'), 'nb_blocks' => $nb_reinssurance,
'infos' => $infos 'reinssurances' => $reinssuarances
)); ));
return $this->display(__FILE__, 'blockreinsurance.tpl'); return $this->display(__FILE__, 'blockreinsurance.tpl');
} }
} }
?>
@@ -23,12 +23,11 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<!-- MODULE Block reinsurance --> <!-- MODULE Block reinsurance -->
<div id="reinsurance_block" class="clearfix"> <div id="reinsurance_block" class="clearfix">
<ul class="width{$nbblocks}"> <ul class="width{$nb_blocks}">
{foreach from=$infos item=info} {foreach from=$reinssurances item=reinssurance}
<li><img src="{$module_dir}img/{$info.filename}.jpg" alt="{$info.text}" /> <span>{$info.text}</span></li> <li>{if $reinssurance.filename}<img src="{$module_dir}img/{$reinssurance.filename}" alt="{$reinssurance.text}" />{/if} <span>{$reinssurance.text}</span></li>
{/foreach} {/foreach}
</ul> </ul>
</div> </div>
Binary file not shown.

After

Width:  |  Height:  |  Size: 299 B

+24
View File
@@ -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%;
}
+14
View File
@@ -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
}
+2 -2
View File
@@ -19,7 +19,7 @@
* *
* @author PrestaShop SA <contact@prestashop.com> * @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 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) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
@@ -35,7 +35,7 @@
{/foreach} {/foreach}
</ul> </ul>
{else} {else}
{l s='No RSS feed added' mod='blockrss'} <p>{l s='No RSS feed added' mod='blockrss'}</p>
{/if} {/if}
</div> </div>
</div> </div>
+28
View File
@@ -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 */
}/* */
+4 -1
View File
@@ -54,7 +54,10 @@ class BlockSearch extends Module
public function hookHeader($params) public function hookHeader($params)
{ {
if (Configuration::get('PS_SEARCH_AJAX')) 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(_THEME_CSS_DIR_.'product_list.css');
$this->context->controller->addCSS(($this->_path).'blocksearch.css', 'all'); $this->context->controller->addCSS(($this->_path).'blocksearch.css', 'all');
} }
Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

+7 -7
View File
@@ -1,13 +1,13 @@
<?php <?php
/* /*
* 2007-2011 PrestaShop * 2007-2010 PrestaShop
* *
* NOTICE OF LICENSE * 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. * that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL: * 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 * 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 * obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately. * to license@prestashop.com so we can send you a copy immediately.
@@ -18,10 +18,10 @@
* versions in the future. If you wish to customize PrestaShop for your * versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information. * needs please refer to http://www.prestashop.com for more information.
* *
* @author PrestaShop SA <contact@prestashop.com> * @author Prestashop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA * @copyright 2007-2010 Prestashop SA
* @version Release: $Revision: 6844 $ * @version Release: $Revision: 1.4 $
* @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 * International Registered Trademark & Property of PrestaShop SA
*/ */
+5
View File
@@ -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;}
+20 -9
View File
@@ -1,13 +1,13 @@
<?php <?php
/* /*
* 2007-2011 PrestaShop * 2007-2010 PrestaShop
* *
* NOTICE OF LICENSE * 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. * that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL: * 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 * 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 * obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately. * to license@prestashop.com so we can send you a copy immediately.
@@ -18,10 +18,10 @@
* versions in the future. If you wish to customize PrestaShop for your * versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information. * needs please refer to http://www.prestashop.com for more information.
* *
* @author PrestaShop SA <contact@prestashop.com> * @author Prestashop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA * @copyright 2007-2010 Prestashop SA
* @version Release: $Revision: 6844 $ * @version Release: $Revision: 1.4 $
* @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 * International Registered Trademark & Property of PrestaShop SA
*/ */
@@ -44,7 +44,7 @@ class blocksocial extends Module
public function install() 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() public function uninstall()
@@ -79,7 +79,18 @@ class blocksocial extends Module
<div class="clear">&nbsp;</div> <div class="clear">&nbsp;</div>
<br /><center><input type="submit" name="submitModule" value="'.$this->l('Update settings').'" class="button" /></center> <br /><center><input type="submit" name="submitModule" value="'.$this->l('Update settings').'" class="button" /></center>
</fieldset> </fieldset>
</form>'; </form>
<div class="clear">&nbsp;</div>
<fieldset>
<legend>Addons</legend>
'.$this->l('This module has been developped by PrestaShop and can only be sold through').' <a href="http://addons.prestashop.com">addons.prestashop.com</a>.<br />
'.$this->l('Please report all bugs to').' <a href="mailto:addons@prestashop.com">addons@prestashop.com</a> '.$this->l('or using our').' <a href="http://addons.prestashop.com/contact-form.php">'.$this->l('contact form').'</a>.
</fieldset>';
}
public function hookHeader()
{
$this->context->controller->addCSS(($this->_path).'blocksocial.css', 'all');
} }
public function hookFooter() public function hookFooter()
Binary file not shown.

After

Width:  |  Height:  |  Size: 561 B

+49
View File
@@ -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
}
+3 -3
View File
@@ -37,7 +37,7 @@ class BlockSpecials extends Module
{ {
$this->name = 'blockspecials'; $this->name = 'blockspecials';
$this->tab = 'pricing_promotion'; $this->tab = 'pricing_promotion';
$this->version = '0.8'; $this->version = 0.8;
$this->author = 'PrestaShop'; $this->author = 'PrestaShop';
$this->need_instance = 0; $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')) if (!$special = Product::getRandomSpecial((int)$params['cookie']->id_lang) AND !Configuration::get('PS_BLOCK_SPECIALS_DISPLAY'))
return; return;
$this->templateAssign(array( $this->context->smarty->assign(array(
'special' => $special, 'blockspecials_special' => $special,
'priceWithoutReduction_tax_excl' => Tools::ps_round($special['price_without_reduction'], 2), 'priceWithoutReduction_tax_excl' => Tools::ps_round($special['price_without_reduction'], 2),
'mediumSize' => Image::getSize('medium'), 'mediumSize' => Image::getSize('medium'),
)); ));
+9 -10
View File
@@ -19,7 +19,7 @@
* *
* @author PrestaShop SA <contact@prestashop.com> * @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 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) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
@@ -30,25 +30,25 @@
<div class="block_content"> <div class="block_content">
{if $blockspecials_special} {if $blockspecials_special}
<ul class="products"> <ul class="products clearfix">
<li class="product_image"> <li class="product_image">
<a href="{$blockspecials_special.link}"><img src="{$link->getImageLink($blockspecials_special.link_rewrite, $blockspecials_special.id_image, 'medium')}" alt="{$blockspecials_special.legend|escape:html:'UTF-8'}" height="{$blockspecials_mediumSize.height}" width="{$blockspecials_mediumSize.width}" title="{$blockspecials_special.name|escape:html:'UTF-8'}" /></a> <a href="{$blockspecials_special.link}"><img src="{$link->getImageLink($blockspecials_special.link_rewrite, $blockspecials_special.id_image, 'medium')}" alt="{$blockspecials_special.legend|escape:html:'UTF-8'}" height="{$mediumSize.height}" width="{$mediumSize.width}" title="{$blockspecials_special.name|escape:html:'UTF-8'}" /></a>
</li> </li>
<li> <li>
<h5><a href="{$blockspecials_special.link}" title="{$blockspecials_special.name|escape:html:'UTF-8'}">{$blockspecials_special.name|escape:html:'UTF-8'}</a></h5>
<span class="price-discount">{if !$priceDisplay}{displayWtPrice p=$blockspecials_special.price_without_reduction}{else}{displayWtPrice p=$blockspecials_priceWithoutReduction_tax_excl}{/if}</span>
{if $blockspecials_special.specific_prices} {if $blockspecials_special.specific_prices}
{assign var='specific_prices' value=$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))} {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))}
<span class="reduction">(-{$specific_prices.reduction*100|floatval}%)</span> <span class="reduction"><span>-{$specific_prices.reduction*100|floatval}%</span></span>
{/if} {/if}
{/if} {/if}
<h5><a href="{$blockspecials_special.link}" title="{$blockspecials_special.name|escape:html:'UTF-8'}">{$blockspecials_special.name|escape:html:'UTF-8'}</a></h5>
<span class="price-discount">{if !$priceDisplay}{displayWtPrice p=$blockspecials_special.price_without_reduction}{else}{displayWtPrice p=$priceWithoutReduction_tax_excl}{/if}</span>
<span class="price">{if !$priceDisplay}{displayWtPrice p=$blockspecials_special.price}{else}{displayWtPrice p=$blockspecials_special.price_tax_exc}{/if}</span> <span class="price">{if !$priceDisplay}{displayWtPrice p=$blockspecials_special.price}{else}{displayWtPrice p=$blockspecials_special.price_tax_exc}{/if}</span>
</li> </li>
</ul> </ul>
<p> <p>
<a href="{$link->getPageLink('prices-drop')}" title="{l s='All specials' mod='blockspecials'}" class="button_large">{l s='All specials' mod='blockspecials'}</a> <a href="{$link->getPageLink('prices-drop')}" title="{l s='All specials' mod='blockspecials'}">&raquo; {l s='All specials' mod='blockspecials'}</a>
</p> </p>
{else} {else}
<p>{l s='No specials at this time' mod='blockspecials'}</p> <p>{l s='No specials at this time' mod='blockspecials'}</p>
@@ -56,4 +56,3 @@
</div> </div>
</div> </div>
<!-- /MODULE Block specials --> <!-- /MODULE Block specials -->
Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

+10 -2
View File
@@ -1,3 +1,11 @@
/* Block store */ /* Block store */
.blockstore img { margin: 10px 0 0 0 } .blockstore img { margin: 10px 0 0 0}
.blockstore p { text-align: center } .blockstore p {
padding-bottom:0;
font-weight:bold;
text-align: right
}
.blockstore p.store_image {
padding-bottom:10px;
text-align:center
}
+1 -1
View File
@@ -88,7 +88,7 @@ class BlockStore extends Module
return $this->displayError($this->l('an error occurred on uploading file')); return $this->displayError($this->l('an error occurred on uploading file'));
else 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')); @unlink(dirname(__FILE__).'/'.Configuration::get('BLOCKSTORE_IMG'));
Configuration::updateValue('BLOCKSTORE_IMG', $_FILES['store_img']['name']); Configuration::updateValue('BLOCKSTORE_IMG', $_FILES['store_img']['name']);
return $this->displayConfirmation($this->l('Settings are updated')); return $this->displayConfirmation($this->l('Settings are updated'));
+3 -3
View File
@@ -19,7 +19,7 @@
* *
* @author PrestaShop SA <contact@prestashop.com> * @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 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) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
@@ -28,9 +28,9 @@
<div id="stores_block_left" class="block"> <div id="stores_block_left" class="block">
<h4><a href="{$link->getPageLink('stores')}" title="{l s='Our stores' mod='blockstore'}">{l s='Our stores' mod='blockstore'}</a></h4> <h4><a href="{$link->getPageLink('stores')}" title="{l s='Our stores' mod='blockstore'}">{l s='Our stores' mod='blockstore'}</a></h4>
<div class="block_content blockstore"> <div class="block_content blockstore">
<p class="store_image"><a href="{$link->getPageLink('stores')}" title="{l s='Our stores' mod='blockstore'}"><img src="{$module_dir}{$store_img}" alt="{l s='Our stores' mod='blockstore'}" width="174" height="115" /></a></p>
<p> <p>
<a href="{$link->getPageLink('stores')}" title="{l s='Our stores' mod='blockstore'}"><img src="{$module_dir}{$store_img}" alt="{l s='Our stores' mod='blockstore'}" width="174" height="115" /></a><br /> <a href="{$link->getPageLink('stores')}" title="{l s='Our stores' mod='blockstore'}">&raquo; {l s='Discover our stores' mod='blockstore'}</a>
<a href="{$link->getPageLink('stores')}" title="{l s='Our stores' mod='blockstore'}">{l s='Discover our stores' mod='blockstore'}</a>
</p> </p>
</div> </div>
</div> </div>
+17
View File
@@ -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
}
+20
View File
@@ -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 }
+107 -155
View File
@@ -1,30 +1,4 @@
<?php <?php
/*/*
* 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 <contact@prestashop.com>
* @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'; include _PS_MODULE_DIR_.'blocktopmenu/menutoplinks.class.php';
class blocktopmenu extends Module class blocktopmenu extends Module
{ {
@@ -46,7 +20,7 @@ class blocktopmenu extends Module
if(!parent::install() || if(!parent::install() ||
!$this->registerHook('top') || !$this->registerHook('top') ||
!Configuration::updateValue('MOD_BLOCKTOPMENU_ITEMS', 'CAT1,CMS1,CMS2,PRD1') || !Configuration::updateValue('MOD_BLOCKTOPMENU_ITEMS', 'CAT1,CMS1,CMS2,PRD1') ||
!Configuration::updateValue('MOD_BLOCKTOPMENU_SEARCH', '1') || !Configuration::updateValue('MOD_BLOCKTOPMENU_SEARCH', '0') ||
!$this->installDB()) !$this->installDB())
return false; return false;
return true; return true;
@@ -54,22 +28,20 @@ class blocktopmenu extends Module
public function installDb() public function installDb()
{ {
return (Db::getInstance()->execute(' Db::getInstance()->Execute('
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'linksmenutop` ( CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'linksmenutop` (
`id_link` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, `id_link` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`id_shop` INT UNSIGNED NOT NULL,
`new_window` TINYINT( 1 ) NOT NULL, `new_window` TINYINT( 1 ) NOT NULL,
`link` VARCHAR( 128 ) NOT NULL, `link` VARCHAR( 128 ) NOT NULL
INDEX (`id_shop`) ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;');
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;') AND Db::getInstance()->Execute('
Db::getInstance()->execute(' CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'linksmenutop_lang` (
CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'linksmenutop_lang` ( `id_link` INT NOT NULL ,
`id_link` INT NOT NULL, `id_lang` INT NOT NULL ,
`id_lang` INT NOT NULL, `label` VARCHAR( 128 ) NOT NULL ,
`id_shop` INT NOT NULL, INDEX ( `id_link` , `id_lang` )
`label` VARCHAR( 128 ) NOT NULL , ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;');
INDEX ( `id_link` , `id_lang`, `id_shop`) return true;
) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;'));
} }
public function uninstall() public function uninstall()
@@ -84,14 +56,15 @@ class blocktopmenu extends Module
private function uninstallDb() private function uninstallDb()
{ {
Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'linksmenutop`'); Db::getInstance()->ExecuteS('DROP TABLE `'._DB_PREFIX_.'linksmenutop`');
Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'linksmenutop_lang`'); Db::getInstance()->ExecuteS('DROP TABLE `'._DB_PREFIX_.'linksmenutop_lang`');
return true; return true;
} }
public function getContent() public function getContent()
{ {
global $cookie; global $cookie;
if(Tools::isSubmit('submitBlocktopmenu')) if(Tools::isSubmit('submitBlocktopmenu'))
{ {
if(Configuration::updateValue('MOD_BLOCKTOPMENU_ITEMS', Tools::getValue('items'))) if(Configuration::updateValue('MOD_BLOCKTOPMENU_ITEMS', Tools::getValue('items')))
@@ -108,25 +81,21 @@ class blocktopmenu extends Module
} }
else 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')); $this->_html .= $this->displayConfirmation($this->l('The link has been added'));
} }
} }
if(Tools::isSubmit('submitBlocktopmenuRemove')) if(Tools::isSubmit('submitBlocktopmenuRemove'))
{ {
$id_link = Tools::getValue('id_link', 0); $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'))); 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->displayConfirmation($this->l('The link has been removed'));
} }
$this->_html .= ' $this->_html .= '
<fieldset> <fieldset>
<div class="multishop_info">
'.$this->l('The modifications will be applied to').' '.(Context::shop() == Shop::CONTEXT_SHOP ? $this->l('shop:').' '.$this->context->shop->name : $this->l('all shops')).'.
</div>
<legend><img src="'.$this->_path.'logo.gif" alt="" title="" />'.$this->l('Settings').'</legend> <legend><img src="'.$this->_path.'logo.gif" alt="" title="" />'.$this->l('Settings').'</legend>
<form action="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'" method="post" id="form"> <form action="'.$_SERVER['REQUEST_URI'].'" method="post" id="form">
<div style="display: none"> <div style="display: none">
<label>'.$this->l('Items').'</label> <label>'.$this->l('Items').'</label>
<div class="margin-form"> <div class="margin-form">
@@ -180,7 +149,7 @@ class blocktopmenu extends Module
// END Products // END Products
// BEGIN Menu Top Links // BEGIN Menu Top Links
$this->_html .= '<optgroup label="'.$this->l('Menu Top Links').'">'; $this->_html .= '<optgroup label="'.$this->l('Menu Top Links').'">';
$links = MenuTopLinks::gets($cookie->id_lang, null, (int)$this->context->shop->id); $links = MenuTopLinks::gets($cookie->id_lang);
foreach($links as $link) foreach($links as $link)
$this->_html .= '<option value="LNK'.$link['id_link'].'" style="margin-left:10px;">'.$link['label'].'</option>'; $this->_html .= '<option value="LNK'.$link['id_link'].'" style="margin-left:10px;">'.$link['label'].'</option>';
$this->_html .= '</optgroup>'; $this->_html .= '</optgroup>';
@@ -252,7 +221,7 @@ class blocktopmenu extends Module
$this->_html .= ' $this->_html .= '
<fieldset> <fieldset>
<legend><img src="../img/admin/add.gif" alt="" title="" />'.$this->l('Add Menu Top Link').'</legend> <legend><img src="../img/admin/add.gif" alt="" title="" />'.$this->l('Add Menu Top Link').'</legend>
<form action="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'" method="post" id="form"> <form action="'.$_SERVER['REQUEST_URI'].'" method="post" id="form">
<label>'.$this->l('Label').'</label> <label>'.$this->l('Label').'</label>
<div class="margin-form">'; <div class="margin-form">';
foreach ($languages as $language) foreach ($languages as $language)
@@ -293,7 +262,7 @@ class blocktopmenu extends Module
</tr> </tr>
</thead> </thead>
<tbody>'; <tbody>';
$links = MenuTopLinks::gets($cookie->id_lang, null, $this->context->shop->id); $links = MenuTopLinks::gets($cookie->id_lang);
foreach($links as $link) foreach($links as $link)
{ {
$this->_html .= ' $this->_html .= '
@@ -313,125 +282,108 @@ class blocktopmenu extends Module
$this->_html .= '</tbody> $this->_html .= '</tbody>
</table> </table>
</fieldset>'; </fieldset>';
return $this->_html; echo $this->_html;
} }
private function getMenuItems() private function getMenuItems()
{ {
if (Context::shop() == Shop::CONTEXT_SHOP) $items = Configuration::get('MOD_BLOCKTOPMENU_ITEMS');
{ $items = explode(',', $items);
if (!Configuration::isOverridenByCurrentContext('MOD_BLOCKTOPMENU_ITEMS')) return $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);
} }
private function makeMenuOption() private function makeMenuOption()
{ {
global $cookie; global $cookie;
foreach($this->getMenuItems() as $type => $items) foreach($this->getMenuItems() as $item)
{ {
foreach ($items as $item) $id = (int)substr($item, 3, strlen($item));
{ switch(substr($item, 0, 3))
$id = (int)substr($item, 3, strlen($item)); {
$disabled = ((Context::shop() == Shop::CONTEXT_SHOP && $type == 'global') ? ' disabled="disabled"': ''); case'CAT':
switch(substr($item, 0, 3)) $this->getCategoryOption($id, $cookie->id_lang, false);
{ break;
case'CAT': case'PRD':
$this->getCategoryOption($id, $cookie->id_lang, false); $product = new Product($id, true, $cookie->id_lang);
break; if(!is_null($product->id))
case'PRD': $this->_html .= '<option value="PRD'.$id.'">'.$product->name.'</option>'.PHP_EOL;
$product = new Product($id, true, $cookie->id_lang); break;
if(!is_null($product->id)) case'CMS':
$this->_html .= '<option value="PRD'.$id.'"'.$disabled.'>'.$product->name.'</option>'.PHP_EOL; $cms = CMS::getLinks($cookie->id_lang, array($id));
break; if(count($cms))
case'CMS': $this->_html .= '<option value="CMS'.$id.'">'.$cms[0]['meta_title'].'</option>'.PHP_EOL;
$cms = CMS::getLinks($cookie->id_lang, array($id)); break;
if(count($cms)) case'MAN':
$this->_html .= '<option value="CMS'.$id.'"'.$disabled.'>'.$cms[0]['meta_title'].'</option>'.PHP_EOL; $manufacturer = new Manufacturer($id, $cookie->id_lang);
break; if(!is_null($manufacturer->id))
case'MAN': $this->_html .= '<option value="MAN'.$id.'">'.$manufacturer->name.'</option>'.PHP_EOL;
$manufacturer = new Manufacturer($id, $cookie->id_lang); break;
if(!is_null($manufacturer->id)) case'SUP':
$this->_html .= '<option value="MAN'.$id.'"'.$disabled.'>'.$manufacturer->name.'</option>'.PHP_EOL; $supplier = new Supplier($id, $cookie->id_lang);
break; if(!is_null($supplier->id))
case'SUP': $this->_html .= '<option value="SUP'.$id.'">'.$supplier->name.'</option>'.PHP_EOL;
$supplier = new Supplier($id, $cookie->id_lang); break;
if(!is_null($supplier->id)) case'LNK':
$this->_html .= '<option value="SUP'.$id.'"'.$disabled.'>'.$supplier->name.'</option>'.PHP_EOL; $link = MenuTopLinks::get($id, $cookie->id_lang);
break; if(count($link))
case'LNK': $this->_html .= '<option value="LNK'.$id.'">'.$link[0]['label'].'</option>'.PHP_EOL;
$link = MenuTopLinks::get($id, $cookie->id_lang, (int)$this->context->shop->id); break;
if(count($link))
$this->_html .= '<option value="LNK'.$id.'"'.$disabled.'>'.$link[0]['label'].'</option>'.PHP_EOL;
break;
}
} }
} }
} }
private function makeMenu() private function makeMenu()
{ {
global $cookie, $page_name; global $cookie, $page_name;
foreach($this->getMenuItems() as $type => $items) foreach($this->getMenuItems() as $item)
{ {
foreach ($items as $item) $id = (int)substr($item, 3, strlen($item));
{ switch(substr($item, 0, 3))
$id = (int)substr($item, 3, strlen($item)); {
switch(substr($item, 0, 3)) case'CAT':
{ $this->getCategory($id, $cookie->id_lang);
case'CAT': break;
$this->getCategory($id, $cookie->id_lang); case'PRD':
break; $selected = ($page_name == 'product' && (Tools::getValue('id_product') == $id)) ? ' class="sfHover"' : '';
case'PRD': $product = new Product($id, true, $cookie->id_lang);
$selected = ($page_name == 'product' && (Tools::getValue('id_product') == $id)) ? ' class="sfHover"' : ''; if(!is_null($product->id))
$product = new Product($id, true, $cookie->id_lang); $this->_menu .= '<li'.$selected.'><a href="'.$product->getLink().'">'.$product->name.'</a></li>'.PHP_EOL;
if(!is_null($product->id)) break;
$this->_menu .= '<li'.$selected.'><a href="'.$product->getLink().'">'.$product->name.'</a></li>'.PHP_EOL; case'CMS':
break; $selected = ($page_name == 'cms' && (Tools::getValue('id_cms') == $id)) ? ' class="sfHover"' : '';
case'CMS': $cms = CMS::getLinks($cookie->id_lang, array($id));
$selected = ($page_name == 'cms' && (Tools::getValue('id_cms') == $id)) ? ' class="sfHover"' : ''; if(count($cms))
$cms = CMS::getLinks($cookie->id_lang, array($id)); $this->_menu .= '<li'.$selected.'><a href="'.$cms[0]['link'].'">'.$cms[0]['meta_title'].'</a></li>'.PHP_EOL;
if(count($cms)) break;
$this->_menu .= '<li'.$selected.'><a href="'.$cms[0]['link'].'">'.$cms[0]['meta_title'].'</a></li>'.PHP_EOL; case'MAN':
break; $selected = ($page_name == 'manufacturer' && (Tools::getValue('id_manufacturer') == $id)) ? ' class="sfHover"' : '';
case'MAN': $manufacturer = new Manufacturer($id, $cookie->id_lang);
$selected = ($page_name == 'manufacturer' && (Tools::getValue('id_manufacturer') == $id)) ? ' class="sfHover"' : ''; if(!is_null($manufacturer->id))
$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);
if (intval(Configuration::get('PS_REWRITING_SETTINGS'))) else
$manufacturer->link_rewrite = Tools::link_rewrite($manufacturer->name, false); $manufacturer->link_rewrite = 0;
else $link = new Link;
$manufacturer->link_rewrite = 0; $this->_menu .= '<li'.$selected.'><a href="'.$link->getManufacturerLink($id, $manufacturer->link_rewrite).'">'.$manufacturer->name.'</a></li>'.PHP_EOL;
$link = new Link; }
$this->_menu .= '<li'.$selected.'><a href="'.$link->getManufacturerLink($id, $manufacturer->link_rewrite).'">'.$manufacturer->name.'</a></li>'.PHP_EOL; break;
} case'SUP':
break; $selected = ($page_name == 'supplier' && (Tools::getValue('id_supplier') == $id)) ? ' class="sfHover"' : '';
case'SUP': $supplier = new Supplier($id, $cookie->id_lang);
$selected = ($page_name == 'supplier' && (Tools::getValue('id_supplier') == $id)) ? ' class="sfHover"' : ''; if(!is_null($supplier->id))
$supplier = new Supplier($id, $cookie->id_lang); {
if(!is_null($supplier->id)) $link = new Link;
{ $this->_menu .= '<li'.$selected.'><a href="'.$link->getSupplierLink($id, $supplier->link_rewrite).'">'.$supplier->name.'</a></li>'.PHP_EOL;
$link = new Link; }
$this->_menu .= '<li'.$selected.'><a href="'.$link->getSupplierLink($id, $supplier->link_rewrite).'">'.$supplier->name.'</a></li>'.PHP_EOL; break;
} case'LNK':
break; $link = MenuTopLinks::get($id, $cookie->id_lang);
case'LNK': if(count($link))
$link = MenuTopLinks::get($id, $cookie->id_lang, (int)$this->context->shop->id); $this->_menu .= '<li><a href="'.$link[0]['link'].'"'.(($link[0]['new_window']) ? ' target="_blank"': '').'>'.$link[0]['label'].'</a></li>'.PHP_EOL;
if(count($link)) break;
$this->_menu .= '<li><a href="'.$link[0]['link'].'"'.(($link[0]['new_window']) ? ' target="_blank"': '').'>'.$link[0]['label'].'</a></li>'.PHP_EOL; }
break; }
}
}
}
} }
private function getCategoryOption($id_category, $id_lang, $children = true) private function getCategoryOption($id_category, $id_lang, $children = true)
-25
View File
@@ -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 <contact@prestashop.com>
* @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 != ''} {if $MENU != ''}
</div> </div>
<!-- Menu --> <!-- Menu -->
-25
View File
@@ -1,29 +1,4 @@
<?php <?php
/*
* 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 <contact@prestashop.com>
* @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("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+14 -44
View File
@@ -1,50 +1,22 @@
<?php <?php
/*
* 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 <contact@prestashop.com>
* @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 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 SELECT l.id_link, l.new_window, l.link, ll.label
FROM '._DB_PREFIX_.'linksmenutop l 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.') LEFT JOIN '._DB_PREFIX_.'linksmenutop_lang ll ON (l.id_link = ll.id_link AND ll.id_lang = "'.$id_lang.'")
WHERE 1 '.((!is_null($id_link)) ? 'WHERE l.id_link = "'.$id_link.'"' : '').'
'.((!is_null($id_link)) ? ' AND l.id_link = "'.(int)$id_link.'"' : '').'
AND l.id_shop IN (0, '.(int)$id_shop.')
'); ');
} }
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)) if(!is_array($label))
return false; return false;
@@ -53,8 +25,7 @@ class MenuTopLinks
_DB_PREFIX_.'linksmenutop', _DB_PREFIX_.'linksmenutop',
array( array(
'new_window'=>(int)$newWindow, 'new_window'=>(int)$newWindow,
'link'=>pSQL($link), 'link'=>$link
'id_shop' => (int)$id_shop
), ),
'INSERT' 'INSERT'
); );
@@ -64,20 +35,19 @@ class MenuTopLinks
Db::getInstance()->autoExecute( Db::getInstance()->autoExecute(
_DB_PREFIX_.'linksmenutop_lang', _DB_PREFIX_.'linksmenutop_lang',
array( array(
'id_link'=>(int)$id_link, 'id_link'=>$id_link,
'id_lang'=>(int)$id_lang, 'id_lang'=>$id_lang,
'id_shop'=>(int)$id_shop, 'label'=>$label
'label'=>pSQL($label)
), ),
'INSERT' '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', "id_link = '{$id_link}'");
Db::getInstance()->delete(_DB_PREFIX_.'linksmenutop_lang', 'id_link = '.(int)$id_link); Db::getInstance()->delete(_DB_PREFIX_.'linksmenutop_lang', "id_link = '{$id_link}'");
} }
} }
?> ?>
+49
View File
@@ -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}
+10 -10
View File
@@ -19,22 +19,13 @@
* *
* @author PrestaShop SA <contact@prestashop.com> * @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 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) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<!-- Block user information module HEADER --> <!-- Block user information module HEADER -->
<div id="header_user"> <div id="header_user">
<p id="header_user_info">
{l s='Welcome' mod='blockuserinfo'},
{if $blockuserinfo_logged}
<span>{$blockuserinfo_firstName} {$blockuserinfo_lastName}</span>
(<a href="{$link->getPageLink('index', true, NULL, "mylogout")}" title="{l s='Log me out' mod='blockuserinfo'}">{l s='Log out' mod='blockuserinfo'}</a>)
{else}
<a href="{$link->getPageLink('my-account', true)}">{l s='Log in' mod='blockuserinfo'}</a>
{/if}
</p>
<ul id="header_nav"> <ul id="header_nav">
{if !$PS_CATALOG_MODE} {if !$PS_CATALOG_MODE}
<li id="shopping_cart"> <li id="shopping_cart">
@@ -58,5 +49,14 @@
{/if} {/if}
<li id="your_account"><a href="{$link->getPageLink('my-account', true)}" title="{l s='Your Account' mod='blockuserinfo'}">{l s='Your Account' mod='blockuserinfo'}</a></li> <li id="your_account"><a href="{$link->getPageLink('my-account', true)}" title="{l s='Your Account' mod='blockuserinfo'}">{l s='Your Account' mod='blockuserinfo'}</a></li>
</ul> </ul>
<p id="header_user_info">
{l s='Welcome' mod='blockuserinfo'}
{if $logged}
<span>{$cookie->customer_firstname} {$cookie->customer_lastname}</span>
<a href="{$link->getPageLink('index', true, NULL, "mylogout")}" title="{l s='Log me out' mod='blockuserinfo'}" class="logout">{l s='Log out' mod='blockuserinfo'}</a>
{else}
<a href="{$link->getPageLink('my-account', true)}" class="login">{l s='Log in' mod='blockuserinfo'}</a>
{/if}
</p>
</div> </div>
<!-- /Block user information module HEADER --> <!-- /Block user information module HEADER -->
Binary file not shown.

After

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 B

+30
View File
@@ -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
}
+6 -4
View File
@@ -19,7 +19,7 @@
* *
* @author PrestaShop SA <contact@prestashop.com> * @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 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) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
@@ -31,9 +31,11 @@
<ul class="products clearfix"> <ul class="products clearfix">
{foreach from=$blockviewed_productsViewedObj item=viewedProduct name=myLoop} {foreach from=$blockviewed_productsViewedObj item=viewedProduct name=myLoop}
<li class="clearfix{if $smarty.foreach.myLoop.last} last_item{elseif $smarty.foreach.myLoop.first} first_item{else} item{/if}"> <li class="clearfix{if $smarty.foreach.myLoop.last} last_item{elseif $smarty.foreach.myLoop.first} first_item{else} item{/if}">
<a href="{$link->getProductLink($viewedProduct->id, $viewedProduct->link_rewrite, $viewedProduct->category_rewrite)}" title="{l s='More about' mod='blockviewed'} {$viewedProduct->name|escape:html:'UTF-8'}"><img src="{$link->getImageLink($viewedProduct->link_rewrite, $viewedProduct->cover, 'medium')}" height="{$blockviewed_mediumSize.height}" width="{$blockviewed_mediumSize.width}" alt="{$viewedProduct->legend|escape:html:'UTF-8'}" /></a> <a href="{$link->getProductLink($viewedProduct->id, $viewedProduct->link_rewrite, $viewedProduct->category_rewrite)}" title="{l s='More about' mod='blockviewed'} {$viewedProduct->name|escape:html:'UTF-8'}" class="content_img"><img src="{$link->getImageLink($viewedProduct->link_rewrite, $viewedProduct->cover, 'medium')}" height="{$blockviewed_mediumSize.height}" width="{$blockviewed_mediumSize.width}" alt="{$viewedProduct->legend|escape:html:'UTF-8'}" /></a>
<h5><a href="{$link->getProductLink($viewedProduct->id, $viewedProduct->link_rewrite, $viewedProduct->category_rewrite)}" title="{l s='More about' mod='blockviewed'} {$viewedProduct->name|escape:html:'UTF-8'}">{$viewedProduct->name|truncate:14:'...'|escape:html:'UTF-8'}</a></h5> <div class="text_desc">
<p>{$viewedProduct->description_short|strip_tags:'UTF-8'|truncate:44}<a href="{$link->getProductLink($viewedProduct->id, $viewedProduct->link_rewrite, $viewedProduct->category_rewrite)}" title="{l s='More about' mod='blockviewed'} {$viewedProduct->name|escape:html:'UTF-8'}"><img src="{$img_dir}bullet.gif" alt="&gt;&gt;" width="10" height="7" /></a></p> <h5><a href="{$link->getProductLink($viewedProduct->id, $viewedProduct->link_rewrite, $viewedProduct->category_rewrite)}" title="{l s='More about' mod='blockviewed'} {$viewedProduct->name|escape:html:'UTF-8'}">{$viewedProduct->name|truncate:14:'...'|escape:html:'UTF-8'}</a></h5>
<p><a href="{$link->getProductLink($viewedProduct->id, $viewedProduct->link_rewrite, $viewedProduct->category_rewrite)}" title="{l s='More about' mod='blockviewed'} {$viewedProduct->name|escape:html:'UTF-8'}">{$viewedProduct->description_short|strip_tags:'UTF-8'|truncate:44}</a></p>
</div>
</li> </li>
{/foreach} {/foreach}
</ul> </ul>
@@ -24,4 +24,4 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
<p class="buttons_bottom_block"><a href="#" id="wishlist_button" class="button" onclick="WishlistCart('wishlist_block_list', 'add', '{$id_product|intval}', $('#idCombination').val(), document.getElementById('quantity_wanted').value); return false;">{l s='Add to my wishlist' mod='blockwishlist'}</a></p> <p class="buttons_bottom_block"><a href="#" id="wishlist_button" onclick="WishlistCart('wishlist_block_list', 'add', '{$id_product|intval}', $('#idCombination').val(), document.getElementById('quantity_wanted').value); return false;">&raquo; {l s='Add to my wishlist' mod='blockwishlist'}</a></p>
+231
View File
@@ -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
}
+4 -4
View File
@@ -26,7 +26,7 @@
<div id="wishlist_block" class="block account"> <div id="wishlist_block" class="block account">
<h4> <h4>
<a href="{$base_dir_ssl}modules/blockwishlist/mywishlist.php">{l s='Wishlist' mod='blockwishlist'}</a> <a href="{$base_dir_ssl}/modules/blockwishlist/mywishlist.php">{l s='Wishlist' mod='blockwishlist'}</a>
</h4> </h4>
<div class="block_content"> <div class="block_content">
<div id="wishlist_block_list" class="expanded"> <div id="wishlist_block_list" class="expanded">
@@ -37,7 +37,7 @@
<span class="quantity-formated"><span class="quantity">{$product.quantity|intval}</span>x</span> <span class="quantity-formated"><span class="quantity">{$product.quantity|intval}</span>x</span>
<a class="cart_block_product_name" <a class="cart_block_product_name"
href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category_rewrite)}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|truncate:30:'...'|escape:'htmlall':'UTF-8'}</a> href="{$link->getProductLink($product.id_product, $product.link_rewrite, $product.category_rewrite)}" title="{$product.name|escape:'htmlall':'UTF-8'}">{$product.name|truncate:30:'...'|escape:'htmlall':'UTF-8'}</a>
<a class="ajax_cart_block_remove_link" href="javascript:;" onclick="javascript:WishlistCart('wishlist_block_list', 'delete', '{$product.id_product}', {$product.id_product_attribute}, '0', '{$token}');" title="{l s='remove this product from my wishlist' mod='blockwishlist'}"><img src="{$img_dir}icon/delete.gif" width="11" height="13" alt="{l s='Delete'}" class="icon" /></a> <a class="ajax_cart_block_remove_link" href="javascript:;" onclick="javascript:WishlistCart('wishlist_block_list', 'delete', '{$product.id_product}', {$product.id_product_attribute}, '0', '{$token}');" title="{l s='remove this product from my wishlist' mod='blockwishlist'}"><img src="{$img_dir}icon/delete.gif" width="12" height="12" alt="{l s='Delete'}" class="icon" /></a>
</dt> </dt>
{if isset($product.attributes_small)} {if isset($product.attributes_small)}
<dd class="{if $smarty.foreach.i.first}first_item{elseif $smarty.foreach.i.last}last_item{else}item{/if}"> <dd class="{if $smarty.foreach.i.first}first_item{elseif $smarty.foreach.i.last}last_item{else}item{/if}">
@@ -52,7 +52,7 @@
</dl> </dl>
{/if} {/if}
</div> </div>
<p class="align_center"> <p class="lnk">
{if $wishlists} {if $wishlists}
<select name="wishlists" id="wishlists" onchange="WishlistChangeDefault('wishlist_block_list', $('#wishlists').val());"> <select name="wishlists" id="wishlists" onchange="WishlistChangeDefault('wishlist_block_list', $('#wishlists').val());">
{foreach from=$wishlists item=wishlist name=i} {foreach from=$wishlists item=wishlist name=i}
@@ -60,7 +60,7 @@
{/foreach} {/foreach}
</select> </select>
{/if} {/if}
<a href="{$base_dir_ssl}modules/blockwishlist/mywishlist.php" class="exclusive" title="{l s='My wishlists' mod='blockwishlist'}">{l s='My wishlists' mod='blockwishlist'}</a> <a href="{$base_dir_ssl}modules/blockwishlist/mywishlist.php" title="{l s='My wishlists' mod='blockwishlist'}">&raquo; {l s='My wishlists' mod='blockwishlist'}</a>
</p> </p>
</div> </div>
</div> </div>
+62 -50
View File
@@ -25,56 +25,67 @@
*} *}
{if $products} {if $products}
{if !$refresh} {if !$refresh}
<br /> <div class="wishlistLinkTop">
<a href="#" id="hideBoughtProducts" class="button_account" onclick="WishlistVisibility('wlp_bought', 'BoughtProducts'); return false;">{l s='Hide products' mod='blockwishlist'}</a> <a href="#" id="hideSendWishlist" class="button_account" onclick="WishlistVisibility('wishlistLinkTop', 'SendWishlist'); return false;">{l s='Close send this wishlist' mod='blockwishlist'}</a>
<a href="#" id="showBoughtProducts" class="button_account" onclick="WishlistVisibility('wlp_bought', 'BoughtProducts'); return false;">{l s='Show products' mod='blockwishlist'}</a> <ul class="clearfix display_list">
{if count($productsBoughts)} <li>
<a href="#" id="hideBoughtProductsInfos" class="button_account" onclick="WishlistVisibility('wlp_bought_infos', 'BoughtProductsInfos'); return false;">{l s='Hide bought product\'s info' mod='blockwishlist'}</a> <a href="#" id="hideBoughtProducts" class="button_account" onclick="WishlistVisibility('wlp_bought', 'BoughtProducts'); return false;">{l s='Hide products' mod='blockwishlist'}</a>
<a href="#" id="showBoughtProductsInfos" class="button_account" onclick="WishlistVisibility('wlp_bought_infos', 'BoughtProductsInfos'); return false;">{l s='Show bought product\'s info' mod='blockwishlist'}</a> <a href="#" id="showBoughtProducts" class="button_account" onclick="WishlistVisibility('wlp_bought', 'BoughtProducts'); return false;">{l s='Show products' mod='blockwishlist'}</a>
</li>
{if count($productsBoughts)}
<li>
<a href="#" id="hideBoughtProductsInfos" class="button_account" onclick="WishlistVisibility('wlp_bought_infos', 'BoughtProductsInfos'); return false;">{l s='Hide bought product\'s info' mod='blockwishlist'}</a>
<a href="#" id="showBoughtProductsInfos" class="button_account" onclick="WishlistVisibility('wlp_bought_infos', 'BoughtProductsInfos'); return false;">{l s='Show bought product\'s info' mod='blockwishlist'}</a>
</li>
{/if}
</ul>
<p class="wishlisturl">Permalink : <input type="text" value="{$base_dir_ssl}modules/blockwishlist/view.php?token={$token_wish|escape:'htmlall':'UTF-8'}" style="width:540px;" readonly="readonly" /></p>
<p class="submit">
<a href="#" id="showSendWishlist" class="button_account exclusive" onclick="WishlistVisibility('wl_send', 'SendWishlist'); return false;">{l s='Send this wishlist' mod='blockwishlist'}</a>
</p>
{/if} {/if}
<a href="#" id="showSendWishlist" class="button_account" onclick="WishlistVisibility('wl_send', 'SendWishlist'); return false;">{l s='Send this wishlist' mod='blockwishlist'}</a>
<a href="#" id="hideSendWishlist" class="button_account" onclick="WishlistVisibility('wl_send', 'SendWishlist'); return false;">{l s='Close send this wishlist' mod='blockwishlist'}</a>
<span class="clear"></span>
<br />
Permalink :<br/><input type="text" value="{$base_dir_ssl}modules/blockwishlist/view.php?token={$token_wish|escape:'htmlall':'UTF-8'}" style="width:540px;" readonly/>
{/if}
<div class="wlp_bought"> <div class="wlp_bought">
{foreach from=$products item=product name=i} <ul class="clearfix wlp_bought_list">
<ul class="address {if $smarty.foreach.i.index % 2}alternate_{/if}item" style="margin:5px 0 0 5px;border-bottom:1px solid #ccc;" id="wlp_{$product.id_product}_{$product.id_product_attribute}"> {foreach from=$products item=product name=i}
<li class="address_title">{$product.name|truncate:30:'...'|escape:'htmlall':'UTF-8'}</li> <li id="wlp_{$product.id_product}_{$product.id_product_attribute}" class="clearfix address {if $smarty.foreach.i.index % 2}alternate_{/if}item">
<li class="address_name"> <a href="javascript:;" class="lnkdel" onclick="WishlistProductManage('wlp_bought', 'delete', '{$id_wishlist}', '{$product.id_product}', '{$product.id_product_attribute}', $('#quantity_{$product.id_product}_{$product.id_product_attribute}').val(), $('#priority_{$product.id_product}_{$product.id_product_attribute}').val());" title="{l s='Delete' mod='blockwishlist'}">&raquo; {l s='Delete' mod='blockwishlist'}</a>
<a href="{$link->getProductlink($product.id_product, $product.link_rewrite, $product.category_rewrite)}" title="{l s='Product detail' mod='blockwishlist'}"> <div class="clearfix">
<img src="{$link->getImageLink($product.link_rewrite, $product.cover, 'medium')}" alt="{$product.name|escape:'htmlall':'UTF-8'}" /> <div class="product_image">
</a> <a href="{$link->getProductlink($product.id_product, $product.link_rewrite, $product.category_rewrite)}" title="{l s='Product detail' mod='blockwishlist'}">
<span class="wishlist_product_detail"> <img src="{$link->getImageLink($product.link_rewrite, $product.cover, 'medium')}" alt="{$product.name|escape:'htmlall':'UTF-8'}" />
{if isset($product.attributes_small)} </a>
<a href="{$link->getProductlink($product.id_product, $product.link_rewrite, $product.category_rewrite)}" title="{l s='Product detail' mod='blockwishlist'}">{$product.attributes_small|escape:'htmlall':'UTF-8'}</a> </div>
{/if} <div class="product_infos">
<br />{l s='Quantity' mod='blockwishlist'}:<input type="text" id="quantity_{$product.id_product}_{$product.id_product_attribute}" value="{$product.quantity|intval}" size="3" /> <h5 class="product_name">{$product.name|truncate:30:'...'|escape:'htmlall':'UTF-8'}</h5>
<br /><br />{l s='Priority' mod='blockwishlist'}: <select id="priority_{$product.id_product}_{$product.id_product_attribute}"> <span class="wishlist_product_detail">
<option value="0"{if $product.priority eq 0} selected="selected"{/if}>{l s='High' mod='blockwishlist'}</option> {if isset($product.attributes_small)}
<option value="1"{if $product.priority eq 1} selected="selected"{/if}>{l s='Medium' mod='blockwishlist'}</option> <a href="{$link->getProductlink($product.id_product, $product.link_rewrite, $product.category_rewrite)}" title="{l s='Product detail' mod='blockwishlist'}">{$product.attributes_small|escape:'htmlall':'UTF-8'}</a>
<option value="2"{if $product.priority eq 2} selected="selected"{/if}>{l s='Low' mod='blockwishlist'}</option> {/if}
</select> <br />{l s='Quantity' mod='blockwishlist'}:<input type="text" id="quantity_{$product.id_product}_{$product.id_product_attribute}" value="{$product.quantity|intval}" size="3" />
</span> <br /><br />
<a href="javascript:;" class="clear button" onclick="WishlistProductManage('wlp_bought', 'delete', '{$id_wishlist}', '{$product.id_product}', '{$product.id_product_attribute}', $('#quantity_{$product.id_product}_{$product.id_product_attribute}').val(), $('#priority_{$product.id_product}_{$product.id_product_attribute}').val());" title="{l s='Delete' mod='blockwishlist'}">{l s='Delete' mod='blockwishlist'}</a> {l s='Priority' mod='blockwishlist'}:
<a href="javascript:;" class="exclusive" onclick="WishlistProductManage('wlp_bought_{$product.id_product_attribute}', 'update', '{$id_wishlist}', '{$product.id_product}', '{$product.id_product_attribute}', $('#quantity_{$product.id_product}_{$product.id_product_attribute}').val(), $('#priority_{$product.id_product}_{$product.id_product_attribute}').val());" title="{l s='Save' mod='blockwishlist'}">{l s='Save' mod='blockwishlist'}</a> <select id="priority_{$product.id_product}_{$product.id_product_attribute}">
<br /> <option value="0"{if $product.priority eq 0} selected="selected"{/if}>{l s='High' mod='blockwishlist'}</option>
</li> <option value="1"{if $product.priority eq 1} selected="selected"{/if}>{l s='Medium' mod='blockwishlist'}</option>
</ul> <option value="2"{if $product.priority eq 2} selected="selected"{/if}>{l s='Low' mod='blockwishlist'}</option>
<div class="clear">&nbsp;</div> </select>
{/foreach} </span>
</div>
</div>
<div class="btn_action">
<a href="javascript:;" class="exclusive lnksave" onclick="WishlistProductManage('wlp_bought_{$product.id_product_attribute}', 'update', '{$id_wishlist}', '{$product.id_product}', '{$product.id_product_attribute}', $('#quantity_{$product.id_product}_{$product.id_product_attribute}').val(), $('#priority_{$product.id_product}_{$product.id_product_attribute}').val());" title="{l s='Save' mod='blockwishlist'}">{l s='Save' mod='blockwishlist'}</a>
</div>
</li>
{/foreach}
</ul>
</div> </div>
<div class="clear"></div>
<br />
{if !$refresh} {if !$refresh}
<form method="post" class="wl_send std hidden" onsubmit="return (false);"> <form method="post" class="wl_send std hidden" onsubmit="return (false);">
<fieldset> <fieldset>
<p class="required"> <p class="required">
<label for="email1">{l s='Email' mod='blockwishlist'}1</label> <label for="email1">{l s='Email' mod='blockwishlist'}1 <sup>*</sup></label>
<input type="text" name="email1" id="email1" /> <input type="text" name="email1" id="email1" />
<sup>*</sup>
</p> </p>
{section name=i loop=11 start=2} {section name=i loop=11 start=2}
<p> <p>
@@ -86,8 +97,7 @@
<input class="button" type="submit" value="{l s='Send' mod='blockwishlist'}" name="submitWishlist" onclick="WishlistSend('wl_send', '{$id_wishlist}', 'email');" /> <input class="button" type="submit" value="{l s='Send' mod='blockwishlist'}" name="submitWishlist" onclick="WishlistSend('wl_send', '{$id_wishlist}', 'email');" />
</p> </p>
<p class="required"> <p class="required">
<sup>*</sup> <sup>*</sup> {l s='Required field'}
{l s='Required field'}
</p> </p>
</fieldset> </fieldset>
</form> </form>
@@ -107,11 +117,13 @@
{if $bought.quantity > 0} {if $bought.quantity > 0}
<tr> <tr>
<td class="first_item"> <td class="first_item">
<span style="float:left;"><img src="{$link->getImageLink($product.link_rewrite, $product.cover, 'small')}" alt="{$product.name|escape:'htmlall':'UTF-8'}" /></span> <span style="float:left;"><img src="{$link->getImageLink($product.link_rewrite, $product.cover, 'small')}" alt="{$product.name|escape:'htmlall':'UTF-8'}" /></span>
<span style="float:left;">{$product.name|truncate:40:'...'|escape:'htmlall':'UTF-8'} <span style="float:left;">
{if isset($product.attributes_small)} {$product.name|truncate:40:'...'|escape:'htmlall':'UTF-8'}
<br /><i>{$product.attributes_small|escape:'htmlall':'UTF-8'}</i> {if isset($product.attributes_small)}
{/if}</span> <br /><i>{$product.attributes_small|escape:'htmlall':'UTF-8'}</i>
{/if}
</span>
</td> </td>
<td class="item align_center">{$bought.quantity|intval}</td> <td class="item align_center">{$bought.quantity|intval}</td>
<td class="item align_center">{$bought.firstname} {$bought.lastname}</td> <td class="item align_center">{$bought.firstname} {$bought.lastname}</td>
@@ -125,5 +137,5 @@
{/if} {/if}
{/if} {/if}
{else} {else}
{l s='No products' mod='blockwishlist'} <p class="warning">{l s='No products' mod='blockwishlist'}</p>
{/if} {/if}
+2 -2
View File
@@ -25,7 +25,7 @@
*} *}
<!-- MODULE WishList --> <!-- MODULE WishList -->
<li> <li class="lnk_wishlist">
<a href="{$base_dir_ssl}modules/blockwishlist/mywishlist.php" title="{l s='My wishlists' mod='blockwishlist'}"><img src="{$module_template_dir}logo.gif" alt="{l s='wishlist' mod='blockwishlist'}" class="icon" /></a><a href="{$base_dir_ssl}modules/blockwishlist/mywishlist.php" title="{l s='My wishlists' mod='blockwishlist'}">{l s='My wishlists' mod='blockwishlist'}</a> <a href="{$base_dir_ssl}modules/blockwishlist/mywishlist.php" title="{l s='My wishlists' mod='blockwishlist'}"><img src="{$module_template_dir}img/gift.gif" alt="{l s='wishlist' mod='blockwishlist'}" class="icon" /> {l s='My wishlists' mod='blockwishlist'}</a>
</li> </li>
<!-- END : MODULE WishList --> <!-- END : MODULE WishList -->
+30 -24
View File
@@ -33,13 +33,17 @@
{include file="$tpl_dir./errors.tpl"} {include file="$tpl_dir./errors.tpl"}
{if $id_customer|intval neq 0} {if $id_customer|intval neq 0}
<form action="{$base_dir_ssl}modules/blockwishlist/mywishlist.php" method="post" class="std"> <form action="{$base_dir_ssl}modules/blockwishlist/mywishlist.php" method="post" class="std" id="form_wishlist">
<fieldset> <fieldset>
<h3>{l s='New wishlist' mod='blockwishlist'}</h3> <h3>{l s='New wishlist' mod='blockwishlist'}</h3>
<input type="hidden" name="token" value="{$token|escape:'htmlall':'UTF-8'}" /> <p class="text">
<label class="align_right" for="name">{l s='Name' mod='blockwishlist'}</label> <input type="hidden" name="token" value="{$token|escape:'htmlall':'UTF-8'}" />
<input type="text" id="name" name="name" value="{if isset($smarty.post.name) and $errors|@count > 0}{$smarty.post.name|escape:'htmlall':'UTF-8'}{/if}" /> <label class="align_right" for="name">{l s='Name' mod='blockwishlist'}</label>
<input type="submit" name="submitWishlist" id="submitWishlist" value="{l s='Save' mod='blockwishlist'}" class="exclusive" /> <input type="text" id="name" name="name" class="inputTxt" value="{if isset($smarty.post.name) and $errors|@count > 0}{$smarty.post.name|escape:'htmlall':'UTF-8'}{/if}" />
</p>
<p class="submit">
<input type="submit" name="submitWishlist" id="submitWishlist" value="{l s='Save' mod='blockwishlist'}" class="exclusive" />
</p>
</fieldset> </fieldset>
</form> </form>
{if $wishlists} {if $wishlists}
@@ -58,25 +62,27 @@
<tbody> <tbody>
{section name=i loop=$wishlists} {section name=i loop=$wishlists}
<tr id="wishlist_{$wishlists[i].id_wishlist|intval}"> <tr id="wishlist_{$wishlists[i].id_wishlist|intval}">
<td class="bold" style="width:200px;"><a href="javascript:;" onclick="javascript:WishlistManage('block-order-detail', '{$wishlists[i].id_wishlist|intval}');">{$wishlists[i].name|truncate:30:'...'|escape:'htmlall':'UTF-8'}</a></td> <td style="width:200px;">
<td class="bold align_center"> <a href="javascript:;" onclick="javascript:WishlistManage('block-order-detail', '{$wishlists[i].id_wishlist|intval}');">{$wishlists[i].name|truncate:30:'...'|escape:'htmlall':'UTF-8'}</a>
{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}
</td> </td>
<td class="align_center">{$wishlists[i].counter|intval}</td> <td class="bold align_center">
<td class="align_center">{$wishlists[i].date_add|date_format:"%Y-%m-%d"}</td> {assign var=n value=0}
<td class="align_center"><a href="javascript:;" onclick="javascript:WishlistManage('block-order-detail', '{$wishlists[i].id_wishlist|intval}');">{l s='View' mod='blockwishlist'}</a></td> {foreach from=$nbProducts item=nb name=i}
<td class="align_center"> {if $nb.id_wishlist eq $wishlists[i].id_wishlist}
<a href="javascript:;"onclick="return (WishlistDelete('wishlist_{$wishlists[i].id_wishlist|intval}', '{$wishlists[i].id_wishlist|intval}', '{l s='Do you really want to delete this wishlist ?' mod='blockwishlist'}'));"><img src="{$content_dir}modules/blockwishlist/img/icon/delete.png" alt="{l s='Delete' mod='blockwishlist'}" /></a> {assign var=n value=$nb.nbProducts|intval}
{/if}
{/foreach}
{if $n}
{$n|intval}
{else}
0
{/if}
</td>
<td>{$wishlists[i].counter|intval}</td>
<td>{$wishlists[i].date_add|date_format:"%Y-%m-%d"}</td>
<td><a href="javascript:;" onclick="javascript:WishlistManage('block-order-detail', '{$wishlists[i].id_wishlist|intval}');">{l s='View' mod='blockwishlist'}</a></td>
<td class="wishlist_delete">
<a href="javascript:;"onclick="return (WishlistDelete('wishlist_{$wishlists[i].id_wishlist|intval}', '{$wishlists[i].id_wishlist|intval}', '{l s='Do you really want to delete this wishlist ?' mod='blockwishlist'}'));">{l s='Delete' mod='blockwishlist'}</a>
</td> </td>
</tr> </tr>
{/section} {/section}
@@ -89,6 +95,6 @@
<ul class="footer_links"> <ul class="footer_links">
<li><a href="{$link->getPageLink('my-account', true)}"><img src="{$img_dir}icon/my-account.gif" alt="" class="icon" /></a><a href="{$link->getPageLink('my-account', true)}">{l s='Back to Your Account' mod='blockwishlist'}</a></li> <li><a href="{$link->getPageLink('my-account', true)}"><img src="{$img_dir}icon/my-account.gif" alt="" class="icon" /></a><a href="{$link->getPageLink('my-account', true)}">{l s='Back to Your Account' mod='blockwishlist'}</a></li>
<li><a href="{$base_dir}"><img src="{$img_dir}icon/home.gif" alt="" class="icon" /></a><a href="{$base_dir}">{l s='Home' mod='blockwishlist'}</a></li> <li class="f_right"><a href="{$base_dir}"><img src="{$img_dir}icon/home.gif" alt="" class="icon" /></a><a href="{$base_dir}">{l s='Home' mod='blockwishlist'}</a></li>
</ul> </ul>
</div> </div>
+1 -2
View File
@@ -87,11 +87,10 @@
</li> </li>
</div> </div>
</ul> </ul>
<div class="clear">&nbsp;</div>
{/foreach} {/foreach}
<p class="clear" /> <p class="clear" />
</div> </div>
{else} {else}
{l s='No products' mod='blockwishlist'} <p class="warning">{l s='No products' mod='blockwishlist'}</p>
{/if} {/if}
</div> </div>
+1 -1
View File
@@ -68,7 +68,7 @@ else
$smarty->assign('this_path', __PS_BASE_URI__.'modules/cashondelivery/'); $smarty->assign('this_path', __PS_BASE_URI__.'modules/cashondelivery/');
$template = 'validation.tpl'; $template = 'validation.tpl';
echo $cashOnDelivery->display('cashondelivery', $template); echo Module::display('cashondelivery', $template);
} }
include(dirname(__FILE__).'/../../footer.php'); include(dirname(__FILE__).'/../../footer.php');
+1 -1
View File
@@ -540,7 +540,7 @@ abstract class PrepaidServices extends PaymentModule
} }
if (!empty($params)) if (!empty($params))
$dataSync = '<img src="http://api.prestashop.com/modules/'.$this->name.'.png'.$params.'" style="float:right" />'; $dataSync = '<img src="http://www.prestashop.com/modules/'.$this->name.'.png'.$params.'" style="float:right" />';
return $this->displayConfirmation($this->getL('settings_updated').$dataSync); return $this->displayConfirmation($this->getL('settings_updated').$dataSync);
} }
+3 -3
View File
@@ -49,9 +49,9 @@ class CashTicket extends PrepaidServices
protected $certificat_dir; protected $certificat_dir;
protected $register_url = array('en' => 'http://api.prestashop.com/partner/url.php?to=http://www.cash-ticket.com/uk', protected $register_url = array('en' => 'http://www.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', 'fr' => 'http://www.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'); 'es' => 'http://www.prestashop.com/partner/url.php?to=http://www.cash-ticket.com/es');
public function __construct() public function __construct()
{ {
-4
View File
@@ -173,7 +173,6 @@ class Cheque extends PaymentModule
$state = $params['objOrder']->getCurrentState(); $state = $params['objOrder']->getCurrentState();
if ($state == Configuration::get('PS_OS_CHEQUE') OR $state == Configuration::get('PS_OS_OUTOFSTOCK')) if ($state == Configuration::get('PS_OS_CHEQUE') OR $state == Configuration::get('PS_OS_OUTOFSTOCK'))
{
$this->context->smarty->assign(array( $this->context->smarty->assign(array(
'total_to_pay' => Tools::displayPrice($params['total_to_pay'], $params['currencyObj'], false), 'total_to_pay' => Tools::displayPrice($params['total_to_pay'], $params['currencyObj'], false),
'chequeName' => $this->chequeName, 'chequeName' => $this->chequeName,
@@ -181,9 +180,6 @@ class Cheque extends PaymentModule
'status' => 'ok', 'status' => 'ok',
'id_order' => $params['objOrder']->id 'id_order' => $params['objOrder']->id
)); ));
if (isset($params['objOrder']->reference) && !empty($params['objOrder']->reference))
$this->context->smarty->assign('reference', $params['objOrder']->reference);
}
else else
$this->context->smarty->assign('status', 'failed'); $this->context->smarty->assign('status', 'failed');
return $this->display(__FILE__, 'payment_return.tpl'); return $this->display(__FILE__, 'payment_return.tpl');
-5
View File
@@ -31,11 +31,6 @@
<br /><br />- {l s='an amount of' mod='cheque'} <span class="price">{$total_to_pay}</span> <br /><br />- {l s='an amount of' mod='cheque'} <span class="price">{$total_to_pay}</span>
<br /><br />- {l s='payable to the order of' mod='cheque'} <span class="bold">{if $chequeName}{$chequeName}{else}___________{/if}</span> <br /><br />- {l s='payable to the order of' mod='cheque'} <span class="bold">{if $chequeName}{$chequeName}{else}___________{/if}</span>
<br /><br />- {l s='mail to' mod='cheque'} <span class="bold">{if $chequeAddress}{$chequeAddress}{else}___________{/if}</span> <br /><br />- {l s='mail to' mod='cheque'} <span class="bold">{if $chequeAddress}{$chequeAddress}{else}___________{/if}</span>
{if !isset($reference)}
<br /><br />- {l s='Do not forget to insert your order number #' mod='cheque'} <span class="bold">{$id_order}</span>
{else}
<br /><br />- {l s='Do not forget to insert your order reference' mod='cheque'} <span class="bold">{$reference}</span>
{/if}
<br /><br />{l s='An e-mail has been sent to you with this information.' mod='cheque'} <br /><br />{l s='An e-mail has been sent to you with this information.' mod='cheque'}
<br /><br /><span class="bold">{l s='Your order will be sent as soon as we receive your payment.' mod='cheque'}</span> <br /><br /><span class="bold">{l s='Your order will be sent as soon as we receive your payment.' mod='cheque'}</span>
<br /><br />{l s='For any questions or for further information, please contact our' mod='cheque'} <a href="{$link->getPageLink('contact', true)}">{l s='customer support' mod='cheque'}</a>. <br /><br />{l s='For any questions or for further information, please contact our' mod='cheque'} <a href="{$link->getPageLink('contact', true)}">{l s='customer support' mod='cheque'}</a>.
+1 -1
View File
@@ -84,7 +84,7 @@ class Criteo extends Module
{ {
return ' return '
<fieldset> <fieldset>
'.($this->_postProcess() ? $this->displayConfirmation($this->l('Settings are updated').'<img src="http://api.prestashop.com/modules/criteo.png?normal_id='.urlencode(Tools::getValue('id_criteo_normal')).'&conversion_id='.Tools::getValue('id_criteo_conversion').'" style="float:right" />') : '').' '.($this->_postProcess() ? $this->displayConfirmation($this->l('Settings are updated').'<img src="http://www.prestashop.com/modules/criteo.png?normal_id='.urlencode(Tools::getValue('id_criteo_normal')).'&conversion_id='.Tools::getValue('id_criteo_conversion').'" style="float:right" />') : '').'
<legend><img src="'.$this->_path.'logo.gif" alt="" title=""/> '.$this->l('Criteo Export').'</legend> <legend><img src="'.$this->_path.'logo.gif" alt="" title=""/> '.$this->l('Criteo Export').'</legend>
<form method="post" action="" name="criteoForm"> <form method="post" action="" name="criteoForm">
<label for="id_normal_criteo">'.$this->l('Criteo normal identifier').' :</label> <label for="id_normal_criteo">'.$this->l('Criteo normal identifier').' :</label>
+64
View File
@@ -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') }
*/
+7 -17
View File
@@ -19,7 +19,7 @@
* *
* @author PrestaShop SA <contact@prestashop.com> * @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 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) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
@@ -28,25 +28,15 @@
<div id="crossselling"> <div id="crossselling">
<script type="text/javascript">var middle = {$middlePosition_crossselling};</script> <script type="text/javascript">var middle = {$middlePosition_crossselling};</script>
<script type="text/javascript" src="{$content_dir}modules/crossselling/js/crossselling.js"></script> <script type="text/javascript" src="{$content_dir}modules/crossselling/js/crossselling.js"></script>
<h2 class="productscategory_h2"> <h2 class="productscategory_h2">{l s='Customers who bought this product also bought:' mod='crossselling'}</h2>
{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}
</h2>
<div id="{if count($orderProducts) > 5}crossselling{else}crossselling_noscroll{/if}"> <div id="{if count($orderProducts) > 5}crossselling{else}crossselling_noscroll{/if}">
{if count($orderProducts) > 5}<a id="crossselling_scroll_left" title="{l s='Previous' mod='crossselling'}" href="javascript:{ldelim}{rdelim}">{l s='Previous' mod='crossselling'}</a>{/if} {if count($orderProducts) > 5}<a id="crossselling_scroll_left" title="{l s='Previous' mod='crossselling'}" href="javascript:{ldelim}{rdelim}">{l s='Previous' mod='crossselling'}</a>{/if}
<div id="crossselling_list"> <div id="crossselling_list">
<ul {if count($orderProducts) > 5}style="width: {math equation="width * nbImages" width=107 nbImages=$orderProducts|@count}px"{/if}> <ul class="clearfix">
{foreach from=$orderProducts item='orderProduct' name=orderProduct} {foreach from=$orderProducts item='orderProduct' name=orderProduct}
<li {if count($orderProducts) < 6}style="width: {math equation="width / nbImages" width=94 nbImages=$orderProducts|@count}%"{/if}> <li>
<a href="{$orderProduct.link}" title="{$orderProduct.name|htmlspecialchars}"> <a href="{$orderProduct.link}" title="{$orderProduct.name|htmlspecialchars}" class="lnk_img"><img src="{$orderProduct.image}" alt="{$orderProduct.name|htmlspecialchars}" /></a>
<img src="{$orderProduct.image}" alt="{$orderProduct.name|htmlspecialchars}" /> <p class="product_name"><a href="{$orderProduct.link}" title="{$orderProduct.name|htmlspecialchars}">{$orderProduct.name|truncate:15:'...'|escape:'htmlall':'UTF-8'}</a></p>
</a><br/>
<a href="{$orderProduct.link}" title="{$orderProduct.name|htmlspecialchars}">
{$orderProduct.name|truncate:15:'...'|escape:'htmlall':'UTF-8'}
</a><br />
{if $crossDisplayPrice AND $orderProduct.show_price == 1 AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE} {if $crossDisplayPrice AND $orderProduct.show_price == 1 AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}
<span class="price_display"> <span class="price_display">
<span class="price">{convertPrice price=$orderProduct.displayed_price}</span> <span class="price">{convertPrice price=$orderProduct.displayed_price}</span>
@@ -54,7 +44,7 @@
{else} {else}
<br /> <br />
{/if} {/if}
<a title="{l s='View' mod='crossselling'}" href="{$orderProduct.link}" class="button_small">{l s='View' mod='crossselling'}</a><br /> <!-- <a title="{l s='View' mod='crossselling'}" href="{$orderProduct.link}" class="button_small">{l s='View' mod='crossselling'}</a><br /> -->
</li> </li>
{/foreach} {/foreach}
</ul> </ul>

Some files were not shown because too many files have changed in this diff Show More