Вопрос Как убрать миниатюру главной фотографии из карточки товара?

Тема в разделе "Дизайн и оформление, шаблоны", создана пользователем gabb3r, 06.08.2014.

  1. Offline

    gabb3r Недавно здесь

    Регистрация:
    06.08.2014
    Сообщения:
    5
    Симпатии:
    0
    Пол:
    Мужской
    Как убрать миниатюру главной фотографии из карточки товара?

    LTWqGJeqvJw.jpg

    :(

    виртуал март версии 2,0,20
     
  2.  
  3. OlegK
    Offline

    OlegK Russian Joomla! Team Команда форума ⇒ Профи ⇐

    Регистрация:
    17.01.2011
    Сообщения:
    7 813
    Симпатии:
    771
    Пол:
    Мужской
    Выложи под спойлер default_images.php
    com_virtuemart.2.0.20b Не выводит првеьюшку гдавной картинки
     
  4. Offline

    gabb3r Недавно здесь

    Регистрация:
    06.08.2014
    Сообщения:
    5
    Симпатии:
    0
    Пол:
    Мужской
    <?php
    /**
    *
    * Show the product details page
    *
    * @package VirtueMart
    * @subpackage
    * @author Max Milbers, Valerie Isaksen

    * @link http://www.virtuemart.net
    * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
    * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
    * VirtueMart is free software. This version may have been modified pursuant
    * to the GNU General Public License, and as distributed it includes or
    * is derivative of works licensed under the GNU General Public License or
    * other free or open source software licenses.
    * @version $Id: default_images.php 6188 2012-06-29 09:38:30Z Milbo $
    */
    // Check to ensure this file is included in Joomla!
    defined('_JEXEC') or die('Restricted access');
    vmJsApi::js( 'fancybox/jquery.fancybox-1.3.4.pack');
    vmJsApi::css('jquery.fancybox-1.3.4');
    $document = JFactory::getDocument ();
    $imageJS = '
    jQuery(document).ready(function() {
    jQuery("a[rel=vm-additional-images]").fancybox({
    "titlePosition" : "inside",
    "transitionIn" : "elastic",
    "transitionOut" : "elastic"
    });
    jQuery(".additional-images .product-image").click(function() {
    jQuery(".main-image img").attr("src",this.src );
    jQuery(".main-image img").attr("alt",this.alt );
    jQuery(".main-image a").attr("href",this.src );
    jQuery(".main-image a").attr("title",this.alt );
    });
    });
    ';
    $document->addScriptDeclaration ($imageJS);

    if (!empty($this->product->images)) {
    $image = $this->product->images[0];
    ?>
    <div class="main-image">

    <?php
    echo $image->displayMediaFull("",true,"rel='vm-additional-images'");
    ?>

    <div class="clear"></div>
    </div>
    <?php
    $count_images = count ($this->product->images);
    if ($count_images > 1) {
    ?>

    <div class="additional-images">
    <?php
    for ($i = 0; $i < $count_images; $i++) {
    $image = $this->product->images[$i];
    ?>
    <div class="floatleft">
    <?php
    echo $image->displayMediaFull('class="product-image" style="cursor: pointer"',false,"");
    ?>
    </div>
    <?php
    }
    ?>
    <div class="clear"></div>
    </div>
    <?php
    }
    }
    // Showing The Additional Images END ?>

    с версией мог ошибиться, не могу найти где посмотреть точно версию, горит значок только об обновлении на более свежую
     
  5. OlegK
    Offline

    OlegK Russian Joomla! Team Команда форума ⇒ Профи ⇐

    Регистрация:
    17.01.2011
    Сообщения:
    7 813
    Симпатии:
    771
    Пол:
    Мужской
    Код (CODE):
    1. <?php
    2.         for ($i = 1; $i < $count_images; $i++) {
    3.             $image = $this->product->images[$i];
    4.             ?>

    Видишь старт $i = 1 , а у тебя $i = 0
     
  6. Offline

    gabb3r Недавно здесь

    Регистрация:
    06.08.2014
    Сообщения:
    5
    Симпатии:
    0
    Пол:
    Мужской
    Поменял , нет никаких изменений :(
     
  7. OlegK
    Offline

    OlegK Russian Joomla! Team Команда форума ⇒ Профи ⇐

    Регистрация:
    17.01.2011
    Сообщения:
    7 813
    Симпатии:
    771
    Пол:
    Мужской
    Судя по скрину,у тебя переопределено представление Вирт
    Ты где менял,в папке шаблона или компонента ?
     
  8. Offline

    gabb3r Недавно здесь

    Регистрация:
    06.08.2014
    Сообщения:
    5
    Симпатии:
    0
    Пол:
    Мужской
    компонента
     
  9. OlegK
    Offline

    OlegK Russian Joomla! Team Команда форума ⇒ Профи ⇐

    Регистрация:
    17.01.2011
    Сообщения:
    7 813
    Симпатии:
    771
    Пол:
    Мужской
    А поискать файл default_images.php в папке твой_шаблон/html/com_virtuemart
     
  10. Offline

    gabb3r Недавно здесь

    Регистрация:
    06.08.2014
    Сообщения:
    5
    Симпатии:
    0
    Пол:
    Мужской
    <?php
    /**
    *
    * Show the product details page
    *
    * @package VirtueMart
    * @subpackage
    * @author Max Milbers, Valerie Isaksen

    * @link http://www.virtuemart.net
    * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
    * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
    * VirtueMart is free software. This version may have been modified pursuant
    * to the GNU General Public License, and as distributed it includes or
    * is derivative of works licensed under the GNU General Public License or
    * other free or open source software licenses.
    * @version $Id: default_images.php 5406 2012-02-09 12:22:33Z alatak $
    */
    // Check to ensure this file is included in Joomla!
    defined('_JEXEC') or die('Restricted access');

    ?>
    <?php
    // Showing The Additional Images
    // if(!empty($this->product->images) && count($this->product->images)>1) {
    if (!empty($this->product->images)) {
    ?>
    <?php
    if (count($this->product->images) <= 2) {
    $css_class='none';
    } else {
    $css_class='';
    }
    ?>
    <div id="products_example">
    <div id="products" class="<?php echo $css_class; ?>">
    <div class="slides_container">
    <?php
    // List all Images
    if (count($this->product->images) > 0) {
    foreach ($this->product->images as $image) {
    echo '<div class="slide">' . $image->displayMediaThumb('class="productimage"', true,'class="jqzoom modal"', true, true) . '</div>'; //'class="modal"'
    }
    }
    ?>
    </div>
    <?php
    if (count($this->product->images) >= 2) { ?>
    <ul id="carousel" class="pagination jcarousel-skin-tango">
    <?php
    // List all Images
    if (count($this->product->images) > 0) {
    foreach ($this->product->images as $image) {
    echo '<li>' . $image->displayMediaThumb('class="productimage"', true, true, true) . '</li>'; //'class="modal"'
    }
    }
    ?>
    </ul>
    <?php } else { ?>
    <ul class="pagination2">
    <?php
    // List all Images
    if (count($this->product->images) > 0) {
    foreach ($this->product->images as $image) {
    echo '<li>' . $image->displayMediaThumb('class="productimage2"', false, true, true) . '</li>'; //'class="modal"'
    }
    }
    ?>
    </ul>
    <?php } ?>
    </div>
    </div>
    <?php
    } // Showing The Additional Images END ?>
     
  11. OlegK
    Offline

    OlegK Russian Joomla! Team Команда форума ⇒ Профи ⇐

    Регистрация:
    17.01.2011
    Сообщения:
    7 813
    Симпатии:
    771
    Пол:
    Мужской
    array_shift в помощь .и еще проверь в default.php такой же код. Замени на мой код
    Код (CODE):
    1. // List all Images
    2. if (count($this->product->images) > 0) {
    3. $del_main_image = array_shift($this->product->images);
    4. foreach ($this->product->images as $image)
     

Поделиться этой страницей

Загрузка...