From d4aec6d1fbc73d7c86aef588f8b6e86522ea8f79 Mon Sep 17 00:00:00 2001 From: Romuald Date: Mon, 4 Apr 2016 12:45:47 +0200 Subject: [PATCH] fin desktop --- modules/advreassurance/advreassurance.php | 134 ++++ modules/advreassurance/classes/AdvRea.php | 133 ++++ .../controllers/admin/AdminAdvReassurance.php | 243 ++++++ modules/advreassurance/index.php | 35 + modules/advreassurance/js/advslider.js | 14 + modules/advreassurance/logo.gif | Bin 0 -> 2097 bytes modules/advreassurance/logo.png | Bin 0 -> 6271 bytes .../views/templates/hook/advreassurance.tpl | 3 + .../blockreinsurance/img/reinsurance-4-1.jpg | Bin 1602 -> 0 bytes .../blockreinsurance/img/reinsurance-5-1.jpg | Bin 1449 -> 0 bytes modules/prestaerp/logs/log_04-04-2016.log | 52 ++ override/classes/Cart.php | 265 +++++++ override/controllers/front/AuthController.php | 80 ++ .../controllers/front/CategoryController.php | 7 + .../front/OrderConfirmationController.php | 8 + .../front/ParentOrderController.php | 13 +- themes/roykin/ajax-order-carrier.tpl | 9 +- themes/roykin/css/global.css | 717 +++++++++--------- themes/roykin/css/k2000.css | 102 ++- themes/roykin/footer.tpl | 10 +- themes/roykin/history.tpl | 4 +- themes/roykin/img/shadow.png | Bin 0 -> 1323 bytes themes/roykin/img/sprite-custom-select.png | Bin 3823 -> 3599 bytes themes/roykin/js/cart-summary.js | 14 +- themes/roykin/lang/fr.php | 16 +- .../modules/advreassurance/advreassurance.tpl | 12 + .../advreassurance/translations/fr.php | 5 + .../bankwire/views/templates/hook/payment.tpl | 9 +- .../modules/blockcart/blockcart-footer.tpl | 4 +- themes/roykin/modules/cheque/payment.tpl | 9 +- themes/roykin/order-carrier.tpl | 151 ++-- themes/roykin/order-confirmation.tpl | 4 +- themes/roykin/order-detail.tpl | 134 ++-- themes/roykin/order-payment.tpl | 100 +-- themes/roykin/order-steps.tpl | 6 +- themes/roykin/product-list.tpl | 11 +- themes/roykin/shopping-cart-product-line.tpl | 2 +- themes/roykin/shopping-cart.tpl | 102 ++- 38 files changed, 1672 insertions(+), 736 deletions(-) create mode 100644 modules/advreassurance/advreassurance.php create mode 100644 modules/advreassurance/classes/AdvRea.php create mode 100644 modules/advreassurance/controllers/admin/AdminAdvReassurance.php create mode 100644 modules/advreassurance/index.php create mode 100644 modules/advreassurance/js/advslider.js create mode 100644 modules/advreassurance/logo.gif create mode 100644 modules/advreassurance/logo.png create mode 100644 modules/advreassurance/views/templates/hook/advreassurance.tpl delete mode 100755 modules/blockreinsurance/img/reinsurance-4-1.jpg delete mode 100755 modules/blockreinsurance/img/reinsurance-5-1.jpg create mode 100644 modules/prestaerp/logs/log_04-04-2016.log create mode 100644 override/classes/Cart.php create mode 100644 themes/roykin/img/shadow.png create mode 100644 themes/roykin/modules/advreassurance/advreassurance.tpl create mode 100644 themes/roykin/modules/advreassurance/translations/fr.php diff --git a/modules/advreassurance/advreassurance.php b/modules/advreassurance/advreassurance.php new file mode 100644 index 0000000..9fa0342 --- /dev/null +++ b/modules/advreassurance/advreassurance.php @@ -0,0 +1,134 @@ +name = 'advreassurance'; + $this->tab = 'front_office_features'; + $this->version = '1.0'; + $this->author = 'Antadis'; + $this->need_instance = 0; + + $this->bootstrap = true; + parent::__construct(); + + $this->displayName = $this->l('Reassurance avancé'); + $this->description = $this->l('Gestion des blocks reassurance'); + } + + public function install() + { + $sql = array(); + + $sql[] = + 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'advreassurance` ( + `id_reassurance` int(10) unsigned NOT NULL auto_increment, + `position` INT(11) UNSIGNED NOT NULL default 0, + `active` INT(11) UNSIGNED NOT NULL default 1, + PRIMARY KEY (`id_reassurance`) + ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8'; + + $sql[] = + 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'advreassurance_lang` ( + `id_reassurance` int(10) unsigned NOT NULL, + `id_lang` int(10) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `subtitle` varchar(255) NOT NULL, + `url` varchar(255), + PRIMARY KEY (`id_reassurance`,`id_lang`) + ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8'; + + $sql[] = + 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'advreassurance_shop` ( + `id_reassurance` int(10) unsigned NOT NULL auto_increment, + `id_shop` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_reassurance`, `id_shop`) + ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8'; + + + foreach ($sql as $_sql) { + Db::getInstance()->Execute($_sql); + } + + $tab = new Tab(); + $tab->class_name = 'AdminAdvReassurance'; + $tab->id_parent = Tab::getCurrentParentId(); + $tab->module = $this->name; + $languages = Language::getLanguages(); + foreach ($languages as $language) { + $tab->name[$language['id_lang']] = 'Reassurance'; + } + + $img_dir = _PS_IMG_DIR_ . 'reassurance'; + $folder = is_dir($img_dir); + if (!$folder) + { + $folder = mkdir($img_dir, 0755, true); + } + + return parent::install() && $tab->add() && $this->registerHook('displayReassurance') && $this->registerHook('actionRefreshReassurance') && $folder; + + } + + public function uninstall() + { + $sql = 'DROP TABLE IF EXISTS + `' . _DB_PREFIX_ . 'advreassurance_lang`, + `' . _DB_PREFIX_ . 'advreassurance_shop`, + `' . _DB_PREFIX_ . 'advreassurance` + '; + + Db::getInstance()->Execute($sql); + + $idTab = Tab::getIdFromClassName('AdminAdvReassurance'); + if ($idTab) { + $tab = new Tab($idTab); + $tab->delete(); + } + + return parent::uninstall(); + } + + public function assignBlocks() + { + $blocks = AdvRea::getBlocks(); + if (!$blocks) + { + return false; + } + + $this->smarty->assign('blocks', $blocks); + } + + public function hookDisplayReassurance($params) + { + if (!$this->isCached('advreassurance.tpl', $this->getCacheId())) + { + $this->assignBlocks(); + } + + return $this->display(__FILE__, 'advreassurance.tpl', $this->getCacheId()); + } + + public function hookDisplayReassuranceBottom($params) + { + if (!$this->isCached('advreassurance-bottom.tpl', $this->getCacheId())) + { + $this->assignBlocks(); + } + + return $this->display(__FILE__, 'advreassurance-bottom.tpl', $this->getCacheId()); + } + + public function hookActionRefreshReassurance() + { + $this->_clearCache('advreassurance'); + } + +} \ No newline at end of file diff --git a/modules/advreassurance/classes/AdvRea.php b/modules/advreassurance/classes/AdvRea.php new file mode 100644 index 0000000..2af2ce0 --- /dev/null +++ b/modules/advreassurance/classes/AdvRea.php @@ -0,0 +1,133 @@ + 'advreassurance', + 'primary' => 'id_reassurance', + 'multilang' => TRUE, + 'fields' => array( + 'id_reassurance' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'position' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + 'active' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), + + // Lang fields + 'title' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isGenericName', 'size' => 255), + 'subtitle' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isGenericName', 'size' => 255), + 'url' => array('type' => self::TYPE_STRING, 'lang' => TRUE, 'validate' => 'isUrl', 'size' => 255) + ) + ); + + public function __construct($id = NULL, $id_lang = NULL, $id_shop = NULL) { + parent::__construct($id, $id_lang, $id_shop); + + $this->image_dir = _PS_IMG_DIR_ . 'reassurance/'; + } + + public function add($null_values = false, $autodate = true) + { + $result = parent::add($null_values, $autodate); + Hook::exec('actionRefreshReassurance'); + + return $result; + } + + public function update($null_values = FALSE) { + $result = parent::update($null_values); + Hook::exec('actionRefreshReassurance'); + + return $result; + } + + public function delete($null_values = FALSE) { + $result = parent::delete($null_values); + Hook::exec('actionRefreshReassurance'); + + return $result; + } + + public static function getBlocks() + { + $context = Context::getContext(); + + $reassurances = Db::getInstance()->executeS(' + SELECT * + FROM `'._DB_PREFIX_.'advreassurance` adv + JOIN `'._DB_PREFIX_.'advreassurance_lang` advl ON adv.`id_reassurance` = advl.`id_reassurance` AND id_lang = '. (int)$context->language->id . ' + WHERE adv.`active` = 1 + ORDER BY `position` ASC + '); + + return $reassurances; + } + + public function cleanPositions(){ + return Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'advreassurance` + SET `position`= `position` - 1 + WHERE `id_reassurance` = '.(int)$this->id_reassurance.' + AND `position` > '.(int)$this->position); + } + + public function updatePosition($way, $position) + { + $sql = 'SELECT `position`, `id_reassurance` + FROM `'._DB_PREFIX_.'advreassurance` + ORDER BY `position` ASC'; + if (!$res = Db::getInstance()->executeS($sql)) + return false; + + foreach ($res as $row) + if ((int)$row['id_reassurance'] == (int)$this->id_reassurance) + $moved_row = $row; + + if (!isset($moved_row) || !isset($position)) + return false; + + // < and > statements rather than BETWEEN operator + // since BETWEEN is treated differently according to databases + $res = Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'advreassurance` + SET `position`= `position` '.($way ? '- 1' : '+ 1').' + AND `position` + '.($way + ? '> '.(int)$moved_row['position'].' AND `position` <= '.(int)$position + : '< '.(int)$moved_row['position'].' AND `position` >= '.(int)$position) + ) + && Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'advreassurance` + SET `position` = '.(int)$position.' + WHERE `id_reassurance`='.(int)$moved_row['id_reassurance'] + ); + $this->refreshPositions(); + + Hook::exec('actionRefreshReassurance'); + + return $res; + } + + public function refreshPositions(){ + $sql = 'SELECT `id_reassurance` + FROM `'._DB_PREFIX_.'advreassurance` + ORDER BY `position` ASC'; + if (!$blocks = Db::getInstance()->executeS($sql)) + return false; + + $pos=0; + foreach ($blocks as $block) { + Db::getInstance()->execute(' + UPDATE `'._DB_PREFIX_.'advreassurance` + SET `position` = '.(int)$pos.' + WHERE `id_reassurance`='.(int)$block['id_reassurance']); + $pos++; + } + } + +} \ No newline at end of file diff --git a/modules/advreassurance/controllers/admin/AdminAdvReassurance.php b/modules/advreassurance/controllers/admin/AdminAdvReassurance.php new file mode 100644 index 0000000..bb41c3e --- /dev/null +++ b/modules/advreassurance/controllers/admin/AdminAdvReassurance.php @@ -0,0 +1,243 @@ +table = 'advreassurance'; + $this->className = 'AdvRea'; + $this->identifier = 'id_reassurance'; + $this->lang = TRUE; + $this->deleted = FALSE; + $this->bootstrap = TRUE; + $this->fieldImageSettings = array( + 'name' => 'image', + 'dir' => 'reassurance' + ); + $this->position_identifier = 'id_reassurance'; + $this->_defaultOrderBy = 'position'; + + parent::__construct(); + + $this->actions = array('edit', 'delete'); + + $this->fields_list = array( + 'id_reassurance' => array( + 'title' => 'ID', + 'width' => 25 + ), + 'image' => array( + 'title' => $this->module->l('Image'), + 'image' => $this->fieldImageSettings['dir'], + 'width' => 75 + ), + 'title' => array( + 'title' => $this->module->l('Titre'), + ), + 'subtitle' => array( + 'title' => $this->module->l('Sout-titre'), + ), + 'url' => array( + 'title' => $this->module->l('Url'), + 'width' => 45, + ), + 'position' => array( + 'title' => $this->l('Position'), + 'align' => 'center', + 'position' => 'position', + 'filter_key' => 'a!position' + ) + ); + + if (Shop::isFeatureActive() && Shop::getContext() != Shop::CONTEXT_ALL){ + $this->_join .= 'JOIN `'._DB_PREFIX_.'advreassurance_shop` as ashop ON a.`id_reassurance` = ashop.`id_reassurance` AND ashop.`id_shop` IN ('.implode(', ', Shop::getContextListShopID()).') '; + $this->_group .= 'GROUP BY ashop.`id_reassurance`'; + } + + } + + public function initPageHeaderToolbar() { + parent::initPageHeaderToolbar(); + + if ($this->display != 'edit' && $this->display != 'add') { + $this->page_header_toolbar_btn['new_link'] = array( + 'href' => self::$currentIndex.'&id_parent='.(int)Tools::getValue('id_reassurance').'&addadvreassurance&token='.$this->token, + 'desc' => $this->l('Ajouter un nouveau block', NULL, NULL, FALSE), + 'icon' => 'process-icon-new' + ); + } + } + + public function renderView() { + return $this->renderList(); + } + + public function renderForm() { + + + $this->fields_form = array( + 'tinymce' => TRUE, + 'legend' => array( + 'title' => $this->className, + ), + 'submit' => array( + 'name' => 'submitAdvReassurancer', + 'title' => $this->l('Save'), + ), + 'input' => array( + array( + 'type' => 'text', + 'label' => $this->l('Titre'), + 'name' => 'title', + 'lang' => TRUE, + ), + array( + 'type' => 'text', + 'label' => $this->l('Sous-titre'), + 'name' => 'subtitle', + 'lang' => TRUE, + ), + array( + 'type' => 'text', + 'label' => $this->l('Lien'), + 'name' => 'url', + 'lang' => TRUE + ), + array( + 'type' => 'switch', + 'label' => $this->l('Activé'), + 'name' => 'active', + 'required' => FALSE, + 'is_bool' => TRUE, + 'default' => 1, + 'values' => array( + array( + 'id' => 'active_on', + 'value' => 1, + 'label' => $this->l('Enabled') + ), + array( + 'id' => 'active_off', + 'value' => 0, + 'label' => $this->l('Disabled') + ) + ), + ), + array( + 'type' => 'shop', + 'label' => $this->l('Shop'), + 'form_group_class' => 'fieldhide input_association', + 'name' => 'checkBoxShopAsso_advreassurance' + ) + ) + ); + + $obj = $this->loadObject(TRUE); + + $image = FALSE; + $image_url = ''; + $image_size = ''; + + if($obj) + { + $image = _PS_IMG_DIR_ . 'reassurance/' . $obj->id.'.jpg'; + $image_url = ImageManager::thumbnail($image, $this->table.'_'.(int)$obj->id.'.'.$this->imageType, 350, $this->imageType, TRUE, TRUE); + $image_size = file_exists($image) ? filesize($image) / 1000 : FALSE; + } + + $this->fields_form['input'][] = array( + 'type' => 'file', + 'label' => $this->l('Image'), + 'name' => 'image', + 'display_image' => TRUE, + 'lang' => TRUE, + 'image' => $image_url, + 'size' => $image_size, + 'delete_url' => self::$currentIndex.'&'.$this->identifier.'='.$this->object->id.'&token='.$this->token.'&deleteImage=1' + ); + + return parent::renderForm(); + } + + protected function copyFromPost(&$object, $table) { + parent::copyFromPost($object, $table); + + if(Shop::isFeatureActive()) + { + $object->id_shop_list = array(); + foreach (Tools::getValue('checkBoxShopAsso_advreassurance') as $id_shop => $value) + $object->id_shop_list[] = $id_shop; + } + } + + public function postProcess() { + if (Tools::getValue('deleteImage')) { + $this->processForceDeleteImage(); + $this->refreshPreview(); + } + return parent::postProcess(); + } + + public function processForceDeleteImage() { + $link = $this->loadObject(TRUE); + + if (Validate::isLoadedObject($link)) + { + $link->deleteImage(TRUE); + } + } + + protected function postImage($id) { + $ret = parent::postImage($id); + $this->refreshPreview(); + + if (isset($_FILES) && count($_FILES) && $_FILES['image']['name'] != NULL && !empty($this->object->id) ) + { + return TRUE; + } + return TRUE; + } + + public function refreshPreview() + { + $current_preview = _PS_TMP_IMG_DIR_.'advreassurance_mini_'.$this->object->id_reassurance.'_'.$this->context->shop->id.'.jpg'; + + if (file_exists($current_preview)) { + unlink($current_preview); + } + } + + public function ajaxProcessUpdatePositions() + { + $way = (int)(Tools::getValue('way')); + $id = (int)(Tools::getValue('id')); + $positions = Tools::getValue('slide'); + $obj = 'advreassurance'; + + if (is_array($positions)){ + foreach ($positions as $position => $value) + { + $pos = explode('_', $value); + + if (isset($pos[2]) && (int)$pos[2] === $id) + { + $menu_obj = new AdvRea((int)$pos[2]); + + if (Validate::isLoadedObject($menu_obj)) + if (isset($position) && $menu_obj->updatePosition($way, $position)) + { + echo 'ok position '.(int)$position.' for '.$obj.' '.(int)$pos[2]."\r\n"; + } + else + echo '{"hasError" : true, "errors" : "Can not update '.$obj.' '.(int)$id.' to position '.(int)$position.' "}'; + else + echo '{"hasError" : true, "errors" : "This '.$obj.' ('.(int)$id.') cannot be loaded"}'; + + break; + } + } + } + } + +} diff --git a/modules/advreassurance/index.php b/modules/advreassurance/index.php new file mode 100644 index 0000000..a41987d --- /dev/null +++ b/modules/advreassurance/index.php @@ -0,0 +1,35 @@ + +* @copyright 2007-2014 PrestaShop SA +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/modules/advreassurance/js/advslider.js b/modules/advreassurance/js/advslider.js new file mode 100644 index 0000000..55f7857 --- /dev/null +++ b/modules/advreassurance/js/advslider.js @@ -0,0 +1,14 @@ +/* + * jQuery FlexSlider v2.4.0 + * Copyright 2012 WooThemes + * Contributing Author: Tyler Smith + */!function($){$.flexslider=function(e,t){var a=$(e);a.vars=$.extend({},$.flexslider.defaults,t);var n=a.vars.namespace,i=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,s=("ontouchstart"in window||i||window.DocumentTouch&&document instanceof DocumentTouch)&&a.vars.touch,r="click touchend MSPointerUp keyup",o="",l,c="vertical"===a.vars.direction,d=a.vars.reverse,u=a.vars.itemWidth>0,v="fade"===a.vars.animation,p=""!==a.vars.asNavFor,m={},f=!0;$.data(e,"flexslider",a),m={init:function(){a.animating=!1,a.currentSlide=parseInt(a.vars.startAt?a.vars.startAt:0,10),isNaN(a.currentSlide)&&(a.currentSlide=0),a.animatingTo=a.currentSlide,a.atEnd=0===a.currentSlide||a.currentSlide===a.last,a.containerSelector=a.vars.selector.substr(0,a.vars.selector.search(" ")),a.slides=$(a.vars.selector,a),a.container=$(a.containerSelector,a),a.count=a.slides.length,a.syncExists=$(a.vars.sync).length>0,"slide"===a.vars.animation&&(a.vars.animation="swing"),a.prop=c?"top":"marginLeft",a.args={},a.manualPause=!1,a.stopped=!1,a.started=!1,a.startTimeout=null,a.transitions=!a.vars.video&&!v&&a.vars.useCSS&&function(){var e=document.createElement("div"),t=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var n in t)if(void 0!==e.style[t[n]])return a.pfx=t[n].replace("Perspective","").toLowerCase(),a.prop="-"+a.pfx+"-transform",!0;return!1}(),a.ensureAnimationEnd="",""!==a.vars.controlsContainer&&(a.controlsContainer=$(a.vars.controlsContainer).length>0&&$(a.vars.controlsContainer)),""!==a.vars.manualControls&&(a.manualControls=$(a.vars.manualControls).length>0&&$(a.vars.manualControls)),a.vars.randomize&&(a.slides.sort(function(){return Math.round(Math.random())-.5}),a.container.empty().append(a.slides)),a.doMath(),a.setup("init"),a.vars.controlNav&&m.controlNav.setup(),a.vars.directionNav&&m.directionNav.setup(),a.vars.keyboard&&(1===$(a.containerSelector).length||a.vars.multipleKeyboard)&&$(document).bind("keyup",function(e){var t=e.keyCode;if(!a.animating&&(39===t||37===t)){var n=39===t?a.getTarget("next"):37===t?a.getTarget("prev"):!1;a.flexAnimate(n,a.vars.pauseOnAction)}}),a.vars.mousewheel&&a.bind("mousewheel",function(e,t,n,i){e.preventDefault();var s=a.getTarget(0>t?"next":"prev");a.flexAnimate(s,a.vars.pauseOnAction)}),a.vars.pausePlay&&m.pausePlay.setup(),a.vars.slideshow&&a.vars.pauseInvisible&&m.pauseInvisible.init(),a.vars.slideshow&&(a.vars.pauseOnHover&&a.hover(function(){a.manualPlay||a.manualPause||a.pause()},function(){a.manualPause||a.manualPlay||a.stopped||a.play()}),a.vars.pauseInvisible&&m.pauseInvisible.isHidden()||(a.vars.initDelay>0?a.startTimeout=setTimeout(a.play,a.vars.initDelay):a.play())),p&&m.asNav.setup(),s&&a.vars.touch&&m.touch(),(!v||v&&a.vars.smoothHeight)&&$(window).bind("resize orientationchange focus",m.resize),a.find("img").attr("draggable","false"),setTimeout(function(){a.vars.start(a)},200)},asNav:{setup:function(){a.asNav=!0,a.animatingTo=Math.floor(a.currentSlide/a.move),a.currentItem=a.currentSlide,a.slides.removeClass(n+"active-slide").eq(a.currentItem).addClass(n+"active-slide"),i?(e._slider=a,a.slides.each(function(){var e=this;e._gesture=new MSGesture,e._gesture.target=e,e.addEventListener("MSPointerDown",function(e){e.preventDefault(),e.currentTarget._gesture&&e.currentTarget._gesture.addPointer(e.pointerId)},!1),e.addEventListener("MSGestureTap",function(e){e.preventDefault();var t=$(this),n=t.index();$(a.vars.asNavFor).data("flexslider").animating||t.hasClass("active")||(a.direction=a.currentItem=s&&t.hasClass(n+"active-slide")?a.flexAnimate(a.getTarget("prev"),!0):$(a.vars.asNavFor).data("flexslider").animating||t.hasClass(n+"active-slide")||(a.direction=a.currentItem'),a.pagingCount>1)for(var l=0;l':""+t+"","thumbnails"===a.vars.controlNav&&!0===a.vars.thumbCaptions){var c=s.attr("data-thumbcaption");""!=c&&void 0!=c&&(i+=''+c+"")}a.controlNavScaffold.append("
  • "+i+"
  • "),t++}a.controlsContainer?$(a.controlsContainer).append(a.controlNavScaffold):a.append(a.controlNavScaffold),m.controlNav.set(),m.controlNav.active(),a.controlNavScaffold.delegate("a, img",r,function(e){if(e.preventDefault(),""===o||o===e.type){var t=$(this),i=a.controlNav.index(t);t.hasClass(n+"active")||(a.direction=i>a.currentSlide?"next":"prev",a.flexAnimate(i,a.vars.pauseOnAction))}""===o&&(o=e.type),m.setToClearWatchedEvent()})},setupManual:function(){a.controlNav=a.manualControls,m.controlNav.active(),a.controlNav.bind(r,function(e){if(e.preventDefault(),""===o||o===e.type){var t=$(this),i=a.controlNav.index(t);t.hasClass(n+"active")||(a.direction=i>a.currentSlide?"next":"prev",a.flexAnimate(i,a.vars.pauseOnAction))}""===o&&(o=e.type),m.setToClearWatchedEvent()})},set:function(){var e="thumbnails"===a.vars.controlNav?"img":"a";a.controlNav=$("."+n+"control-nav li "+e,a.controlsContainer?a.controlsContainer:a)},active:function(){a.controlNav.removeClass(n+"active").eq(a.animatingTo).addClass(n+"active")},update:function(e,t){a.pagingCount>1&&"add"===e?a.controlNavScaffold.append($("
  • "+a.count+"
  • ")):1===a.pagingCount?a.controlNavScaffold.find("li").remove():a.controlNav.eq(t).closest("li").remove(),m.controlNav.set(),a.pagingCount>1&&a.pagingCount!==a.controlNav.length?a.update(t,e):m.controlNav.active()}},directionNav:{setup:function(){var e=$('");a.controlsContainer?($(a.controlsContainer).append(e),a.directionNav=$("."+n+"direction-nav li a",a.controlsContainer)):(a.append(e),a.directionNav=$("."+n+"direction-nav li a",a)),m.directionNav.update(),a.directionNav.bind(r,function(e){e.preventDefault();var t;(""===o||o===e.type)&&(t=a.getTarget($(this).hasClass(n+"next")?"next":"prev"),a.flexAnimate(t,a.vars.pauseOnAction)),""===o&&(o=e.type),m.setToClearWatchedEvent()})},update:function(){var e=n+"disabled";1===a.pagingCount?a.directionNav.addClass(e).attr("tabindex","-1"):a.vars.animationLoop?a.directionNav.removeClass(e).removeAttr("tabindex"):0===a.animatingTo?a.directionNav.removeClass(e).filter("."+n+"prev").addClass(e).attr("tabindex","-1"):a.animatingTo===a.last?a.directionNav.removeClass(e).filter("."+n+"next").addClass(e).attr("tabindex","-1"):a.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var e=$('
    ');a.controlsContainer?(a.controlsContainer.append(e),a.pausePlay=$("."+n+"pauseplay a",a.controlsContainer)):(a.append(e),a.pausePlay=$("."+n+"pauseplay a",a)),m.pausePlay.update(a.vars.slideshow?n+"pause":n+"play"),a.pausePlay.bind(r,function(e){e.preventDefault(),(""===o||o===e.type)&&($(this).hasClass(n+"pause")?(a.manualPause=!0,a.manualPlay=!1,a.pause()):(a.manualPause=!1,a.manualPlay=!0,a.play())),""===o&&(o=e.type),m.setToClearWatchedEvent()})},update:function(e){"play"===e?a.pausePlay.removeClass(n+"pause").addClass(n+"play").html(a.vars.playText):a.pausePlay.removeClass(n+"play").addClass(n+"pause").html(a.vars.pauseText)}},touch:function(){function t(t){a.animating?t.preventDefault():(window.navigator.msPointerEnabled||1===t.touches.length)&&(a.pause(),g=c?a.h:a.w,S=Number(new Date),x=t.touches[0].pageX,b=t.touches[0].pageY,f=u&&d&&a.animatingTo===a.last?0:u&&d?a.limit-(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo:u&&a.currentSlide===a.last?a.limit:u?(a.itemW+a.vars.itemMargin)*a.move*a.currentSlide:d?(a.last-a.currentSlide+a.cloneOffset)*g:(a.currentSlide+a.cloneOffset)*g,p=c?b:x,m=c?x:b,e.addEventListener("touchmove",n,!1),e.addEventListener("touchend",s,!1))}function n(e){x=e.touches[0].pageX,b=e.touches[0].pageY,h=c?p-b:p-x,y=c?Math.abs(h)t)&&(e.preventDefault(),!v&&a.transitions&&(a.vars.animationLoop||(h/=0===a.currentSlide&&0>h||a.currentSlide===a.last&&h>0?Math.abs(h)/g+2:1),a.setProps(f+h,"setTouch")))}function s(t){if(e.removeEventListener("touchmove",n,!1),a.animatingTo===a.currentSlide&&!y&&null!==h){var i=d?-h:h,r=a.getTarget(i>0?"next":"prev");a.canAdvance(r)&&(Number(new Date)-S<550&&Math.abs(i)>50||Math.abs(i)>g/2)?a.flexAnimate(r,a.vars.pauseOnAction):v||a.flexAnimate(a.currentSlide,a.vars.pauseOnAction,!0)}e.removeEventListener("touchend",s,!1),p=null,m=null,h=null,f=null}function r(t){t.stopPropagation(),a.animating?t.preventDefault():(a.pause(),e._gesture.addPointer(t.pointerId),w=0,g=c?a.h:a.w,S=Number(new Date),f=u&&d&&a.animatingTo===a.last?0:u&&d?a.limit-(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo:u&&a.currentSlide===a.last?a.limit:u?(a.itemW+a.vars.itemMargin)*a.move*a.currentSlide:d?(a.last-a.currentSlide+a.cloneOffset)*g:(a.currentSlide+a.cloneOffset)*g)}function o(t){t.stopPropagation();var a=t.target._slider;if(a){var n=-t.translationX,i=-t.translationY;return w+=c?i:n,h=w,y=c?Math.abs(w)500)&&(t.preventDefault(),!v&&a.transitions&&(a.vars.animationLoop||(h=w/(0===a.currentSlide&&0>w||a.currentSlide===a.last&&w>0?Math.abs(w)/g+2:1)),a.setProps(f+h,"setTouch"))))}}function l(e){e.stopPropagation();var t=e.target._slider;if(t){if(t.animatingTo===t.currentSlide&&!y&&null!==h){var a=d?-h:h,n=t.getTarget(a>0?"next":"prev");t.canAdvance(n)&&(Number(new Date)-S<550&&Math.abs(a)>50||Math.abs(a)>g/2)?t.flexAnimate(n,t.vars.pauseOnAction):v||t.flexAnimate(t.currentSlide,t.vars.pauseOnAction,!0)}p=null,m=null,h=null,f=null,w=0}}var p,m,f,g,h,S,y=!1,x=0,b=0,w=0;i?(e.style.msTouchAction="none",e._gesture=new MSGesture,e._gesture.target=e,e.addEventListener("MSPointerDown",r,!1),e._slider=a,e.addEventListener("MSGestureChange",o,!1),e.addEventListener("MSGestureEnd",l,!1)):e.addEventListener("touchstart",t,!1)},resize:function(){!a.animating&&a.is(":visible")&&(u||a.doMath(),v?m.smoothHeight():u?(a.slides.width(a.computedW),a.update(a.pagingCount),a.setProps()):c?(a.viewport.height(a.h),a.setProps(a.h,"setTotal")):(a.vars.smoothHeight&&m.smoothHeight(),a.newSlides.width(a.computedW),a.setProps(a.computedW,"setTotal")))},smoothHeight:function(e){if(!c||v){var t=v?a:a.viewport;e?t.animate({height:a.slides.eq(a.animatingTo).height()},e):t.height(a.slides.eq(a.animatingTo).height())}},sync:function(e){var t=$(a.vars.sync).data("flexslider"),n=a.animatingTo;switch(e){case"animate":t.flexAnimate(n,a.vars.pauseOnAction,!1,!0);break;case"play":t.playing||t.asNav||t.play();break;case"pause":t.pause()}},uniqueID:function(e){return e.filter("[id]").add(e.find("[id]")).each(function(){var e=$(this);e.attr("id",e.attr("id")+"_clone")}),e},pauseInvisible:{visProp:null,init:function(){var e=m.pauseInvisible.getHiddenProp();if(e){var t=e.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(t,function(){m.pauseInvisible.isHidden()?a.startTimeout?clearTimeout(a.startTimeout):a.pause():a.started?a.play():a.vars.initDelay>0?setTimeout(a.play,a.vars.initDelay):a.play()})}},isHidden:function(){var e=m.pauseInvisible.getHiddenProp();return e?document[e]:!1},getHiddenProp:function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;ta.currentSlide?"next":"prev"),p&&1===a.pagingCount&&(a.direction=a.currentItema.limit&&1!==a.visible?a.limit:S):h=0===a.currentSlide&&e===a.count-1&&a.vars.animationLoop&&"next"!==a.direction?d?(a.count+a.cloneOffset)*f:0:a.currentSlide===a.last&&0===e&&a.vars.animationLoop&&"prev"!==a.direction?d?0:(a.count+1)*f:d?(a.count-1-e+a.cloneOffset)*f:(e+a.cloneOffset)*f,a.setProps(h,"",a.vars.animationSpeed),a.transitions?(a.vars.animationLoop&&a.atEnd||(a.animating=!1,a.currentSlide=a.animatingTo),a.container.unbind("webkitTransitionEnd transitionend"),a.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(a.ensureAnimationEnd),a.wrapup(f)}),clearTimeout(a.ensureAnimationEnd),a.ensureAnimationEnd=setTimeout(function(){a.wrapup(f)},a.vars.animationSpeed+100)):a.container.animate(a.args,a.vars.animationSpeed,a.vars.easing,function(){a.wrapup(f)})}a.vars.smoothHeight&&m.smoothHeight(a.vars.animationSpeed)}},a.wrapup=function(e){v||u||(0===a.currentSlide&&a.animatingTo===a.last&&a.vars.animationLoop?a.setProps(e,"jumpEnd"):a.currentSlide===a.last&&0===a.animatingTo&&a.vars.animationLoop&&a.setProps(e,"jumpStart")),a.animating=!1,a.currentSlide=a.animatingTo,a.vars.after(a)},a.animateSlides=function(){!a.animating&&f&&a.flexAnimate(a.getTarget("next"))},a.pause=function(){clearInterval(a.animatedSlides),a.animatedSlides=null,a.playing=!1,a.vars.pausePlay&&m.pausePlay.update("play"),a.syncExists&&m.sync("pause")},a.play=function(){a.playing&&clearInterval(a.animatedSlides),a.animatedSlides=a.animatedSlides||setInterval(a.animateSlides,a.vars.slideshowSpeed),a.started=a.playing=!0,a.vars.pausePlay&&m.pausePlay.update("pause"),a.syncExists&&m.sync("play")},a.stop=function(){a.pause(),a.stopped=!0},a.canAdvance=function(e,t){var n=p?a.pagingCount-1:a.last;return t?!0:p&&a.currentItem===a.count-1&&0===e&&"prev"===a.direction?!0:p&&0===a.currentItem&&e===a.pagingCount-1&&"next"!==a.direction?!1:e!==a.currentSlide||p?a.vars.animationLoop?!0:a.atEnd&&0===a.currentSlide&&e===n&&"next"!==a.direction?!1:a.atEnd&&a.currentSlide===n&&0===e&&"next"===a.direction?!1:!0:!1},a.getTarget=function(e){return a.direction=e,"next"===e?a.currentSlide===a.last?0:a.currentSlide+1:0===a.currentSlide?a.last:a.currentSlide-1},a.setProps=function(e,t,n){var i=function(){var n=e?e:(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo,i=function(){if(u)return"setTouch"===t?e:d&&a.animatingTo===a.last?0:d?a.limit-(a.itemW+a.vars.itemMargin)*a.move*a.animatingTo:a.animatingTo===a.last?a.limit:n;switch(t){case"setTotal":return d?(a.count-1-a.currentSlide+a.cloneOffset)*e:(a.currentSlide+a.cloneOffset)*e;case"setTouch":return d?e:e;case"jumpEnd":return d?e:a.count*e;case"jumpStart":return d?a.count*e:e;default:return e}}();return-1*i+"px"}();a.transitions&&(i=c?"translate3d(0,"+i+",0)":"translate3d("+i+",0,0)",n=void 0!==n?n/1e3+"s":"0s",a.container.css("-"+a.pfx+"-transition-duration",n),a.container.css("transition-duration",n)),a.args[a.prop]=i,(a.transitions||void 0===n)&&a.container.css(a.args),a.container.css("transform",i)},a.setup=function(e){if(v)a.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),"init"===e&&(s?a.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+a.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(a.currentSlide).css({opacity:1,zIndex:2}):0==a.vars.fadeFirstSlide?a.slides.css({opacity:0,display:"block",zIndex:1}).eq(a.currentSlide).css({zIndex:2}).css({opacity:1}):a.slides.css({opacity:0,display:"block",zIndex:1}).eq(a.currentSlide).css({zIndex:2}).animate({opacity:1},a.vars.animationSpeed,a.vars.easing)),a.vars.smoothHeight&&m.smoothHeight();else{var t,i;"init"===e&&(a.viewport=$('
    ').css({overflow:"hidden",position:"relative"}).appendTo(a).append(a.container),a.cloneCount=0,a.cloneOffset=0,d&&(i=$.makeArray(a.slides).reverse(),a.slides=$(i),a.container.empty().append(a.slides))),a.vars.animationLoop&&!u&&(a.cloneCount=2,a.cloneOffset=1,"init"!==e&&a.container.find(".clone").remove(),a.container.append(m.uniqueID(a.slides.first().clone().addClass("clone")).attr("aria-hidden","true")).prepend(m.uniqueID(a.slides.last().clone().addClass("clone")).attr("aria-hidden","true"))),a.newSlides=$(a.vars.selector,a),t=d?a.count-1-a.currentSlide+a.cloneOffset:a.currentSlide+a.cloneOffset,c&&!u?(a.container.height(200*(a.count+a.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){a.newSlides.css({display:"block"}),a.doMath(),a.viewport.height(a.h),a.setProps(t*a.h,"init")},"init"===e?100:0)):(a.container.width(200*(a.count+a.cloneCount)+"%"),a.setProps(t*a.computedW,"init"),setTimeout(function(){a.doMath(),a.newSlides.css({width:a.computedW,"float":"left",display:"block"}),a.vars.smoothHeight&&m.smoothHeight()},"init"===e?100:0))}u||a.slides.removeClass(n+"active-slide").eq(a.currentSlide).addClass(n+"active-slide"),a.vars.init(a)},a.doMath=function(){var e=a.slides.first(),t=a.vars.itemMargin,n=a.vars.minItems,i=a.vars.maxItems;a.w=void 0===a.viewport?a.width():a.viewport.width(),a.h=e.height(),a.boxPadding=e.outerWidth()-e.width(),u?(a.itemT=a.vars.itemWidth+t,a.minW=n?n*a.itemT:a.w,a.maxW=i?i*a.itemT-t:a.w,a.itemW=a.minW>a.w?(a.w-t*(n-1))/n:a.maxWa.w?a.w:a.vars.itemWidth,a.visible=Math.floor(a.w/a.itemW),a.move=a.vars.move>0&&a.vars.movea.w?a.itemW*(a.count-1)+t*(a.count-1):(a.itemW+t)*a.count-a.w-t):(a.itemW=a.w,a.pagingCount=a.count,a.last=a.count-1),a.computedW=a.itemW-a.boxPadding},a.update=function(e,t){a.doMath(),u||(ea.controlNav.length?m.controlNav.update("add"):("remove"===t&&!u||a.pagingCounta.last&&(a.currentSlide-=1,a.animatingTo-=1),m.controlNav.update("remove",a.last))),a.vars.directionNav&&m.directionNav.update()},a.addSlide=function(e,t){var n=$(e);a.count+=1,a.last=a.count-1,c&&d?void 0!==t?a.slides.eq(a.count-t).after(n):a.container.prepend(n):void 0!==t?a.slides.eq(t).before(n):a.container.append(n),a.update(t,"add"),a.slides=$(a.vars.selector+":not(.clone)",a),a.setup(),a.vars.added(a)},a.removeSlide=function(e){var t=isNaN(e)?a.slides.index($(e)):e;a.count-=1,a.last=a.count-1,isNaN(e)?$(e,a.slides).remove():c&&d?a.slides.eq(a.last).remove():a.slides.eq(e).remove(),a.doMath(),a.update(t,"remove"),a.slides=$(a.vars.selector+":not(.clone)",a),a.setup(),a.vars.removed(a)},m.init()},$(window).blur(function(e){focused=!1}).focus(function(e){focused=!0}),$.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,fadeFirstSlide:!0,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){}},$.fn.flexslider=function(e){if(void 0===e&&(e={}),"object"==typeof e)return this.each(function(){var t=$(this),a=e.selector?e.selector:".slides > li",n=t.find(a);1===n.length&&e.allowOneSlide===!0||0===n.length?(n.fadeIn(400),e.start&&e.start(t)):void 0===t.data("flexslider")&&new $.flexslider(this,e)});var t=$(this).data("flexslider");switch(e){case"play":t.play();break;case"pause":t.pause();break;case"stop":t.stop();break;case"next":t.flexAnimate(t.getTarget("next"),!0);break;case"prev":case"previous":t.flexAnimate(t.getTarget("prev"),!0);break;default:"number"==typeof e&&t.flexAnimate(e,!0)}}}(jQuery); + + +$(document).ready(function() { + $('#homepage-slider').flexslider({ + prevText: '', + nextText: '', + controlNav: false + }); +}); \ No newline at end of file diff --git a/modules/advreassurance/logo.gif b/modules/advreassurance/logo.gif new file mode 100644 index 0000000000000000000000000000000000000000..2ef1c9e740a7d44219b12f119e282f7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Zw*A1)NZW%6kC9qo&YSR&ud%4O7D{n7^f4g9%y}B-< zc^AUdm6EYeqUVs%G(VmpH08F_D~d8$l~mQdA)#m$o^!5TgBhEF)V-vh4rF`g+6lmmy>OB~g&f>BOyGp!lB)epQ49yb5OZ?0*0mC0R)T literal 0 HcmV?d00001 diff --git a/modules/advreassurance/views/templates/hook/advreassurance.tpl b/modules/advreassurance/views/templates/hook/advreassurance.tpl new file mode 100644 index 0000000..778dd1d --- /dev/null +++ b/modules/advreassurance/views/templates/hook/advreassurance.tpl @@ -0,0 +1,3 @@ + + + diff --git a/modules/blockreinsurance/img/reinsurance-4-1.jpg b/modules/blockreinsurance/img/reinsurance-4-1.jpg deleted file mode 100755 index d8cd7beff42723c3f54a1a508024be0d32d36aff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1602 zcmb79dpy$%9Q|!GW*hcYiCvS?LXUZbBF|-Bmo;=#yCIc{CMjvT86(|h9z%)pxigQI zj}%HOkqU{tA5&@Rg^GEFv^)2HKKFC)pZ9#vf9G?~_Z-E5Vgx|BQ)yHH1Ofn%@&JVt za0Vb?@CubsQ4$J+LRD0ta5b1J3<*afk#Gb;Lko-2(8OpW5GZXl28+Yv@fxUAYgXab zVDWg|N(cy|^eA0WC>*DO(7^p~C>{c67+?;VLqG-q7!87;L5e0oSJ@K^TB-XFAgXFG zbtqUxsam4|5Cj5NfvBh={?J%q>a1`ErS7H(`v$CPH zTj^X40wDiM1pqJvw34ZV{!9AzM-Uk8NZg_r0+0}pvKj;p>;Ud>Uo2f(ekw#*aW2O{ zpjF71H6W2|JZQQnX(N9DZ?3c;|2<85Vo|Mu;V*}ANeJj`) z?v0xLsNk{0kt%{FbTg`Jk%^7(UO(@>|2k@n|8;kSiOrz05;JqYYxiK2hu!Q$v6<%mjKnB|ZJsZex-1f!$79M8 zoadkE3lh}U?LjW(0L}o>@>Ws*t7C_UjRLh9rhL1ei6ddX_1R(KhiRXrbdOz-3N*TUcwmm0vBp`XDQJ8{y;1_h5o+Zr4=R#f&4J_aKwa-G; zlQxuBAPr*-vf8q|?~+gD@f>+(WJC)v*$pCroab2s(pXHoxCH(O^>iD0V&3Eox%=nAn9BN!kzr z|5#nb3$gu?8Qy5w(q!6P`MWpV(#p~<(#jF;uRYa55It%5URh|m1G!cJuDy|SgeHeyNcW$nPeL60!-cIK?C+)Xc zN3K@Qn_X))fiGj3?wIMbr+mrk4Yc`aBH3p?z5ayAt9aPhYHW%Z?Oftm))tf-VwRfU z>@i_GloxYT#x4rgTo2VOvtyqQr&ZJ$32L>gr15oYhdy<6^9%`oHP_#nxIbu37}NUJ zckJjUt$zO}Jq0oES21dYZ_r~?FWkX2x%kBn|N4&BGwPkJ58_noFXN3FchIFixraJG zGIVgR&SKx8s9i}1d&UZW+0{-YvFO9T)=n5zK#vkA@F~CIErjp>fv%q|*7Xo%uj>#G z*HW%l6j8#c3LsCfL_4$h5;eZUThw~HtY1fbkJnVvY_hR>;%saCK9b2R<)c@>vSSyzyh?vQNtmR4cZpnj;!BC>$&C=S>PuIV*+RpKV;A=vxxrn2qj zf&)cyrRk~_Pm#kGO@pzBYrQ!=OO1gXf&DASIew;A@+*gSwoP{0{S@yd^z}*y~$v#OAqtO=l=BCWmR;^;6fa*ZvWYQ=px+r7# zB*93lgUa72acT&hE6{#gY@k<9%puUR6C8^0~0mNOPD4tEx7DF*)p Dm6)F= diff --git a/modules/blockreinsurance/img/reinsurance-5-1.jpg b/modules/blockreinsurance/img/reinsurance-5-1.jpg deleted file mode 100755 index 6706ce5ffe0d370a99644697185ca59addefa00f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1449 zcmb78eLT|%9RB_GVlx(dGjw@vveU>*Jqc5C~{(q8<^i zha(X1-$OvC%A<0@;V3*>1C9URP__UVBw!2JLO~M%f&rlzPSR~Ha+GP74Ji&$;oT^R@c|x>}P7~C$-c|W@ zK>+&SOaKA}VJbx*^OyARJ`jT0Zfva_1T>+bY8Mm(xB^X1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#SfpNu$GNZArC8G{0ZJ? BOp*Wq diff --git a/modules/prestaerp/logs/log_04-04-2016.log b/modules/prestaerp/logs/log_04-04-2016.log new file mode 100644 index 0000000..920030c --- /dev/null +++ b/modules/prestaerp/logs/log_04-04-2016.log @@ -0,0 +1,52 @@ +*CRITICAL* 2016/04/04 - 10:42:46: File name: ErpProductCombination.php - Line No: 293 +Message: HTTP/1.1 200 OK +Server: nginx/1.1.19 +Date: Mon, 04 Apr 2016 08:47:09 GMT +Content-Type: text/xml +Content-Length: 325 +Connection: close + + + + + + +faultCode +warning -- Attention ! + +La quantité ne peut pas être négative. + + +faultString + + + + + + +*CRITICAL* 2016/04/04 - 10:42:47: File name: ErpProductCombination.php - Line No: 293 +Message: HTTP/1.1 200 OK +Server: nginx/1.1.19 +Date: Mon, 04 Apr 2016 08:47:09 GMT +Content-Type: text/xml +Content-Length: 325 +Connection: close + + + + + + +faultCode +warning -- Attention ! + +La quantité ne peut pas être négative. + + +faultString + + + + + + diff --git a/override/classes/Cart.php b/override/classes/Cart.php new file mode 100644 index 0000000..b0c8786 --- /dev/null +++ b/override/classes/Cart.php @@ -0,0 +1,265 @@ +id) { + return array(); + } + // Product cache must be strictly compared to NULL, or else an empty cart will add dozens of queries + if ($this->_products !== null && !$refresh) { + // Return product row with specified ID if it exists + if (is_int($id_product)) { + foreach ($this->_products as $product) { + if ($product['id_product'] == $id_product) { + return array($product); + } + } + return array(); + } + return $this->_products; + } + + // Build query + $sql = new DbQuery(); + + // Build SELECT + $sql->select('cp.`id_product_attribute`, cp.`id_product`, cp.`quantity` AS cart_quantity, cp.id_shop, pl.`name`, p.`is_virtual`, + pl.`description_short`, pl.`available_now`, pl.`available_later`, product_shop.`id_category_default`, p.`id_supplier`, + p.`id_manufacturer`, p.`nb_per_box`, product_shop.`on_sale`, product_shop.`ecotax`, product_shop.`additional_shipping_cost`, + product_shop.`available_for_order`, product_shop.`price`, product_shop.`active`, product_shop.`unity`, product_shop.`unit_price_ratio`, + stock.`quantity` AS quantity_available, p.`width`, p.`height`, p.`depth`, stock.`out_of_stock`, p.`weight`, + p.`date_add`, p.`date_upd`, IFNULL(stock.quantity, 0) as quantity, pl.`link_rewrite`, cl.`link_rewrite` AS category, + CONCAT(LPAD(cp.`id_product`, 10, 0), LPAD(IFNULL(cp.`id_product_attribute`, 0), 10, 0), IFNULL(cp.`id_address_delivery`, 0)) AS unique_id, cp.id_address_delivery, + product_shop.advanced_stock_management, ps.product_supplier_reference supplier_reference'); + + // Build FROM + $sql->from('cart_product', 'cp'); + + // Build JOIN + $sql->leftJoin('product', 'p', 'p.`id_product` = cp.`id_product`'); + $sql->innerJoin('product_shop', 'product_shop', '(product_shop.`id_shop` = cp.`id_shop` AND product_shop.`id_product` = p.`id_product`)'); + $sql->leftJoin('product_lang', 'pl', ' + p.`id_product` = pl.`id_product` + AND pl.`id_lang` = '.(int)$this->id_lang.Shop::addSqlRestrictionOnLang('pl', 'cp.id_shop') + ); + + $sql->leftJoin('category_lang', 'cl', ' + product_shop.`id_category_default` = cl.`id_category` + AND cl.`id_lang` = '.(int)$this->id_lang.Shop::addSqlRestrictionOnLang('cl', 'cp.id_shop') + ); + + $sql->leftJoin('product_supplier', 'ps', 'ps.`id_product` = cp.`id_product` AND ps.`id_product_attribute` = cp.`id_product_attribute` AND ps.`id_supplier` = p.`id_supplier`'); + + // @todo test if everything is ok, then refactorise call of this method + $sql->join(Product::sqlStock('cp', 'cp')); + + // Build WHERE clauses + $sql->where('cp.`id_cart` = '.(int)$this->id); + if ($id_product) { + $sql->where('cp.`id_product` = '.(int)$id_product); + } + $sql->where('p.`id_product` IS NOT NULL'); + + // Build ORDER BY + $sql->orderBy('cp.`date_add`, cp.`id_product`, cp.`id_product_attribute` ASC'); + + if (Customization::isFeatureActive()) { + $sql->select('cu.`id_customization`, cu.`quantity` AS customization_quantity'); + $sql->leftJoin('customization', 'cu', + 'p.`id_product` = cu.`id_product` AND cp.`id_product_attribute` = cu.`id_product_attribute` AND cu.`id_cart` = '.(int)$this->id); + $sql->groupBy('cp.`id_product_attribute`, cp.`id_product`, cp.`id_shop`'); + } else { + $sql->select('NULL AS customization_quantity, NULL AS id_customization'); + } + + if (Combination::isFeatureActive()) { + $sql->select(' + product_attribute_shop.`price` AS price_attribute, product_attribute_shop.`ecotax` AS ecotax_attr, + IF (IFNULL(pa.`reference`, \'\') = \'\', p.`reference`, pa.`reference`) AS reference, + (p.`weight`+ pa.`weight`) weight_attribute, + IF (IFNULL(pa.`ean13`, \'\') = \'\', p.`ean13`, pa.`ean13`) AS ean13, + IF (IFNULL(pa.`upc`, \'\') = \'\', p.`upc`, pa.`upc`) AS upc, + IFNULL(product_attribute_shop.`minimal_quantity`, product_shop.`minimal_quantity`) as minimal_quantity, + IF(product_attribute_shop.wholesale_price > 0, product_attribute_shop.wholesale_price, product_shop.`wholesale_price`) wholesale_price + '); + + $sql->leftJoin('product_attribute', 'pa', 'pa.`id_product_attribute` = cp.`id_product_attribute`'); + $sql->leftJoin('product_attribute_shop', 'product_attribute_shop', '(product_attribute_shop.`id_shop` = cp.`id_shop` AND product_attribute_shop.`id_product_attribute` = pa.`id_product_attribute`)'); + } else { + $sql->select( + 'p.`reference` AS reference, p.`ean13`, + p.`upc` AS upc, product_shop.`minimal_quantity` AS minimal_quantity, product_shop.`wholesale_price` wholesale_price' + ); + } + + $sql->select('image_shop.`id_image` id_image, il.`legend`'); + $sql->leftJoin('image_shop', 'image_shop', 'image_shop.`id_product` = p.`id_product` AND image_shop.cover=1 AND image_shop.id_shop='.(int)$this->id_shop); + $sql->leftJoin('image_lang', 'il', 'il.`id_image` = image_shop.`id_image` AND il.`id_lang` = '.(int)$this->id_lang); + + $result = Db::getInstance()->executeS($sql); + + // Reset the cache before the following return, or else an empty cart will add dozens of queries + $products_ids = array(); + $pa_ids = array(); + if ($result) { + foreach ($result as $key => $row) { + $products_ids[] = $row['id_product']; + $pa_ids[] = $row['id_product_attribute']; + $specific_price = SpecificPrice::getSpecificPrice($row['id_product'], $this->id_shop, $this->id_currency, $id_country, $this->id_shop_group, $row['cart_quantity'], $row['id_product_attribute'], $this->id_customer, $this->id); + if ($specific_price) { + $reduction_type_row = array('reduction_type' => $specific_price['reduction_type']); + } else { + $reduction_type_row = array('reduction_type' => 0); + } + + $result[$key] = array_merge($row, $reduction_type_row); + } + } + // Thus you can avoid one query per product, because there will be only one query for all the products of the cart + Product::cacheProductsFeatures($products_ids); + Cart::cacheSomeAttributesLists($pa_ids, $this->id_lang); + + $this->_products = array(); + if (empty($result)) { + return array(); + } + + $ecotax_rate = (float)Tax::getProductEcotaxRate($this->{Configuration::get('PS_TAX_ADDRESS_TYPE')}); + $apply_eco_tax = Product::$_taxCalculationMethod == PS_TAX_INC && (int)Configuration::get('PS_TAX'); + $cart_shop_context = Context::getContext()->cloneContext(); + + foreach ($result as &$row) { + if (isset($row['ecotax_attr']) && $row['ecotax_attr'] > 0) { + $row['ecotax'] = (float)$row['ecotax_attr']; + } + + $row['stock_quantity'] = (int)$row['quantity']; + // for compatibility with 1.2 themes + $row['quantity'] = (int)$row['cart_quantity']; + + if (isset($row['id_product_attribute']) && (int)$row['id_product_attribute'] && isset($row['weight_attribute'])) { + $row['weight'] = (float)$row['weight_attribute']; + } + + if (Configuration::get('PS_TAX_ADDRESS_TYPE') == 'id_address_invoice') { + $address_id = (int)$this->id_address_invoice; + } else { + $address_id = (int)$row['id_address_delivery']; + } + if (!Address::addressExists($address_id)) { + $address_id = null; + } + + if ($cart_shop_context->shop->id != $row['id_shop']) { + $cart_shop_context->shop = new Shop((int)$row['id_shop']); + } + + $address = Address::initialize($address_id, true); + $id_tax_rules_group = Product::getIdTaxRulesGroupByIdProduct((int)$row['id_product'], $cart_shop_context); + $tax_calculator = TaxManagerFactory::getManager($address, $id_tax_rules_group)->getTaxCalculator(); + + $row['price_without_reduction'] = Product::getPriceStatic( + (int)$row['id_product'], + true, + isset($row['id_product_attribute']) ? (int)$row['id_product_attribute'] : null, + 6, + null, + false, + false, + $row['cart_quantity'], + false, + (int)$this->id_customer ? (int)$this->id_customer : null, + (int)$this->id, + $address_id, + $specific_price_output, + true, + true, + $cart_shop_context + ); + + $row['price_with_reduction'] = Product::getPriceStatic( + (int)$row['id_product'], + true, + isset($row['id_product_attribute']) ? (int)$row['id_product_attribute'] : null, + 6, + null, + false, + true, + $row['cart_quantity'], + false, + (int)$this->id_customer ? (int)$this->id_customer : null, + (int)$this->id, + $address_id, + $specific_price_output, + true, + true, + $cart_shop_context + ); + + $row['price'] = $row['price_with_reduction_without_tax'] = Product::getPriceStatic( + (int)$row['id_product'], + false, + isset($row['id_product_attribute']) ? (int)$row['id_product_attribute'] : null, + 6, + null, + false, + true, + $row['cart_quantity'], + false, + (int)$this->id_customer ? (int)$this->id_customer : null, + (int)$this->id, + $address_id, + $specific_price_output, + true, + true, + $cart_shop_context + ); + + switch (Configuration::get('PS_ROUND_TYPE')) { + case Order::ROUND_TOTAL: + $row['total'] = $row['price_with_reduction_without_tax'] * (int)$row['cart_quantity']; + $row['total_wt'] = $row['price_with_reduction'] * (int)$row['cart_quantity']; + break; + case Order::ROUND_LINE: + $row['total'] = Tools::ps_round($row['price_with_reduction_without_tax'] * (int)$row['cart_quantity'], _PS_PRICE_COMPUTE_PRECISION_); + $row['total_wt'] = Tools::ps_round($row['price_with_reduction'] * (int)$row['cart_quantity'], _PS_PRICE_COMPUTE_PRECISION_); + break; + + case Order::ROUND_ITEM: + default: + $row['total'] = Tools::ps_round($row['price_with_reduction_without_tax'], _PS_PRICE_COMPUTE_PRECISION_) * (int)$row['cart_quantity']; + $row['total_wt'] = Tools::ps_round($row['price_with_reduction'], _PS_PRICE_COMPUTE_PRECISION_) * (int)$row['cart_quantity']; + break; + } + + $row['price_wt'] = $row['price_with_reduction']; + $row['description_short'] = Tools::nl2br($row['description_short']); + + // check if a image associated with the attribute exists + if ($row['id_product_attribute']) { + $row2 = Image::getBestImageAttribute($row['id_shop'], $this->id_lang, $row['id_product'], $row['id_product_attribute']); + if ($row2) { + $row = array_merge($row, $row2); + } + } + + $row['reduction_applies'] = ($specific_price_output && (float)$specific_price_output['reduction']); + $row['quantity_discount_applies'] = ($specific_price_output && $row['cart_quantity'] >= (int)$specific_price_output['from_quantity']); + $row['id_image'] = Product::defineProductImage($row, $this->id_lang); + $row['allow_oosp'] = Product::isAvailableWhenOutOfStock($row['out_of_stock']); + $row['features'] = Product::getFeaturesStatic((int)$row['id_product']); + + if (array_key_exists($row['id_product_attribute'].'-'.$this->id_lang, self::$_attributesLists)) { + $row = array_merge($row, self::$_attributesLists[$row['id_product_attribute'].'-'.$this->id_lang]); + } + + $row = Product::getTaxesInformations($row, $cart_shop_context); + + $this->_products[] = $row; + } + + return $this->_products; + } +} \ No newline at end of file diff --git a/override/controllers/front/AuthController.php b/override/controllers/front/AuthController.php index d69ead0..c1c16df 100644 --- a/override/controllers/front/AuthController.php +++ b/override/controllers/front/AuthController.php @@ -310,4 +310,84 @@ class AuthController extends AuthControllerCore $this->context->smarty->assign('account_error', $this->errors); } } + + protected function processSubmitLogin() + { + Hook::exec('actionBeforeAuthentication'); + $passwd = trim(Tools::getValue('passwd')); + $_POST['passwd'] = null; + $email = trim(Tools::getValue('email')); + if (empty($email)) { + $this->errors[] = Tools::displayError('An email address required.'); + } elseif (!Validate::isEmail($email)) { + $this->errors[] = Tools::displayError('Invalid email address.'); + } elseif (empty($passwd)) { + $this->errors[] = Tools::displayError('Password is required.'); + } elseif (!Validate::isPasswd($passwd)) { + $this->errors[] = Tools::displayError('Invalid password.'); + } else { + $customer = new Customer(); + $authentication = $customer->getByEmail(trim($email), trim($passwd)); + if (isset($authentication->active) && !$authentication->active) { + $this->errors[] = Tools::displayError('Your account isn\'t available at this time, please contact us'); + } elseif (!$authentication || !$customer->id) { + $this->errors[] = Tools::displayError('Authentication failed.'); + } else { + $this->context->cookie->id_compare = isset($this->context->cookie->id_compare) ? $this->context->cookie->id_compare: CompareProduct::getIdCompareByIdCustomer($customer->id); + $this->context->cookie->id_customer = (int)($customer->id); + $this->context->cookie->customer_lastname = $customer->lastname; + $this->context->cookie->customer_firstname = $customer->firstname; + $this->context->cookie->logged = 1; + $customer->logged = 1; + $this->context->cookie->is_guest = $customer->isGuest(); + $this->context->cookie->passwd = $customer->passwd; + $this->context->cookie->email = $customer->email; + + // Add customer to the context + $this->context->customer = $customer; + + if (Configuration::get('PS_CART_FOLLOWING') && (empty($this->context->cookie->id_cart) || Cart::getNbProducts($this->context->cookie->id_cart) == 0) && $id_cart = (int)Cart::lastNoneOrderedCart($this->context->customer->id)) { + $this->context->cart = new Cart($id_cart); + } else { + $id_carrier = (int)$this->context->cart->id_carrier; + $this->context->cart->id_carrier = 0; + $this->context->cart->setDeliveryOption(null); + $this->context->cart->id_address_delivery = (int)Address::getFirstCustomerAddressId((int)($customer->id)); + $this->context->cart->id_address_invoice = (int)Address::getFirstCustomerAddressId((int)($customer->id)); + } + $this->context->cart->id_customer = (int)$customer->id; + $this->context->cart->secure_key = $customer->secure_key; + + if ($this->ajax && isset($id_carrier) && $id_carrier && Configuration::get('PS_ORDER_PROCESS_TYPE')) { + $delivery_option = array($this->context->cart->id_address_delivery => $id_carrier.','); + $this->context->cart->setDeliveryOption($delivery_option); + } + + $this->context->cart->save(); + $this->context->cookie->id_cart = (int)$this->context->cart->id; + $this->context->cookie->write(); + $this->context->cart->autosetProductAddress(); + + Hook::exec('actionAuthentication', array('customer' => $this->context->customer)); + + // Login information have changed, so we check if the cart rules still apply + CartRule::autoRemoveFromCart($this->context); + CartRule::autoAddToCart($this->context); + + if (!$this->ajax) { + Tools::redirect($this->context->link->getCategoryLink(IndexController::CATEGORY)); + } + } + } + if ($this->ajax) { + $return = array( + 'hasError' => !empty($this->errors), + 'errors' => $this->errors, + 'token' => Tools::getToken(false) + ); + $this->ajaxDie(Tools::jsonEncode($return)); + } else { + $this->context->smarty->assign('authentification_error', $this->errors); + } + } } diff --git a/override/controllers/front/CategoryController.php b/override/controllers/front/CategoryController.php index ec47568..dbc2c6c 100644 --- a/override/controllers/front/CategoryController.php +++ b/override/controllers/front/CategoryController.php @@ -2,6 +2,13 @@ class CategoryController extends CategoryControllerCore { + public function init() + { + $this->addJS(_THEME_JS_DIR_.'tools/flexslider.js'); + + parent::init(); + } + public function initContent() { if($this->category->id == Category::CATEGORY_COLLECTION) diff --git a/override/controllers/front/OrderConfirmationController.php b/override/controllers/front/OrderConfirmationController.php index 6a14002..54c40c1 100644 --- a/override/controllers/front/OrderConfirmationController.php +++ b/override/controllers/front/OrderConfirmationController.php @@ -13,6 +13,12 @@ class OrderConfirmationController extends OrderConfirmationControllerCore $summary = $cart->getSummaryDetails(); + $productNumber = 0; + foreach($summary['products'] as $product) + { + $productNumber += $product['cart_quantity']; + } + $this->context->smarty->assign( array( 'customer' => $customer, @@ -25,6 +31,8 @@ class OrderConfirmationController extends OrderConfirmationControllerCore 'gift_products' => $summary['gift_products'], 'noDeleteButton' => true, + 'productNumber' => $productNumber, + 'total_products' => $summary['total_products'], 'total_products_wt' => $summary['total_products_wt'], 'total_shipping_tax_exc' => $summary['total_shipping_tax_exc'], 'total_price' => $summary['total_price'], diff --git a/override/controllers/front/ParentOrderController.php b/override/controllers/front/ParentOrderController.php index 28145c6..0d51b92 100644 --- a/override/controllers/front/ParentOrderController.php +++ b/override/controllers/front/ParentOrderController.php @@ -18,6 +18,12 @@ class ParentOrderController extends ParentOrderControllerCore protected function _assignSummaryInformations() { + if(Tools::getIsset('emptyCart')) + { + $this->context->cart->delete(); + Tools::redirect($this->context->link->getPageLink('order')); + } + $summary = $this->context->cart->getSummaryDetails(); $customizedDatas = Product::getAllCustomizedDatas($this->context->cart->id); @@ -69,12 +75,6 @@ class ParentOrderController extends ParentOrderControllerCore $product['is_discounted'] = $product['price_without_specific_price'] != $product['price_wt']; } - $summary['nbProducts'] = 0; - foreach ($summary['products'] as $product) - { - $summary['nbProducts'] += (int)$product['cart_quantity']; - } - // Get available cart rules and unset the cart rules already in the cart $available_cart_rules = CartRule::getCustomerCartRules($this->context->language->id, (isset($this->context->customer->id) ? $this->context->customer->id : 0), true, true, true, $this->context->cart); $cart_cart_rules = $this->context->cart->getCartRules(); @@ -122,6 +122,7 @@ class ParentOrderController extends ParentOrderControllerCore 'HOOK_SHOPPING_CART_EXTRA' => Hook::exec('displayShoppingCart', $summary), 'DISPLAY_CART_SUMMARY_STOCK_INFO' => Hook::exec('displayCartSummaryStockInfo', $summary) )); + } } \ No newline at end of file diff --git a/themes/roykin/ajax-order-carrier.tpl b/themes/roykin/ajax-order-carrier.tpl index 47f691c..dcf75d2 100644 --- a/themes/roykin/ajax-order-carrier.tpl +++ b/themes/roykin/ajax-order-carrier.tpl @@ -13,18 +13,17 @@ {foreach $option_list as $key => $option}
    -
    +
    + {foreach $option.carrier_list as $carrier} {if $carrier.logo} {/if} {/foreach} - - -
    -
    +
    + {$carrier.instance->name|escape:'htmlall':'UTF-8'} {if isset($carrier.instance->delay[$cookie->id_lang])} {$carrier.instance->delay[$cookie->id_lang]|escape:'htmlall':'UTF-8'} {/if} diff --git a/themes/roykin/css/global.css b/themes/roykin/css/global.css index 5d1c10e..36994e4 100644 --- a/themes/roykin/css/global.css +++ b/themes/roykin/css/global.css @@ -205,8 +205,27 @@ body.content_only { margin: 0 } #footer { + background: #1f1f1f; + color: #fff; + padding: 45px 15px; } - + #footer li { + padding-right: 5%; + } + #footer li .title { + border-right: 1px solid #fff; + display: block; + font-family: 'ITCAvantGarde'; + font-size: 14px; + padding: 0 0 10px 0; + text-transform: uppercase; + } + #footer li:last-child .title { border: 0; } + #footer li .subtitle { + border-right: 1px solid #fff; + display: block; + } + #footer li:last-child .subtitle { border: 0; } @media (max-width: 1199px) { @@ -248,8 +267,8 @@ body.content_only { margin: 0 } color: #828282; } #order_step li.step_current { color: #fff; z-index: 5; } - #order_step li.step_done { background: #f25f0f; border-left: 1px solid #bb5100; color: #fff } - #order_step li.step_done a { color: #fff; font-weight: 600 } + #order_step li.step_done { color: #828282 } + #order_step li.step_done a { color: #828282; text-decoration: none; } #order_step li a { color: #333; } #shopping-cart-products { @@ -337,7 +356,9 @@ body.content_only { margin: 0 } width: 55px; } #shopping-cart-products .product-stock { - font-size: 12px; + font-size: 13px; + line-height: 15px; + padding: 0 60px; } #shopping-cart-products .product-stock span:before { background: #3fd9ac; @@ -382,87 +403,147 @@ body.content_only { margin: 0 } } #shopping-cart-calcul .discount_form { background: #fff; - border: 1px solid #f0f0f0; + border: 3px solid #f0f0f0; + padding: 20px; + position: relative; + z-index: 1 + } + #shopping-cart-calcul .discount_form .inner { + position: relative; + overflow: hidden; + } + #shopping-cart-calcul .discount_form label { + display: block; + margin-bottom: 25px; + position: relative; + } + #shopping-cart-calcul .discount_form label span { + background: #fff; + color: #363842; + display: block; + font-family: 'ITCAvantGarde'; + font-size: 12px; + padding: 0 0 20px 0; + margin-bottom: 10px; + position: relative; + text-transform: uppercase; + z-index: 3; + } + #shopping-cart-calcul .discount_form label:before { + box-shadow: 0 0 20px 0px rgba(0, 0, 0, 0.3); + border-radius: 500px; + content: ""; + display: block; + height: 40%; + left: 20%; + position: absolute; + top: 50%; + width: 60%; + z-index: 1; + } + #shopping-cart-calcul .discount_form .discount_name { + background: #f4f4f4; + border: 1px solid #e1e1e1; + border-radius: 2px; + color: #333; + float: left; + height: 40px; + padding: 0 65px 0 10px; + width: 70%; + } + #shopping-cart-calcul .discount_form .btn { + background: #202020; + background: -webkit-linear-gradient(top, #202020, #0a0a0a); + background: -o-linear-gradient(top, #202020, #0a0a0a); + background: -moz-linear-gradient(top, #202020, #0a0a0a); + background: linear-gradient(to top, #202020, #0a0a0a); + border-color: #363842; + border-radius: 2px; + color: #fff; + float: right; + font-family: 'ITCAvantGarde'; + font-size: 14px; + height: 40px; + line-height: 40px; + padding: 0; + text-transform: uppercase; + text-align: center; + width: 28%; + } + #shopping-cart-calcul .featured-voucher { + background: #fff; + border: 3px solid #f0f0f0; + margin-bottom: 30px; padding: 25px; position: relative; z-index: 1 } - #shopping-cart-calcul .discount_form .inner { - position: relative; - } - #shopping-cart-calcul .discount_form label { + #shopping-cart-calcul .featured-voucher .title { + background: #fff; color: #363842; - display: inline-block; - font-family: 'Oswald'; - font-size: 16px; + display: block; + font-family: 'ITCAvantGarde'; + font-size: 12px; + padding: 10px 0; margin-bottom: 10px; - } - #shopping-cart-calcul .discount_form .discount_name { - border: 1px solid #363842; - height: 40px; - padding: 0 65px 0 10px; - width: 100%; - } - #shopping-cart-calcul .discount_form .btn { - background: #363842; - border-color: #363842; - border-radius: 0 2px 2px 0; - font-family: 'OpenSans'; - font-size: 16px; - height: 40px; - line-height: 40px; - padding: 0; - position: absolute; - right: 0; + position: relative; text-transform: uppercase; - text-align: center; - top: 0; - width: 65px; + z-index: 3; } + #shopping-cart-calcul .featured-voucher .voucher_name { + cursor: pointer; + padding-left: 15px; + text-decoration: underline; + } #shopping-cart-calcul .line { - background: #f1f1f1; - border-top: 1px solid #e5e5e5; color: #333; clear: both; font-family: 'OpenSans'; font-size: 0; overflow: hidden; - padding: 10px 0; + padding: 5px 0; } + #shopping-cart-calcul .inner .line:first-child { padding-top: 0 } + #shopping-cart-calcul .line.total_price { border-top: 3px solid #f4f4f4; margin-top: 10px; } #shopping-cart-calcul .line .price_discount_delete { - text-decoration: none; + background: url('../img/delete-btn.png') no-repeat center center; + display: inline-block; + height: 21px; + margin-right: 10px; + width: 17px; } - #shopping-cart-calcul .line .price_discount_delete i { - color: #999; - font-size: 16px; - } #shopping-cart-calcul .line:first-child { border: 0 } #shopping-cart-calcul .line > div { - font-size: 14px; + font-size: 13px; float: none; display: inline-block; vertical-align: middle; } #shopping-cart-calcul .line > div:last-child { - font-family: 'Oswald'; - font-size: 24px; + font-family: 'ITCAvantGarde'; + font-size: 16px; padding: 5px 15px; text-align: right; } #shopping-cart-calcul .line.freeshipping > div:last-child { font-size: 16px; } - #shopping-cart-calcul .line #total_tax { - font-family: 'Oswald'; - font-size: 24px; + #shopping-cart-calcul .line.total_price { + color: #bfa56d; + font-family: 'ITCAvantGarde'; + padding: 15px 0; } - #shopping-cart-calcul #total_price { - color: #f25f0f; - font-size: 48px; - line-height: 36px; - } - .cart_navigation { - + #shopping-cart-calcul .line.total_price > div:first-child { + color: #bfa56d; + font-size: 14px; + text-transform: uppercase; + } + #shopping-cart-calcul .line.total_price > div:last-child { + color: #bfa56d; + font-size: 30px; + } + #shopping-cart .cart_navigation { + padding: 0 15px; } .cart_navigation > *:first-child { float: right; @@ -470,6 +551,9 @@ body.content_only { margin: 0 } .cart_navigation .btn2 { float: left; } + #shopping-cart .continue { + margin-top: 30px; + } @@ -542,6 +626,29 @@ body.content_only { margin: 0 } #index h1 { margin-top: 25px; } + #auth .box > .inner { + background: #1f1f1f; + border: 0; + padding: 50px 100px; + text-align: center; + } + #auth .box .title { + background: none; + color: #fff; + display: block; + font-family: "DancingScript"; + font-size: 26px; + padding: 0; + text-transform: none; + } + #auth .box .title:after { + background: #fff; + content: ""; + display: block; + height: 1px; + margin: 20px auto; + width: 35px; + } #auth form .lost_password { color: #bfa56d; display: block; @@ -574,65 +681,48 @@ body .addresses { padding: 50px 15px; } .addresses .addressesAreEquals { - padding: 11px 0; + padding: 0 0 10px 0; margin: 0 } - - .addresses ul#address_delivery, - .addresses ul#address_invoice { - padding: 30px 0 0 0; + .addresses #address_delivery_form { + margin-bottom: 20px; + } + .addresses .flex-ctn { + display: flex; + flex-direction: row; + flex-wrap: wrap; + } + .addresses .box-content { + padding: 0 75px; } .addresses .address li { - color: #67686d; - height: 20px; font-family: 'OpenSans'; - font-size: 14px; + font-size: 13px; } - .addresses .address_update { text-align: center } - .addresses ul#address_invoice .address_update a { display: none } - .addresses #address_invoice_form { - color: #67686d; - font-size: 14px; - font-style: italic; - height: 0; - overflow: hidden; - -webkit-transition: all 0.3s ease 0s; - -o-transition: all 0.3s ease 0s; - transition: all 0.3s ease 0s; - } - .addresses #address_invoice_form.open { height: 50px; overflow: visible; } - .addresses #address_invoice_form a { display: block; } - .addresses #address_delivery_form > label, - .addresses #address_invoice_form > label { - font-size: 20px; - font-weight: 900; - text-transform: uppercase; - } - - - .addresses .address_add { - display: block; - margin: 0 0 45px 0; - overflow: hidden; - text-align: center - } - .addresses #order-carrier-list h3 { - font-size: 20px; - font-weight: 900; - text-transform: uppercase; + .addresses .carriers-list { + margin-bottom: 30px; } + .addresses .carriers-list .title { + background: #202020; + border-radius: 2px; + color: #fff; + font-family: 'ITCAvantGarde'; + font-size: 14px; + padding: 20px 0; + text-transform: uppercase; + text-align: center; + } + .addresses #order-carrier-list .delivery-option { cursor: pointer; position: relative; } .addresses #order-carrier-list .delivery-option .inner { - background: #f1f1f1; - border-bottom: 1px solid #ececec; - font-size: 0; - min-height: 104px; - padding: 10px 15px; + border-bottom: 3px solid #f4f4f4; + font-size: 0; + padding: 18px 0 15px; position: relative; z-index: 2; } @@ -643,21 +733,59 @@ body .addresses { display: inline-block; vertical-align: middle; } - .addresses .radio-button { - min-height: 102px; - padding-left: 0; + .addresses #order-carrier-list .radio-button { + padding-left: 45px; + text-align: center; } - .addresses .radio-button img { - width: 115px; + .addresses #order-carrier-list .radio-button .custom-radio { + left: 0; + margin-top: -13px; + position: absolute; + top: 50%; } - .addresses .radio-button img + .custom-radio { display: inline-block; margin: 0 0 0 20px } - .addresses .radio-button .custom-radio { border-radius: 50%; display: block; margin: 39px 0 0 138px; } - .addresses #order-carrier-list .delivery-option .inner > .price { - color: #f25f0f; - font-family: 'Oswald'; + .addresses #order-carrier-list .radio-button img { + + } + .addresses #order-carrier-list .delivery-option .inner .desc { + font-size: 13px; + } + .addresses #order-carrier-list .delivery-option .inner .desc .carrier-name { + display: block; + font-family: 'ITCAvantGarde'; + margin-bottom: 5px; + text-transform: uppercase; + } + .addresses #order-carrier-list .delivery-option .inner .price { + color: #bfa56d; + font-family: 'ITCAvantGarde'; font-size: 18px; text-transform: uppercase; } + .addresses .message { + font-size: 13px; + margin-bottom: 30px; + text-align: center; + } + .addresses .message h2 { + background: url('../img/shadow.png') no-repeat center bottom; + color: #000; + display: block; + font-family: "ITCAvantGarde"; + font-size: 14px; + margin-bottom: 15px; + padding: 10px 0 30px 0; + text-transform: uppercase; + } + .addresses .message textarea { + background: #f4f4f4; + border: 1px solid #e1e1e1; + border-radius: 4px; + font-family: "OpenSans"; + font-size: 13px; + padding: 15px; + width: 100%; + min-height: 150px; + } @media (max-width: 991px) { .addresses #address_invoice_form label { margin-top: 30px; } @@ -675,98 +803,88 @@ body .addresses { #auth .box .inner { padding: 25px 15px; } } @media (max-width: 500px) { - - .addresses #order-carrier-list .delivery-option .price { font-size: 14px } } .order-paiement { padding: 30px 15px; } - .order-paiement .paiement-module { - position: relative; + .order-paiement .paiement-list { + margin-bottom: 30px; } - .order-paiement .paiement-module .inner { - background: #f1f1f1; - color: #333; - font-family: 'OpenSans'; - overflow: hidden; - padding: 15px 10px; - position: relative; - z-index: 2; + .order-paiement .paiement-list .title { + background: #202020; + border-radius: 2px; + color: #fff; + font-family: 'ITCAvantGarde'; + font-size: 14px; + padding: 20px 0; + text-transform: uppercase; } - .order-paiement .paiement-module .inner > div { - font-size: 14px; + .order-paiement .paiement-module { + position: relative; } - .order-paiement .resume .inner { - border: 1px solid #e3e3e4; - color: #67686d; - font-size: 14px; - padding: 0 10px; + .order-paiement .paiement-module .inner { + border-bottom: 3px solid #f4f4f4; + color: #333; + font-family: 'OpenSans'; + overflow: hidden; + padding: 15px 10px; + position: relative; + z-index: 2; + } + .order-paiement .paiement-module .inner > div { + color: #000; + font-family: 'ITCAvantGarde'; + font-size: 14px; + text-transform: uppercase; + } + .order-paiement .paiement-module .inner > div img { + display: block; + margin: 0 auto; + max-width: 100% + } + + .order-paiement .resume .title { } - .order-paiement .resume-cart h3 { - border-bottom: 2px solid #e3e3e4; - display: block; - font-family: "Oswald"; - font-size: 16px; - padding: 20px 0; - text-align: center; - text-transform: uppercase; - } - .order-paiement .resume-cart .product { border-bottom: 1px solid #e3e3e4; padding: 20px 0 } - .order-paiement .resume-cart .product-name span:first-child { - font-family: 'OpenSans'; - line-height: 20px; - } - .order-paiement .resume-cart .product-name span:last-child { - font-size: 20px; - line-height: 20px; - text-transform: uppercase; - } - .order-paiement .resume-cart .product-name span:last-child .barre { font-weight: 300; font-size: 14px; } - .order-paiement .resume-cart .resume-products .product-attributes .taille { - font-family: 'OpenSans'; - font-size: 14px; - font-weight: 300; - text-align: left; - text-transform: none; - } - + .order-paiement .resume-cart > .inner { padding: 15px; } .order-paiement .resume-price { - background: #e3e3e4; - color: #67686d; - padding: 12px 10px; + padding: 0 15px; margin: 0 -10px; } .order-paiement .resume-price > div { padding: 6px 0; } - .order-paiement .resume-products .product > div > span:last-child, .order-paiement .resume-price > div > span:last-child { - font-family: 'Oswald'; + font-family: 'ITCAvantGarde'; text-align: right; - } - .order-paiement .resume-price > div > span:first-child { - font-family: 'OpenSans'; - font-size: 14px; - line-height: 20px; - } - .order-paiement .resume-price > div > span:last-child { - font-size: 20px; + font-size: 16px; line-height: 20px; text-transform: uppercase; } - .order-paiement .resume-price > div.price { padding-top: 30px } - .order-paiement .resume-price > div.price > span:last-child { color: #f25f0f; font-size: 26px; } - .order-paiement .cgv { - background: #f1f1f1; - color: #333; + .order-paiement .resume-price > div > span:first-child { + font-family: 'OpenSans'; + font-size: 13px; + line-height: 20px; + text-align: left; + } + .order-paiement .resume-price > div > span:last-child { + + } + .order-paiement .resume-price > div.price > span:last-child { color: #bfa56d; font-size: 30px; } + .order-paiement .cgv .title { + background: #202020; + border-radius: 2px; + color: #fff; + font-family: 'ITCAvantGarde'; font-size: 14px; - margin: 20px 0 0 0; - overflow: hidden; - padding: 25px; + padding: 20px 0; + text-transform: uppercase; } - .order-paiement .cgv p { + .order-paiement .cgv .box-content { + border: 3px solid #f4f4f4; + border-top: 0; + padding: 20px; margin: 0; } .order-paiement .cart_navigation > div > span { @@ -778,13 +896,48 @@ body .addresses { margin: -17px 0 5px 0; } - .order-paiement .cgv label a { - color: #ee7c03; - display: inline-block; - font-family: 'OpenSans'; - font-size: 14px; - line-height: 16px; - } + .order-paiement .cgv .box-content { + background: #fff; + background: -webkit-linear-gradient(top, #f4f4f4, #fff); + background: -o-linear-gradient(top, #f4f4f4, #fff); + background: -moz-linear-gradient(top, #f4f4f4, #fff); + background: linear-gradient(to top, #f4f4f4, #fff); + } + .order-paiement .cgv .box-content .custom-checkbox { + text-align: right; + } + .order-paiement .cgv .box-content .custom-checkbox:before { + margin-right: 0; + } + .order-paiement .cgv .box-content .custom-checkbox input { + left: auto; + right: 0; + } + .order-paiement .cgv label { + font-size: 13px; + } + .order-paiement .cgv label a { + color: #c69462; + display: block; + font-family: 'OpenSans'; + margin: 5px 0; + } + .order-paiement .cgv .validate-payment { + margin-top: 30px; + } + .order-paiement .cgv .validate-payment button { + padding: 10px 10px; + margin-bottom: 10px; + width: 100%; + } + .order-paiement .cgv .validate-payment span { + display: block; + font-size: 13px; + } + +#order-confirmation .prices { margin-top: 30px } +#order-confirmation .addresses-list { text-align: center; } + @media (max-width: 1199px) { .order-paiement .submit { text-align: center } } @@ -808,78 +961,11 @@ body .addresses { /************************************************************************************************************* ******************************************* COMPTE ******************************************* **************************************************************************************************************/ - -.account .menu-account > div { - border: 1px solid #e3e3e4; - padding: 0 10px; -} - .account .menu-account .title { - border-bottom: 2px solid #e3e3e4; - color: #67686d; - display: block; - font-size: 16px; - font-family: 'Oswald'; - padding: 20px 0; - text-align: center; - text-transform: uppercase; - } - .account .menu-account .title a { - text-decoration: none; - } - .account .menu-account ul { - padding: 10px 0; - } - .account .menu-account li a { - color: #67686d; - display: block; - font-size: 14px; - margin: 3px 0; - padding: 7px 0 7px 35px; - position: relative; - text-decoration: none; - } - .account .menu-account li a:hover, .account .menu-account li a.active { background: #eae9e9; color: #f25f0f; } - .account .menu-account li > a.active { font-weight: bold; } - .account .menu-account li > a:hover i, .account .menu-account li > a.active i { color: #f25f0f; left: 15px; opacity: 1 } - .account .menu-account li a i { - font-size: 14px; - left: 5px; - opacity: 0; - padding: 0; - position: absolute; - top: 50%; - } - .account .menu-account li.logout a { background: #ddd } - .account .user-infos > span { - display: block; - } - .account .user-infos > span > span { - font-weight: 700; - } - .account .addresses-preview .address .box-content { - height: 190px; - } -@media (max-width: 991px) { - .account .menu-account { padding-left: 15px } -} -@media (max-width: 480px) { - .account .addresses-preview .address .box-content { height: auto } -} - -/* Historique de commande */ .account .table-div .table-head { - font-family: 'OpenSans'; overflow: hidden; } -@media (max-width: 991px) { - .account .table-div .table-row > div, #history .account .table-div .table-row > div { display: block } - -} - -/* Details de la commande */ - #order-detail .order-info { margin-bottom: 30px; } @@ -928,6 +1014,7 @@ body .addresses { .account .addresses { padding: 0; + text-align: center; } .account .addresses .address { min-height: 250px; @@ -945,11 +1032,17 @@ body .addresses { #order-detail #sendOrderMessage label { color: #1e1e1e; - font-weight: 700; } #order-detail #sendOrderMessage .custom-select { width: 60%; } + #order-detail #sendOrderMessage textarea { + background: #f4f4f4; + border: 1px solid #e1e1e1; + border-radius: 2px; + color: #202020; + font-size: 13px; + } @media (max-width: 1199px) { .account .addresses { margin-bottom: 0 } @@ -966,125 +1059,7 @@ body .addresses { #order-detail .order-info li .bold { display: block; margin-top: 10px } } -/* Retours */ - .block-order-detail > .box { - border: 1px solid #e3e3e4; - border-top: 0; - } - -@media (max-width: 991px) { - .block-order-detail .text-center { text-align: left; } -} - -/* Avoirs */ - -#order-slip .account .table-div .table-row .icon-pdf { - font-size: 26px; - height: 27px; - margin: -8px 0 -4px 0; -} - -/* Adresses */ -#addresses .address { - margin-bottom: 30px; - min-height: 300px; -} - #addresses .box-footer a:first-child i { padding: 0 5px; } - -/* Ajout/Modif adresse */ -form.std { - background: #f7f7f7; - border: 1px solid #e5e5e5; - clear: both; - overflow: hidden; - padding-bottom: 25px; -} - form.std h2 { - border-bottom: 1px solid #e5e5e5; - color: #000; - display: block; - font-size: 30px; - margin: 0; - padding: 15px 100px; - } - - form.std .form_content { - padding: 20px 300px 20px 100px; - } - form.std .form_content p.text { - padding: 20px 0 21px 0; - } - form.std .lost_password { - color: #b4293c; - float: left; - font-family: 'OpenSans'; - font-size: 14px; - } - -@media (max-width: 1199px) { - form.std .form_content { padding: 20px 100px } -} -@media (max-width: 767px) { - form.std h2 { padding: 15px 50px } - form.std .form_content { padding: 20px 50px } -} -@media (max-width: 500px) { - form.std h2 { padding: 15px 20px } - form.std .form_content { padding: 20px } - .submit button, .submit a.btn { font-size: 16px; margin-left: 0; width: 100%; } - -} - -/* WIshlist */ -.wishlistLinkTop { - margin-bottom: 30px; - text-align: center; -} - .wishlistLinkTop .social { - margin-bottom: 15px; - } - .wishlistLinkTop .social li { - display: inline-block; - vertical-align: middle; - } - .wishlistLinkTop .social li a { - color: #fff; - } - .wishlistLinkTop .social li a:hover { color: #151519; text-decoration: none } - .wishlistLinkTop .social li a i { - background: #ee7c03; - border-radius: 50%; - color: #fff; - display: block; - font-size: 20px; - height: 40px; - line-height: 40px; - margin: 30px 15px 0 15px; - padding: 0; - width: 40px; - } - .wishlistLinkTop .social li a:hover i { background: #ff9600; text-decoration: none } - .wishlistLinkTop .social li a span:before { - background: #ee7c03; - content: ""; - height: 1px; - display: block; - margin: 7px auto 2px auto; - -webkit-transition: all 0.3s ease 0s; - -moz-transition: all 0.3s ease 0s; - transition: all 0.3s ease 0s; - width: 30px; - } - .wishlistLinkTop .social li a:hover span:before { background: #ff9600 } - .wishlistLinkTop .social li a span { - color: #ee7c03; - font-size: 14px; - } - .wishlistLinkTop .social li a:hover span { color: #ff9600 } - #module-blockwishlist-mywishlist .product-ctn .product-infos .product-details { - overflow: unset; - } /************************************************************************************************************* ********************************** PAGES COMPLEMENTAIRES ************************************* diff --git a/themes/roykin/css/k2000.css b/themes/roykin/css/k2000.css index c1c6259..e64a4d2 100644 --- a/themes/roykin/css/k2000.css +++ b/themes/roykin/css/k2000.css @@ -185,12 +185,37 @@ a { color: #363842 } -webkit-transition: all 0.3s ease 0s; -moz-transition: all 0.3s ease 0s } +.btn:before { + background: #f9e48f; + background: -webkit-linear-gradient(top, #f9e48f, #bfa56d); + background: -o-linear-gradient(top, #f9e48f, #bfa56d); + background: -moz-linear-gradient(top, #f9e48f, #bfa56d); + background: linear-gradient(to top, #f9e48f, #bfa56d); + bottom: 0; + border-radius: 2px; + content: ""; + display: block; + left: 0; + opacity: 0; + position: absolute; + right: 0; + top: 0; + transition: all 0.3s ease 0s; + -webkit-transition: all 0.3s ease 0s; + -moz-transition: all 0.3s ease 0s + z-index: 2; +} + .btn span { + position: relative; + z-index: 3; + } button.btn { padding-top: 7px; padding-bottom: 7px } -.btn:hover { color: #000; } - -.btn.btn2 { background: #1c1d22; border-color: #1c1d22; } -.btn.btn2:hover { background: none; color: #1c1d22; } +.btn:hover:before { opacity: 1 } +.btn:hover span { color: #000; } +.btn.btn2 { background: #202020; border-color: #1c1d22; color: #fff } +.btn.btn2:hover { background: #444; color: #fff; } +.btn.btn2:hover:before { display: none; } .btn.btn-full-width { width: 100%; } /* Positionnement des icones */ @@ -297,28 +322,31 @@ header.page-heading.order-process { padding: 15px 0 0 0; } **************************************************************************************************************/ .block { margin-bottom: 30px } .box { + color: #000; font-size: 14px; margin-bottom: 30px; position: relative; } .box > .inner { - background: #1f1f1f; - padding: 50px 100px; - text-align: center; + background: #fff; + background: -webkit-linear-gradient(top, #f4f4f4, #fff); + background: -o-linear-gradient(top, #f4f4f4, #fff); + background: -moz-linear-gradient(top, #f4f4f4, #fff); + background: linear-gradient(to top, #f4f4f4, #fff); + border: 3px solid #f4f4f4; + height: 100%; + padding: 25px; } .box .title { - color: #fff; + background: url('../img/shadow.png') no-repeat center bottom; + color: #000; display: block; - font-family: "DancingScript"; - font-size: 26px; - } - .box .title:after { - background: #fff; - content: ""; - display: block; - height: 1px; - margin: 20px auto; - width: 35px; + font-family: "ITCAvantGarde"; + font-size: 14px; + margin-bottom: 15px; + padding: 10px 0 30px 0; + text-transform: uppercase; + text-align: center; } .box .box-footer { margin-top: 15px; @@ -874,38 +902,38 @@ body .fancybox-overlay { display: none; } .custom-select > span:before { - background-position: left -272px; + background-position: left -38px; content: ""; - height: 48px; + height: 38px; left: 0; position: absolute; width: 5px; z-index: 2; } - .custom-select > span.open:before { background-position: left -145px } + .custom-select > span.open:before { background-position: left -147px } .custom-select > span { - background-position: right -224px; - color: #363842; + background-position: right 0px; + color: #000; cursor: pointer; display: block; - font-size: 14px; - height: 48px; - line-height: 48px; + font-size: 13px; + height: 38px; + line-height: 38px; overflow: hidden; - padding: 0 45px 0 15px; + padding: 0 45px 0 20px; position: relative; + text-align: left; text-overflow: ellipsis; width: 100%; white-space: nowrap; z-index: 1; } .custom-select.disabled > span { cursor: not-allowed } - .custom-select > span.open { background-position: right -114px; color: #fff } + .custom-select > span.open { background-position: right -105px; color: #000 } .custom-select > ul { background: #fff; border: 1px solid #dbdbdb; display: none; - font-family: 'Oswald'; margin: -1px 0 0 0; max-height: 300px; overflow-y: auto; @@ -919,11 +947,13 @@ body .fancybox-overlay { .custom-select > ul.open { display: block } .custom-select > ul li { color: #333; + font-size: 12px; cursor: pointer; - padding: 8px 10px; + padding: 12px 10px; + text-align: left; } .custom-select > ul li:hover, - .custom-select > ul li.selected { background-color: #ddd } + .custom-select > ul li.selected { background-color: #f4f4f4 } .custom-select > ul li input { height: 30px; width: 100%; @@ -972,7 +1002,7 @@ body .fancybox-overlay { /* Inline */ .custom-checkbox.inline:before { background-color: #fff; - background-position: 20px -351px; + background-position: 0px -200px; border: 1px solid #dbdbdb; content: ""; cursor: pointer; @@ -990,7 +1020,7 @@ body .fancybox-overlay { .custom-checkbox.inline:after { display: none } .custom-checkbox.checked:before, .custom-checkbox.checked:after, - .custom-checkbox.inline.checked:before { background-position: -14px -351px; } + .custom-checkbox.inline.checked:before { background-position: -9px -255px } /* CustomRadio */ .custom-radio { @@ -1009,8 +1039,8 @@ body .fancybox-overlay { } .custom-radio:before { background-color: #f1f1f1; - background-position: 20px -351px; - border: 2px solid #cdced4; + background-position: -65px -255px; + border: 1px solid #cdced4; border-radius: 50%; content: ""; cursor: pointer; @@ -1026,7 +1056,7 @@ body .fancybox-overlay { } .custom-radio.inline label { margin-bottom: 0; max-width: 75%; padding-left: 10px; } .custom-radio.checked:before, - .custom-radio.inline.checked:before { background-position: -70px -351px; border-color: #67686d } + .custom-radio.inline.checked:before { background-position: -65px -224px } .radio-box { cursor: pointer; } diff --git a/themes/roykin/footer.tpl b/themes/roykin/footer.tpl index 48aaae3..405a8d0 100644 --- a/themes/roykin/footer.tpl +++ b/themes/roykin/footer.tpl @@ -1,7 +1,11 @@ {if !isset($content_only) || !$content_only} -
    - -
    + {if $page_name != 'category' && $page_name != 'index'} +
    +
    + {hook h='displayReassurance'} +
    +
    + {/if} {hook h='endBody'} {/if} diff --git a/themes/roykin/history.tpl b/themes/roykin/history.tpl index 84e7c9b..c20d2e2 100644 --- a/themes/roykin/history.tpl +++ b/themes/roykin/history.tpl @@ -19,9 +19,7 @@