Advertisement
Guest User

dfgfg

a guest
Aug 28th, 2014
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.36 KB | None | 0 0
  1. <?php
  2. /**
  3. * Magento
  4. *
  5. * NOTICE OF LICENSE
  6. *
  7. * This source file is subject to the Academic Free License (AFL 3.0)
  8. * that is bundled with this package in the file LICENSE_AFL.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://opensource.org/licenses/afl-3.0.php
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@magentocommerce.com so we can send you a copy immediately.
  14. *
  15. * DISCLAIMER
  16. *
  17. * Do not edit or add to this file if you wish to upgrade Magento to newer
  18. * versions in the future. If you wish to customize Magento for your
  19. * needs please refer to http://www.magentocommerce.com for more information.
  20. *
  21. * @category design
  22. * @package base_default
  23. * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
  24. * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
  25. */
  26. /**
  27. * @var Mage_Page_Block_Html_Header $this
  28. */
  29. ?>
  30. <div class="em-header-container em-header-wrapper">
  31. <div class="em-header container_24 ">
  32. <div class="em-header-content">
  33. <div class="grid_24 header-top">
  34. <div class="em-quick-access">
  35. <div class="em-toplink">
  36. <p class="welcome-msg"><?php echo $this->getWelcome() ?> <?php echo $this->getAdditionalHtml() ?></p>
  37. <?php echo $this->getChildHtml('topLinks') ?>
  38. <?php echo $this->getChildHtml('galagiftshop_header_ad');?>
  39.  
  40. <?php echo $this->getChildHtml('store_language') ?>
  41. <?php echo $this->getChildHtml('header.currency') ?>
  42. <?php echo $this->getChildHtml('store_switcher');?>
  43. </div>
  44. </div>
  45. </div>
  46. <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('header-phone')->toHtml(); ?>
  47. <div class="clear"></div>
  48. <div class="grid_24 header-bottom">
  49. <div class="header-bottom-content">
  50. <a href="<?php echo $this->getUrl('') ?>" title="<?php echo $this->getLogoAlt() ?>" class="logo"><strong><?php echo $this->getLogoAlt() ?></strong><img src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" /></a>
  51.  
  52. <ul class="link-bottom">
  53. <?php if (Mage::getSingleton('customer/session')->isLoggedIn()==0): ?>
  54. <li class="register"><a title="<?php echo $this->__('Register') ?>" href="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK).'customer/account/create'; ?>"><?php echo $this->__('Register') ?></a></li>
  55. <li class="login"><a title="<?php echo $this->__('Sign in') ?>" href="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK).'customer/account/login/'; ?>" ><?php echo $this->__('Sign in') ?></a></li>
  56. <?php else: ?>
  57. <li class="contacts"><a title="<?php echo $this->__('Contact Us') ?>" href="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK).'contacts'; ?>"><?php echo $this->__('Contact') ?></a></li>
  58. <li class="logout"><a title="<?php echo $this->__('Log out') ?>" href="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK).'customer/account/logout'; ?>"><?php echo $this->__('Log out') ?></a></li>
  59. <?php endif ?>
  60. </ul>
  61. <div>
  62.  
  63. </div>
  64. <div class="em-top-search"><?php echo $this->getChildHtml('topSearch') ?>
  65. </div>
  66. <?php echo $this->getChildHtml('cart_sidebar'); ?>
  67. </div>
  68. </div>
  69. <div class="clear"></div>
  70. </div>
  71. </div>
  72. </div>
  73. <div>
  74.  
  75. </div>
  76.  
  77.  
  78. <?php if(Mage::helper("galagiftshopsettings/mainmenu")->gettype() != 'default_hor' && Mage::helper("galagiftshopsettings/mainmenu")->gettype() != 'default_ver'): ?>
  79. <?php
  80. $idmenu = Mage::helper("galagiftshopsettings")->getGeneral_MainMenu();
  81. $model = Mage::getModel('megamenupro/megamenupro')->load($idmenu)->getData();
  82. ?>
  83. <?php if($model['type'] == 0):?>
  84. <div class="em-header-menu">
  85. <div class="container_24 em-menu">
  86. <div class="header-menu-content">
  87. <div id="sticky-anchor"></div>
  88. <div class="grid_24 em-menu-content">
  89. <div class="header-menu">
  90. <?php echo Mage::helper("galagiftshopsettings/mainmenu")->getmenu(); ?>
  91. </div>
  92. <?php echo $this->getChildHtml('topContainer'); ?>
  93. </div>
  94. <div class="clear"></div>
  95. </div>
  96. </div>
  97. <script type="text/javascript">//<![CDATA[
  98. jQuery(window).bind('emadaptchange',function(){
  99. function fixedtopMenu() {
  100. var $=jQuery;
  101. if (FREEZED_TOP_MENU !=0 && isPhone == false){
  102. var sticky_navigation = function(){
  103. var scroll_top = $(window).scrollTop();
  104. var div_top = $('#sticky-anchor').offset().top;
  105. if($('body').hasClass('adapt-0') == false){
  106. if (scroll_top > div_top) {
  107. $('.em-menu-content').addClass('fixed-top');
  108. } else {
  109. $('.em-menu-content').removeClass('fixed-top');
  110. }
  111. }else {
  112. $('.em-menu-content').removeClass('fixed-top');
  113. }
  114. };
  115. //sticky_navigation();
  116. $(window).scroll(function() {
  117. sticky_navigation();
  118. });
  119. }
  120. if($('body').hasClass('adapt-0') == true){
  121. $('.em-menu-content').removeClass('fixed-top');
  122. }
  123. };
  124. fixedtopMenu();
  125. });
  126. jQuery(window).bind('load',function(){
  127. function persistentMenu() {
  128. var $ = jQuery;
  129. var sticky_navigation = function(){
  130. var scroll_top = $(window).scrollTop();
  131. var div_top = $('#sticky-anchor').offset().top;
  132. if($('body').hasClass('adapt-0') == false){
  133. if (scroll_top > div_top) {
  134. $('.em-menu-content').addClass('fixed-top');
  135. } else {
  136. $('.em-menu-content').removeClass('fixed-top');
  137. }
  138. }else {
  139. $('.em-menu-content').removeClass('fixed-top');
  140. }
  141. };
  142. if($('body').hasClass('adapt-0') == true){
  143. $('.em-menu-content').removeClass('fixed-top');
  144. }
  145. $(window).scroll(function() {
  146. sticky_navigation();
  147. });
  148. };
  149. if (FREEZED_TOP_MENU !=0 && isPhone == false){persistentMenu();}
  150. });
  151. //]]>
  152. </script>
  153. </div>
  154. <?php endif;?>
  155. <?php elseif(Mage::helper("galagiftshopsettings/mainmenu")->gettype() == 'default_hor') : ?>
  156. <div class="em-header-menu">
  157. <div class="container_24 em-menu">
  158. <div class="header-menu-content">
  159. <div id="sticky-anchor"></div>
  160. <div class="grid_24 em-menu-content">
  161. <div class="header-menu">
  162. <?php echo $this->getChildHtml('topMenu') ?>
  163. <?php echo $this->getChildHtml('topContainer'); ?>
  164. </div>
  165. </div>
  166. <div class="clear"></div>
  167. </div>
  168. </div>
  169. <script type="text/javascript">//<![CDATA[
  170. jQuery(window).bind('emadaptchange',function(){
  171. function fixedtopMenu() {
  172. var $=jQuery;
  173. if (FREEZED_TOP_MENU !=0 && isPhone == false){
  174. var sticky_navigation = function(){
  175. var scroll_top = $(window).scrollTop();
  176. var div_top = $('#sticky-anchor').offset().top;
  177. if($('body').hasClass('adapt-0') == false){
  178. if (scroll_top > div_top) {
  179. $('.em-menu-content').addClass('fixed-top');
  180. } else {
  181. $('.em-menu-content').removeClass('fixed-top');
  182. }
  183. }else {
  184. $('.em-menu-content').removeClass('fixed-top');
  185. }
  186. };
  187. //sticky_navigation();
  188. $(window).scroll(function() {
  189. sticky_navigation();
  190. });
  191. }
  192. if($('body').hasClass('adapt-0') == true){
  193. $('.em-menu-content').removeClass('fixed-top');
  194. }
  195. };
  196. fixedtopMenu();
  197. });
  198. jQuery(window).bind('load',function(){
  199. function persistentMenu() {
  200. var $ = jQuery;
  201. var sticky_navigation = function(){
  202. var scroll_top = $(window).scrollTop();
  203. var div_top = $('#sticky-anchor').offset().top;
  204. if($('body').hasClass('adapt-0') == false){
  205. if (scroll_top > div_top) {
  206. $('.em-menu-content').addClass('fixed-top');
  207. } else {
  208. $('.em-menu-content').removeClass('fixed-top');
  209. }
  210. }else {
  211. $('.em-menu-content').removeClass('fixed-top');
  212. }
  213. };
  214. if($('body').hasClass('adapt-0') == true){
  215. $('.em-menu-content').removeClass('fixed-top');
  216. }
  217. $(window).scroll(function() {
  218. sticky_navigation();
  219. });
  220. };
  221. if (FREEZED_TOP_MENU !=0 && isPhone == false){persistentMenu();}
  222. });
  223. //]]>
  224. </script>
  225. </div>
  226. <?php endif;?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement