Просмотр сообщений

В этом разделе можно просмотреть все сообщения, сделанные этим пользователем.


Сообщения - Юрий

Страницы: 1 ... 15 16 [17] 18
241
Ну вот кратко...

css
[spoiler]/* Vertical Mega Menu Styles */
.dcjq-vertical-mega-menu .menu{
font: bold 12px Arial, sans-serif;
line-height: 16px;
position: relative; /* Required */
border: 1px solid #999;
border-bottom: none;
}

.dcjq-vertical-mega-menu .menu li a {
display: block;
color: #000;
padding: 11px 18px 11px 5px;
text-shadow: 1px 1px 1px #fff;
text-decoration: none;
border-bottom: 1px solid #999;
background: url(../image/bg_nav.png) repeat-x 0 0;
}

.dcjq-vertical-mega-menu .menu li a:hover, .dcjq-vertical-mega-menu .menu li.mega-hover a {
background-position: 0 -40px;
color: #fff;
text-shadow: 1px 1px 1px #000;
}

.dcjq-vertical-mega-menu .menu li a.dc-mega {position: relative;}

.dcjq-vertical-mega-menu .menu li a .dc-mega-icon {
display: block;
position: absolute;
top: 14px;
right: 15px;
width: 6px;
height: 8px;
background: url(../image/arrow_right.png) no-repeat -6px 0;
}

/* Mega menu container */
.dcjq-vertical-mega-menu .menu li .sub-container {
position: absolute; /* Required */
overflow: hidden;
background: url(../image/bg_menu.png) no-repeat 100% 100%; /* Add the drop shadow */
padding: 0 13px 17px 0; /* Padding for drop shadow */
}

.dcjq-vertical-mega-menu .menu li .sub-container .sub {
border: none;
padding: 15px 15px 5px 15px;
background: #fff url(../image/bg_grad_top.png) repeat-x 0 0;
border-top: 1px solid #ccc;
border-right: 1px solid #bbb;
border-bottom: 1px solid #bbb;
border-left: 1px solid #ccc;
}

.dcjq-vertical-mega-menu .menu li .sub .row {width: 100%; overflow: hidden;}

.dcjq-vertical-mega-menu .menu li .sub li {
float: none;
width: 140px;
font-size: 1em;
font-weight: normal;
}

.dcjq-vertical-mega-menu .menu li .sub li.mega-hdr {float: left;margin: 0 5px 10px 5px;}

.dcjq-vertical-mega-menu .menu li .sub a, .dcjq-vertical-mega-menu .menu.left li .sub a {
background: none;
border: none;
text-shadow: none;
float: none;
color: #000;
display: block;
text-decoration: none;
font-size: 0.9em;
margin-bottom: 0;
}

.dcjq-vertical-mega-menu .menu li .sub li.mega-hdr a.mega-hdr-a {
background: url(../image/bg_nav.png) repeat-x 0 -40px;
padding: 5px;
margin-bottom:5px;
text-transform: uppercase;
font-weight: bold;
color: #fff;
text-shadow: 1px 1px 1px #000;
text-align: left;
}

.dcjq-vertical-mega-menu .menu li .sub li.mega-hdr a.mega-hdr-a:hover {
color: #000;
text-shadow: none;
}
.dcjq-vertical-mega-menu .menu .sub li.mega-hdr li {margin-bottom: 3px;}
.dcjq-vertical-mega-menu .menu .sub li a {
padding: 3px 0px 3px 12px;
background: url(../image/bullet.png) no-repeat 3px 8px;
font-weight: normal;
text-transform: capitalize; font-size: 12px;
}

.dcjq-vertical-mega-menu .menu .sub li a:hover {color: #fff; background: #000 url(../image/bullet_white.png) no-repeat 5px 8px;}[/spoiler]

в head
[spoiler]<script type='text/javascript' src='./css/css_{$smarty.const.CONF_COLOR_SCHEME}/javascript
<script type="text/javascript">
$(document).ready(function($){
   $('#mega-1').dcVerticalMegaMenu({
      speed: 'fast',
      effect: 'slide',
      direction: 'right'
   });});</script>[/spoiler]

jquery.dcmegamenu.1.3.3.js
[spoiler]/**
* hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
*
* @param  f  onMouseOver function || An object with configuration options
* @param  g  onMouseOut function  || Nothing (use configuration options object)
* @author    Brian Cherne <[email protected]>
*/
(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);


/*
 * DC Vertical Mega Menu - jQuery vertical mega menu
 * Copyright (c) 2011 Design Chemical
 *
 * Dual licensed under the MIT and GPL licenses:
 *    http://www.opensource.org/licenses/mit-license.php
 *    http://www.gnu.org/licenses/gpl.html
 *
 */
(function($){

   //define the new for the plugin ans how to call it   
   $.fn.dcVerticalMegaMenu = function(options){
      //set default options 
      var defaults = {
         classParent: 'dc-mega',
         arrow: true,
         classArrow: 'dc-mega-icon',
         classContainer: 'sub-container',
         classSubMenu: 'sub',
         classMega: 'mega',
         classSubParent: 'mega-hdr',
         classSubLink: 'mega-hdr',
         classRow: 'row',
         rowItems: 3,
         speed: 'fast',
         effect: 'show',
         direction: 'right'
      };

      //call in the default otions
      var options = $.extend(defaults, options);
      var $dcVerticalMegaMenuObj = this;

      //act upon the element that is passed into the design   
      return $dcVerticalMegaMenuObj.each(function(options){

         $mega = $(this);
         if(defaults.direction == 'left'){
            $mega.addClass('left');
         } else {
            $mega.addClass('right');
         }
         // Get Menu Width
         var megaWidth = $mega.width();
         
         // Set up menu
         $('> li',$mega).each(function(){
            
            var $parent = $(this);
            var $megaSub = $('> ul',$parent);
   
            if($megaSub.length > 0){
               
            $('> a',$parent).addClass(defaults.classParent).append('<span class="'+defaults.classArrow+'"></span>');
               $megaSub.addClass(defaults.classSubMenu).wrap('<div class="'+defaults.classContainer+'" />');
               var $container = $('.'+defaults.classContainer,$parent);
               
               if($('ul',$megaSub).length > 0){
                  
                  $parent.addClass(defaults.classParent+'-li');
                  $container.addClass(defaults.classMega);
                  
                  // Set sub headers
                  $('> li',$megaSub).each(function(){
                     $(this).addClass('mega-unit');
                     if($('> ul',this).length){
                        $(this).addClass(defaults.classSubParent);
                        $('> a',this).addClass(defaults.classSubParent+'-a');
                     } else {
                        $(this).addClass(defaults.classSubLink);
                        $('> a',this).addClass(defaults.classSubLink+'-a');
                     }
                  });
                  
                  // Create Rows
                  var hdrs = $('.mega-unit',$parent);
                  rowSize = parseInt(defaults.rowItems);
                  for(var i = 0; i < hdrs.length; i+=rowSize){
                     hdrs.slice(i, i+rowSize).wrapAll('<div class="'+defaults.classRow+'" />');
                  }

                  // Get mega dimensions
                  var itemWidth = $('.mega-unit',$megaSub).outerWidth(true);
                  var rowItems = $('.row:eq(0) .mega-unit',$megaSub).length;
                  var innerItemWidth = itemWidth * rowItems;
                  var totalItemWidth = innerItemWidth + containerPad;

                  // Set mega header height
                  $('.row',this).each(function(){
                     $('.mega-unit:last',this).addClass('last');
                     var maxValue = undefined;
                     $('.mega-unit > a',this).each(function(){
                        var val = parseInt($(this).height());
                        if (maxValue === undefined || maxValue < val){
                           maxValue = val;
                        }
                     });
                     $('.mega-unit > a',this).css('height',maxValue+'px');
                     $(this).css('width',innerItemWidth+'px');
                  });
                  var subWidth = $megaSub.outerWidth(true);
                  var totalWidth = $container.outerWidth(true);
                  var containerPad = totalWidth - subWidth;
                  // Calculate Row Height
                  $('.row',$megaSub).each(function(){
                     var rowHeight = $(this).height();
                     $(this).parent('.row').css('height',rowHeight+'px');
                  });
                  $('.row:last',$megaSub).addClass('last');
                  $('.row:first',$megaSub).addClass('first');
               } else {
                  $container.addClass('non-'+defaults.classMega);
               }
            }
         
            var $container = $('.'+defaults.classContainer,$parent);
            // Get flyout height
            var subHeight = $container.height();
            var itemHeight = $parent.outerHeight(true);
            // Set position to top of parent
            $container.css({
               height: subHeight+'px',
               marginTop: -itemHeight+'px',
               zIndex: '1000',
               width: subWidth+'px'
            }).hide();
         });

         // HoverIntent Configuration
         var config = {
            sensitivity: 2, // number = sensitivity threshold (must be 1 or higher)
            interval: 100, // number = milliseconds for onMouseOver polling interval
            over: megaOver, // function = onMouseOver callback (REQUIRED)
            timeout: 0, // number = milliseconds delay before onMouseOut
            out: megaOut // function = onMouseOut callback (REQUIRED)
         };
         
         $('li',$dcVerticalMegaMenuObj).hoverIntent(config);
            
         function megaOver(){
            $(this).addClass('mega-hover');
            var $link = $('> a',this);
            var $subNav = $('.sub',this);
            var $container = $('.sub-container',this);
            var width = $container.width();
            var outerHeight = $container.outerHeight(true);
            var height = $container.height();
            var itemHeight = $(this).outerHeight(true);
            var offset = $link.offset();
            var scrollTop = $(window).scrollTop();
            offset = offset.top - scrollTop
            var bodyHeight = $(window).height();
            var maxHeight = bodyHeight - offset;
            var xsHeight = maxHeight - outerHeight - itemHeight;

            if(xsHeight < 0){
               var containerMargin = xsHeight - itemHeight;
               $container.css({marginTop: containerMargin+'px'});
            }
            
            var containerPosition = {right: megaWidth};
            if(defaults.direction == 'right'){
               containerPosition = {left: megaWidth};
            }
            
            if(defaults.effect == 'fade'){
               $container.css(containerPosition).fadeIn(defaults.speed);
            }
            if(defaults.effect == 'show'){
               $container.css(containerPosition).show();
            }
            if(defaults.effect == 'slide'){
               $container.css({
                  width: 0,
                  height: 0,
                  opacity: 0});
               
               if(defaults.direction == 'right'){
            
                  $container.show().css({
                     left: megaWidth
                  });
               } else {
               
                  $container.show().css({
                     right: megaWidth
                  });
               }
               $container.animate({
                     width: width,
                     height: height,
                     opacity: 1
                  }, defaults.speed);
            }
         }
         
         function megaOut(){
            $(this).removeClass('mega-hover');
            var $container = $('.sub-container',this);
            $container.hide();
         }
      });
   };
})(jQuery);
[/spoiler]

и сам код category_tree.tpl.html(работает и по старому)
[spoiler]{if $smarty.const.CONF_SHOW_MENU == 1}
<div class="dcjq-vertical-mega-menu">
<ul id="mega-1" class="menu">
    {assign var="old" value=-1}
    {assign var="ul_open" value=0}
    {assign var="sub" value=0}

    {section name=i loop=$categories_tree}


        {if $categories_tree.level==$old}
            </li>
        {elseif $categories_tree.level>$old && $smarty.section.i.index!=0}
             <ul>{assign var="ul_open" value=$ul_open+1} {assign var="sub" value=1}
        {/if}

        {if $categories_tree.level<$old}
              </ul>{assign var="ul_open" value=$ul_open-1}
        {/if}

        {if $categories_tree.level==0 && $ul_open>0}
              </ul>{assign var="ul_open" value=$ul_open-1}
        {/if}

        {if $smarty.section.i.index==$categories_tree|@count && $ul_open>0}</ul>{/if}

        {if $categories_tree.level ne 0}
            {if $sub}<li class="subfirst">{assign var="sub" value=0}{else}<li>{/if}
            <a style="width:100%;" href="./{$categories_tree.hurl}" {if $categoryID==$categories_tree.categoryID} class="pressed" {/if}><span>{$categories_tree.name}</span></a>
        {else}
            <li class={if $smarty.section.i.index==0}"topfirst"{elseif $smarty.section.i.index==$categories_tree|@count-1}"toplast"{else}"topmenu"{/if}>
            <a href="./{$categories_tree.hurl} {if $categoryID==$categories_tree.categoryID}class="pressed"{/if}"><span>{$categories_tree.name}</span></a>
        {/if}

       {assign var="old" value= $categories_tree.level}
    {/section}
  {if $ul_open ne 0}</ul>{/if}
</ul></div>
<br>

{else}

<div class="box">
  <div class="top"><img src="./images/icon_cat.png" alt="" /> {$smarty.const.ADMIN_CATEGORY_TITLE}</div>
   <div class="middle cat">
   
   <ul  id="verticalmenu" class="glossymenu">
    {assign var="old" value=0}
    {assign var="ja" value=0}
    {section name=i loop=$categories_tree}
        {if $categories_tree.level==$old}</li> {elseif $categories_tree.level>$old} <ul> {/if}
        {if $categories_tree.level<$old && $old>1}</li>{/if}
        {if $categories_tree.level<$old} </ul> {/if}
        <li><a href="./{$categories_tree.hurl}" {if $categoryID == $categories_tree.categoryID} class="selected" {/if}>{$categories_tree.name}</a>
    {assign var="old" value= $categories_tree.level}
    {/section}
    </ul>
   </div>
  <div class="bottom"></div>
 </div>
{/if}[/spoiler]

242
Разработка / Проблемы и решения в Lego 5.0.1
« : Ноября 30, 2011, 01:05:12 am »
Здесь предлагаю описывать неисправности данной версии...

При оформлении зарегистрированного пользователя не отправляется параметр комментарии. Кто то знает как исправить?

243
Я то сделал но не так как хотел. Позже выложу как и что если будет время.
я хотел без жс чисто на ксс что б не розкрывалось во время загрузки.... Если кто знает как это оптимизировать - подскажите.

244
нее. Это то понятно. Я делаю выпадающее меню. и мне нужно знать если данная категория имеет в себе подкатегорию то нарисовать стрелочку. Я думаю что через ксс как то нужно...
 

ну вобщем меню идет типа
<li>name0</li>
<li>name1
 <ul>
    <li>sub1</li>
     <li>sub2</li>
   </ul>
</li>


Вот css шаблон
[spoiler]ul#css3menu1,ul#css3menu1 ul{margin:0;list-style:none;background-color:#f5f5f5;background-image:url("../image/mainbk.png");background-repeat:repeat;border-width:5px;border-style:solid;border-color:#999999;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;}
ul#css3menu1 ul{display:none;position:absolute;left:100%;top:0;-moz-box-shadow:0.7px 0.7px 1px #777777;-webkit-box-shadow:0.7px 0.7px 1px #777777;box-shadow:0.7px 0.7px 1px #777777;padding:0 9px 9px;background-color:#ffffff;background-image:none;border-width:1px;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;border-style:solid;border-color:#d8d9da;}
ul#css3menu1 li:hover>*{display:block;}
ul#css3menu1 li:hover{position:relative;}
ul#css3menu1 ul ul{position:absolute;left:100%;top:0; background-image:url("../image/arrowsub.gif");padding-right:27px;}
ul#css3menu1{padding:0 1px 1px;display:block;font-size:0;float:left;}
ul#css3menu1 li{display:block;white-space:nowrap;font-size:0;}
ul#css3menu1>li,ul#css3menu1 li{margin:1px 0 0;}
ul#css3menu1 a:active, ul#css3menu1 a:focus{outline-style:none;}
ul#css3menu1 a,ul#css3menu1 a.pressed{display:block;vertical-align:middle;text-align:left;text-decoration:none;font:bold 13px Arial;color:#262626;cursor:default; }
ul#css3menu1 ul li{float:none;margin:9px 0 0;}
ul#css3menu1 ul a{text-align:left;padding:8px 0 0 0;background-color:#ffffff;background-image:none;border-width:1px 0 0 0;border-style:solid;border-color:#D9D9D9;border-radius:0px;-moz-border-radius:0px;-webkit-border-radius:0px;font:bold 13px Arial;color:#333333;text-decoration:none;}
ul#css3menu1 li:hover>a{background-color:#e3e3e3;border-style:none;font:bold 13px Arial;color:#efefef;text-decoration:none;background-image:url("../image/mainbk.png");background-position:0 100px;}
ul#css3menu1 img{border:none;vertical-align:middle;margin-right:10px;}
ul#css3menu1 img.over{display:none;}
ul#css3menu1 li:hover > a img.def{display:none;}
ul#css3menu1 li:hover > a img.over{display:inline;}
ul#css3menu1 li a.pressed img.over{display:inline;}
ul#css3menu1 li a.pressed img.def{display:none;}
//ul#css3menu1 span{display:block;overflow:visible;background-position:right center;background-repeat:no-repeat;padding-right:0px;}
//ul#css3menu1 ul span{background-image:url("../image/arrowsub.gif");padding-right:27px;}
ul#css3menu1 a{padding:10px;background-color:#f5f5f5;background-image:url("../image/mainbk.png");background-repeat:repeat;background-position:0 200px;border-width:0px;border-style:none;border-color:;color:#262626;text-decoration:none;}
ul#css3menu1 li:hover>a,ul#css3menu1 li>a.pressed{background-color:#e3e3e3;background-image:url("../image/mainbk.png");background-position:0 100px;border-style:none;color:#efefef;text-decoration:none;}
ul#css3menu1 ul li:hover>a,ul#css3menu1 ul li>a.pressed{background-color:#ffffff;background-image:none;border-style:solid;border-color:#D9D9D9;font:bold 13px Arial;color:#aa0000;text-decoration:none;}
ul#css3menu1 li.topfirst>a{border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;-webkit-border-radius:4px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;text-shadow:#d8d8d8 0px 1px 1px;}
ul#css3menu1 li.topfirst:hover>a,ul#css3menu1 li.topfirst>a.pressed{text-shadow:#3d3d3d 0px -1px 1px;}
ul#css3menu1 li.topmenu>a{text-shadow:#d8d8d8 0px 1px 1px;}
ul#css3menu1 li.topmenu:hover>a,ul#css3menu1 li.topmenu>a.pressed{text-shadow:#3d3d3d 0px -1px 1px;}
ul#css3menu1 li.toplast>a{border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;-webkit-border-radius:0;-webkit-border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;text-shadow:#d8d8d8 0px 1px 1px;}
ul#css3menu1 li.toplast:hover>a,ul#css3menu1 li.toplast>a.pressed{text-shadow:#3d3d3d 0px -1px 1px;}
ul#css3menu1 ._>li>a{padding:0;}
ul#css3menu1 li.subfirst>a{border-width:0;border-style:none;padding:0;}
ul#css3menu1 li.subfirst:hover>a,ul#css3menu1 li.subfirst>a.pressed{border-style:none;}[/spoiler]

тут если span то рисуется стрелочка
а мне нужно как то если есть подкатегория - нарисовалась стрелочка

245
Можно ли как то узнать есть ли в категории подкатегория?

<ul  id="verticalmenu" class="glossymenu">
    {assign var="old" value=0}
    {assign var="ja" value=0}
    {section name=i loop=$categories_tree}
        {if $categories_tree[i].level==$old}</li> {elseif $categories_tree[i].level>$old} <ul> {/if}
        {if $categories_tree[i].level<$old && $old>1}</li>{/if}
        {if $categories_tree[i].level<$old} </ul> {/if}
        <li><a href="./{$categories_tree[i].hurl}" {if $categoryID == $categories_tree[i].categoryID} class="selected" {/if}>{$categories_tree[i].name}</a>
    {assign var="old" value= $categories_tree[i].level}
    {/section}
</ul>

246
Доделал модуль. Скрины в 1 посте

247
Дизайн и шаблоны / Re: Как сделать лупу
« : Ноября 20, 2011, 12:38:12 pm »
Короче все переделал. Заменил скрипт лупы на новый. Поскольку тот глючноватый был. +исправил лаги.
Вот что получилось http://vo-stok.com.ua/product/kurtka-jack-jones-218/

теперь в stylesheet.css ничего убирать не нужно.

1) В админке->оформление->Обычная фотография:    200x200
2) В incudes/admin/sub/catalog_products_edit.php меняем
img_resize("./products_thumb/".$_FILES["thumb_pic"]["name"], "./products_thumb/P_".$_FILES["thumb_pic"]["name"], 150150CONF_IMAGE_COLOR);
на
img_resize
("./products_thumb/".$_FILES["thumb_pic"]["name"], "./products_thumb/P_".$_FILES["thumb_pic"]["name"], RESIZE_NORMAL_XRESIZE_NORMAL_YCONF_IMAGE_COLOR);

и
img_resize("./products_thumb/".$_FILES["file"]["name"][$fi], "./products_thumb/P_".$_FILES["file"]["name"][$fi], RESIZE_SMALL_XRESIZE_SMALL_YCONF_IMAGE_COLOR);
на
img_resize
("./products_thumb/".$_FILES["file"]["name"][$fi], "./products_thumb/P_".$_FILES["file"]["name"][$fi],RESIZE_NORMAL_XRESIZE_NORMAL_YCONF_IMAGE_COLOR);


3)Розпихуем все с архива по папкам в css/ваш шаблон/

4)В index.tpl.html после </body> добавляем
[spoiler]<!-- The JavaScript -->
  <script type="text/javascript" src="./css/css_{$smarty.const.CONF_COLOR_SCHEME}/javascript/jquery.easing-1.3.pack.js"></script> 

      <script type="text/javascript">
         $(function() {
   
            $("#content .jqzoom").fancybox({
               'transitionIn'   :   'elastic',
               'transitionOut'   :   'none',
                                        titleShow       :       false,
               'speedIn'   :   600,
               'speedOut'   :   200,
               'overlayShow'   :   true,
               'overlayColor'   :   '#000',
               'cyclic'   :   true,
               'easingIn'   :   'easeInOutExpo'
            });

            $("#content .mousetrap").live('click',function(){
               $(this).prev().trigger('click');
            });

            var $content   = $('#content'),
            $thumb_list = $content.find('.thumb > ul');

            $thumb_list.each(function(){
               var $this_list   = $(this),
               total_w      = 0,
               loaded      = 0,
               //preload all the images first
               $images      = $this_list.find('img'),
               total_images= $images.length;
               $images.each(function(){
                  var $img   = $(this);
                  $('<img/>').load(function(){
                     ++loaded;
                     if (loaded == total_images){
                        $this_list.data('current',0).children().each(function(){
                           total_w   += $(this).width();
                        });
                        $this_list.css('width', total_w + 'px');

                        //next / prev events

                        $this_list.parent()
                        .siblings('.next')
                        .bind('click',function(e){
                           var current = $this_list.data('current');
                           if(current == $this_list.children().length -1) return false;
                           var   next   = ++current,
                           ml      = -next * $this_list.children(':first').width();

                           $this_list.data('current',next)
                           .stop()
                           .animate({
                              'marginLeft'   : ml + 'px'
                           },400);
                           e.preventDefault();
                        })
                        .end()
                        .siblings('.prev')
                        .bind('click',function(e){
                           var current = $this_list.data('current');
                           if(current == 0) return false;
                           var   prev   = --current,
                           ml      = -prev * $this_list.children(':first').width();

                           $this_list.data('current',prev)
                           .stop()
                           .animate({
                              'marginLeft'   : ml + 'px'
                           },400);
                           e.preventDefault();
                        });
                     }
                  }).attr('src',$img.attr('src'));
               });
            });
         });
        </script>[/spoiler]

5) Теперь product_detailed.tpl.html это
[spoiler]{if $product_info[5] || $p_default}
         <a href="./products_pictures/{if $p_default}{$p_default}-B.jpg{else}{$product_info[9]}{/if}" class="thickbox" id="adpdp{$product_info[11]}"><img src="./products_pictures/{if $p_default}{$p_default}.jpg{else}{$product_info[5]}{/if}" id="dp{$product_info[11]}" style="margin-bottom: 3px;" alt="{$product_info[1]}" /></a><br />
         <a href="./products_pictures/{if $p_default}{$p_default}-B.jpg{else}{$product_info[9]}{/if}" rel="example_group" id="adp{$product_info[11]}"><span style="font-size: 11px;">{$smarty.const.ENLARGE_PICTURE}</span></a>
{else}
         <img src="./products_pictures/nophoto.jpg" id="dp{$product_info[11]}" style="margin-bottom: 3px;width: {$smarty.const.RESIZE_NORMAL_X}px; height: {$smarty.const.RESIZE_NORMAL_Y}px" alt="{$product_info[1]}" />
{/if}[/spoiler]

заменяем на
[spoiler]{* Picture viever *}
<link rel="stylesheet" type="text/css" href="./css/css_{$smarty.const.CONF_COLOR_SCHEME}/stylesheet/style.css" /> 
<link rel="stylesheet" type="text/css" href="./css/css_{$smarty.const.CONF_COLOR_SCHEME}/stylesheet/jquery.jqzoom.css">

<script src="./css/css_{$smarty.const.CONF_COLOR_SCHEME}/javascript/jquery.jqzoom-core.js" type="text/javascript"></script>

<script type="text/javascript">
$(document).ready(function() {
   $('.jqzoom').jqzoom({
            zoomType: 'standart',
            lens:true,
            title: false,
            preloadImages: false,
            //preloadText: 'Загрузка',
            alwaysOn:false,
            xOffset:30,
        });
});
</script>

  <table id="products" style="width: 100%; border-collapse: collapse; vertical-align: top;">
  <tr>
  <td style="text-align: center; width: {$smarty.const.RESIZE_NORMAL_X}px; vertical-align: top;">

    <div class="item"> 
      <div class="thumb_wrapper">
        <div class="thumb"> 
         <ul>
             {if $product_info[5] || $p_default}
                 <li><a rev="group1" class="jqzoom"  href="./products_pictures/{if $p_default}{$p_default}-B.jpg{else}{$product_info[9]}{/if}" >
                 <img src="./products_pictures/{if $p_default}{$p_default}.jpg{else}{$product_info[5]}{/if}" title="{$product_info[1]}" style="width: {$smarty.const.RESIZE_NORMAL_X}px; height: {$smarty.const.RESIZE_NORMAL_Y}px"></a></li>
             {else}
                 <img src="./images/nophoto.jpg" id="dp{$product_info[11]}" style="margin-bottom: 3px;width:{$smarty.const.RESIZE_NORMAL_X}px; height: {$smarty.const.RESIZE_NORMAL_Y}px" alt="{$product_info[1]}"/>
             {/if}
             {if $product_thumb[0] ne NULL}
               {section name=i loop=$product_thumb}
             <li><a rev="group1" class="jqzoom" href="./products_thumb/{$product_info[11]}/{$product_thumb}"><img src="./products_thumb/{$product_info[11]}/P_{$product_thumb}"  style="width: {$smarty.const.RESIZE_NORMAL_X}px; height: {$smarty.const.RESIZE_NORMAL_Y}px" alt="{$product_desc}"/></a></li>
               {/section}
             {/if}
         </ul>
        </div> 
        <a class="prev" href="#"></a> 
        <a class="next" href="#"></a> 
      </div>
    </div>
    <br>
  <b>{if $product_info[5] || $p_default}Всего изображений: {$product_thumb|@count+1}{else}Изображений нет{/if}</b>
</td>

{* END Picture viever *}[/spoiler]



   

248
Ну страницы их убираются. Но в дереве каталога - остаются....

249
всеравно не работает

250
Замени чекедитор

251
Дизайн и шаблоны / Re: Как сделать лупу
« : Ноября 09, 2011, 08:21:07 pm »
shuriks76
Прикол этого скрипта в том что зум не конфликтует с фенсибокс. + еще картинки пролистуется прямо на витрине.   
А зум в отдельной рамке легко делается. Параметры можешь глянуть в сообщении выше.

252
Дизайн и шаблоны / Re: Как сделать лупу
« : Ноября 09, 2011, 07:06:29 pm »
Немного поэкспериментировал и обновил скрипт.
Вот пример http://vo-stok.com.ua/product/kurtka-jack-jones-218/

Это добавляем в index.tpl.html после </body>
[spoiler]
<!-- The JavaScript -->
  <script type="text/javascript" src="./css/css_{$smarty.const.CONF_COLOR_SCHEME}/javascript/jquery.easing-1.3.pack.js"></script> 
  <script type="text/javascript" src="./css/css_{$smarty.const.CONF_COLOR_SCHEME}/javascript/jquery.fancybox-1.3.4.js"></script>
  <script type="text/javascript" src="./css/css_{$smarty.const.CONF_COLOR_SCHEME}/javascript/cloud-zoom.1.0.2.js"></script> 
      
      <script type="text/javascript">
         $(function() {
   
            $("#content .cloud-zoom").fancybox({
               'transitionIn'   :   'elastic',
               'transitionOut'   :   'none',
               'speedIn'      :   600,
               'speedOut'      :   200,
               'overlayShow'   :   true,
               'overlayColor'   :   '#000',
               'cyclic'      :   true,
               'easingIn'      :   'easeInOutExpo'
            });

            $("#content .mousetrap").live('click',function(){
               $(this).prev().trigger('click');
            });

            var $content   = $('#content'),
            $thumb_list = $content.find('.thumb > ul');

            $thumb_list.each(function(){
               var $this_list   = $(this),
               total_w      = 0,
               loaded      = 0,
               //preload all the images first
               $images      = $this_list.find('img'),
               total_images= $images.length;
               $images.each(function(){
                  var $img   = $(this);
                  $('<img/>').load(function(){
                     ++loaded;
                     if (loaded == total_images){
                        $this_list.data('current',0).children().each(function(){
                           total_w   += $(this).width();
                        });
                        $this_list.css('width', total_w + 'px');

                        //next / prev events

                        $this_list.parent()
                        .siblings('.next')
                        .bind('click',function(e){
                           var current = $this_list.data('current');
                           if(current == $this_list.children().length -1) return false;
                           var   next   = ++current,
                           ml      = -next * $this_list.children(':first').width();

                           $this_list.data('current',next)
                           .stop()
                           .animate({
                              'marginLeft'   : ml + 'px'
                           },400);
                           e.preventDefault();
                        })
                        .end()
                        .siblings('.prev')
                        .bind('click',function(e){
                           var current = $this_list.data('current');
                           if(current == 0) return false;
                           var   prev   = --current,
                           ml      = -prev * $this_list.children(':first').width();

                           $this_list.data('current',prev)
                           .stop()
                           .animate({
                              'marginLeft'   : ml + 'px'
                           },400);
                           e.preventDefault();
                        });
                     }
                  }).attr('src',$img.attr('src'));
               });
            });
         });
        </script>[/spoiler]

Теперь это заменяем [spoiler]   <table id="products" style="width: 100%; border-collapse: collapse; vertical-align: top;">
     <tr>
       <td style="text-align: center; width: 250px; vertical-align: top;">
{if $product_info[5] || $p_default}
         <a href="./products_pictures/{if $p_default}{$p_default}-B.jpg{else}{$product_info[9]}{/if}" class="thickbox" id="adpdp{$product_info[11]}"><img src="./products_pictures/{if $p_default}{$p_default}.jpg{else}{$product_info[5]}{/if}" id="dp{$product_info[11]}" style="margin-bottom: 3px;" alt="{$product_info[1]}" /></a><br />
         <a href="./products_pictures/{if $p_default}{$p_default}-B.jpg{else}{$product_info[9]}{/if}" rel="example_group" id="adp{$product_info[11]}"><span style="font-size: 11px;">{$smarty.const.ENLARGE_PICTURE}</span></a>
{else}
         <img src="./products_pictures/nophoto.jpg" id="dp{$product_info[11]}" style="margin-bottom: 3px;width: {$smarty.const.RESIZE_NORMAL_X}px; height: {$smarty.const.RESIZE_NORMAL_Y}px" alt="{$product_info[1]}" />
{/if}
       </td>[/spoiler]

меняем на [spoiler]{* Picture viever *}
<link rel="stylesheet" type="text/css" href="./css/css_{$smarty.const.CONF_COLOR_SCHEME}/stylesheet/style.css" /> 
<link rel="stylesheet" type="text/css" href="./css/css_{$smarty.const.CONF_COLOR_SCHEME}/stylesheet/cloud-zoom.css" /> 
<link rel="stylesheet" type="text/css" href="./css/css_{$smarty.const.CONF_COLOR_SCHEME}/stylesheet/jquery.fancybox.css" />

<table id="products" style="width: 100%; border-collapse: collapse; vertical-align: top;">
  <tr>
   <td style="text-align: center; width: 220px; vertical-align: top;">

  <div class="item"> 
    {if $product_thumb[0] ne NULL}<div class="thumb_wrapper">{/if}
      <div class="thumb"> 
       <ul>
         {if $product_info[5] || $p_default}
                <li><a rev="group1" class='cloud-zoom' rel="position: 'inside' , showTitle: false, adjustX:-4, adjustY:-4"  href="./products_pictures/{if $p_default}{$p_default}-B.jpg{else}{$product_info[9]}{/if}"><img src="./products_pictures/{if $p_default}{$p_default}.jpg{else}{$product_info[5]}{/if}" style="width: 200px; height: 200px;" alt="{$product_info[1]}"/></a></li>
                {if $product_thumb[0] ne NULL}
                      {section name=i loop=$product_thumb}
                 <li><a rev="group1" class='cloud-zoom' rel="position: 'inside' , showTitle: false, adjustX:-4, adjustY:-4" href="./products_thumb/{$product_info[11]}/{$product_thumb}"><img src="./products_thumb/{$product_info[11]}/P_{$product_thumb}" style="width: 200px; height: 200px;"  alt="{$product_desc}"/></a></li>
                       {/section}
               {/if}
        {else}
           <img src="./images/nophoto.jpg" id="dp{$product_info[11]}" style="margin-bottom: 3px;width: 200px; height: 200px" alt="{$product_info[1]}" />
        {/if}
            </ul>
          </div> 
            <a class="prev" href="#"></a> 
            <a class="next" href="#"></a> 
          {if $product_thumb[0] ne NULL}</div> {/if}
       </div>
       <b> {if $product_info[5] || $p_default}Всего изображений: {$product_thumb|@count+1} {else}Изображений нет{/if}</b>
    </td>
{* END Picture viever *}[/spoiler]


в stylesheet.css убираем строки
ul {margin:5px 0px 15px; padding-left: 10px;}
ul li {margin: 0px; list-style: none; background: url('../image/bullet_2.gif') 0 5px no-repeat; padding:0 0 3px 12px;}


Дальше папки и файлы с архива забрасываем в css/ваш шаблон/

Все должно работать. Если ничего не забыл. Возможно в некоторых местах нужно будет изменить пути с css_AreaInfo на свое.

253
Сильно много параметров добавлять нужно.... И + еще при добавлении товара каждый из них выбирать....

254
Разве доп. характеристики не решают проблему с размерами одежды ?

Мне нужно что б пользователь указал свои размеры в СМ. Потому что по разным странам размерные ряды отличаются... А я уже буду под него подбирать. А если это делать через доп параметры - то лажа выходит. Куча параметров и не понятно где вбирать. Для пользователя - НЕУДОБНО.
......

Ну что кто то знает как сделать?

255
Разработка / Модуль ввода размеров одежды
« : Ноября 06, 2011, 02:32:46 am »
Модуль указания размеров одежды в см при оформлении заказа. Введенные параметры сохраняются в БД. Что ввел пользователь смотрим в заказах.
Цена: 10$


Обращаться в личку либо    [email protected]   icq:7887111

Страницы: 1 ... 15 16 [17] 18