params->get('main_div_name'); $carouselEffect=$this->params->get('carousel_effect'); $pagination_type=$this->params->get('pagination_type'); $duration=$this->params->get('carousel_effect_duration'); if(empty($duration)) $duration=500; $limit=$this->params->get('limit'); $columns=$this->params->get('columns'); $products=$this->params->get('item_by_slide'); if(empty($products)){ $products=$columns; } $margin=$this->params->get('margin'); $oneByone=$this->params->get('one_by_one'); $autoSlideDuration=$this->params->get('auto_slide_duration'); $transitionEffect=$this->params->get('transition_effect'); $direction=$this->params->get('slide_direction'); $pane_height=$this->params->get('pane_height'); $height=$this->newSizes->height; $width=$this->newSizes->width; if($pagination_type=='thumbnails'){ $thnumbnailHeight=$this->params->get('pagination_image_height'); $thnumbnailWidth=$this->params->get('pagination_image_width'); $imageHelper = hikashop_get('helper.image'); if(empty($thnumbnailWidth) && empty($thnumbnailHeight)){ $thnumbnailHeight=$this->image->main_thumbnail_y/4; $thnumbnailWidth=$this->image->main_thumbnail_x/4; }else if(empty($thnumbnailWidth)){ $thnumbnailHeight=$this->params->get('pagination_image_height'); list($theImage->width, $theImage->height) = getimagesize($this->image->main_uploadFolder.$this->rows[0]->file_path); list($thnumbnailWidth, $thnumbnailHeight) = $imageHelper->scaleImage($theImage->width, $theImage->height, 0, $thnumbnailHeight); }else if(empty($thnumbnailHeight)){ $thnumbnailWidth=$this->params->get('pagination_image_width'); list($theImage->width, $theImage->height) = getimagesize($this->image->main_uploadFolder.$this->rows[0]->file_path); list($thnumbnailWidth, $thnumbnailHeight) = $imageHelper->scaleImage($theImage->width, $theImage->height, $thnumbnailWidth, 0 ); }else{ $thnumbnailHeight=$this->params->get('pagination_image_height'); $thnumbnailWidth=$this->params->get('pagination_image_width'); } } if(empty($autoSlideDuration)) $autoSlideDuration=1000; if($transitionEffect=='bounce') $transition='Bounce.easeOut'; if($transitionEffect=='linear') $transition='linear'; if($transitionEffect=='elastic') $transition='Elastic.easeOut'; if($transitionEffect=='sin') $transition='Sine.easeInOut'; if($transitionEffect=='quad') $transition='Quad.easeInOut'; if($transitionEffect=='expo') $transition='Expo.easeOut'; if($transitionEffect=='back') $transition='Back.easeOut'; $nbProduct=0; foreach($this->rows as $row){ $nbProduct++; } if($nbProduct>$limit) $nbProduct=$limit; if(!empty($oneByone) && $carouselEffect=='slide'){ if($this->params->get('div_item_layout_type')=='img_desc' || $this->params->get('div_item_layout_type')=='img_desc_2' || $this->params->get('div_item_layout_type')=='img_title' || $this->params->get('div_item_layout_type')=='img'){ $height=$height+$pane_height; } if($this->params->get('div_item_layout_type')=='img_desc' || $this->params->get('div_item_layout_type')=='img_desc_2'){ $width=$width*2; } $widthProd=($width*$columns)+($margin*$columns*2); $lines=ceil($products/$columns); $heightProd=$height*($lines)+($margin*$lines*2); $slideWidth=$widthProd*(ceil($nbProduct/$products)); $slideHeight=$heightProd*(ceil($nbProduct/$products)); $slides=ceil($nbProduct/$products)-1; if($direction=='horizontal'){ $increment=($width+2*$margin); $max=round(($nbProduct-$products)/$lines); $divWidth=($width+$margin*2)*$columns; $nbDiv=$widthProd/$divWidth; } else{ $increment=($height+2*$margin); $max=round(($nbProduct-$products)/$columns); $divHeight=($height+$margin*2)*$lines; $nbDiv=$heightProd/$divHeight; } $columnTot=round($nbProduct/$lines); } else{ if($this->params->get('div_item_layout_type')=='img_desc' || $this->params->get('div_item_layout_type')=='img_desc_2' || $this->params->get('div_item_layout_type')=='img_title' || $this->params->get('div_item_layout_type')=='img'){ $height=$height+$pane_height; } if($this->params->get('div_item_layout_type')=='img_desc' || $this->params->get('div_item_layout_type')=='img_desc_2'){ $width=$width*2; } $nbDiv=1; $lines=ceil($products/$columns); $slideWidth=($width*$columns+($margin*$columns*2))*(ceil($nbProduct/$products)); $slideHeight=($height*$lines+($margin*$lines*2))*(ceil($nbProduct/$products)); $slides=ceil($nbProduct/$products)-1; $widthProd=($width*$columns)+($margin*$columns*2); $divWidth=$widthProd; $heightProd=$height*($lines)+($margin*$lines*2); if($direction=='horizontal'){ $increment=$widthProd; $divWidth=$widthProd; } else{ $increment=$heightProd; $divHeight=$heightProd; } $max=$slides; } ob_start(); if($carouselEffect=='slide'){ if($direction=='horizontal'){ if($this->params->get('display_button')) echo '