Перейти к содержимому


MagicZoom фото в карточке товара

MagicZoom карточка товара

  • Вы не можете ответить в тему
Сообщений в теме: 4

#1 fl3x

    Пользователь

  • Download User
  • PipPip
  • 12 сообщений
Репутация: 4
Начинающий
  • ГородMoscow

Отправлено 03 July 2012 - 03:26 PM

симпатичный вывод фотографий
у меня выглядит вот так

в корень сайта заливаем арфив

дале в настройках фотографмй ставим
Максимальный размер фотографий для подробного описания "400"
Максимальный размер фотографий в полную величину "0"

далее в файле:
core/tpl/user/шаблон/head.tpl.html
вставляем:
{literal}<link type="text/css" rel="stylesheet" href="magiczoom/magiczoom.css"/>
<script type="text/javascript" src="magiczoom/magiczoom.js"></script>{/literal}

в файле:
core/tpl/user/шаблон/product_detailed.tpl.html
находим код:
{if $product_info.thumbnail}
			{if $product_info.big_picture} <a href="data/big/{$product_info.big_picture}" class="highslide" onclick="return hs.expand(this)"><img src="data/medium/{$product_info.thumbnail}" alt="{$product_info.name}" id="{$product_info.big_picture}"></a>{*
			<div class="fil"></div>
			<a href="data/big/{$product_info.big_picture}" onclick="return hs.expand(this,{literal}{{/literal}thumbnailId: '{$product_info.big_picture}'{literal}}{/literal})" class="cl9">{$smarty.const.ENLARGE_PICTURE}</a> *}
			{else} <img src="data/medium/{$product_info.thumbnail}" alt="{$product_info.name}"> {/if}
			{elseif $product_info.picture}
			{if $product_info.big_picture} <a href="data/big/{$product_info.big_picture}" class="highslide" onclick="return hs.expand(this)"><img src="data/small/{$product_info.picture}" alt="{$product_info.name}" id="{$product_info.big_picture}"></a>{*
			<div class="fil"></div>
			<a href="data/big/{$product_info.big_picture}" onclick="return hs.expand(this,{literal}{{/literal}thumbnailId: '{$product_info.big_picture}'{literal}}{/literal})" class="cl9">{$smarty.const.ENLARGE_PICTURE}</a> *}
			{else} <img src="data/small/{$product_info.picture}" alt="{$product_info.name}"> {/if}
			{else}
			{if $smarty.const.CONF_DISPLAY_NOPHOTO eq 1} <img src="data/empty.gif" alt="no photo"> {/if}
			{/if}
			{if $all_product_pictures}
			{section name=i loop=$all_product_pictures}
			<div class="fil"></div>
			{if $all_product_pictures[i].enlarged} <a href="data/big/{$all_product_pictures[i].enlarged}" class="highslide" onclick="return hs.expand(this)"><img src="data/small/{$all_product_pictures[i].filename}" alt="{$product_info.name}" id="{$all_product_pictures[i].enlarged}"></a>{*
			<div class="fil"></div>
			<a href="data/big/{$all_product_pictures[i].enlarged}" onclick="return hs.expand(this,{literal}{{/literal}thumbnailId: '{$all_product_pictures[i].enlarged}'{literal}}{/literal})" class="cl9">{$smarty.const.ENLARGE_PICTURE}</a> *}
			{else} <img src="data/small/{$all_product_pictures[i].filename}" alt="{$product_info.name}"> {/if}
			{/section}
			{/if}


и заменяем его на
{if $product_info.thumbnail}
			{if $product_info.big_picture} <a href="data/big/{$product_info.big_picture}" class="MagicZoom" id="bike"   rel=" zoom-width:493px; zoom-height:265px "><img src="data/medium/{$product_info.thumbnail}"></a>{/if}
			<div class="fil"></div>
<a href="data/big/{$product_info.big_picture}" rel="zoom-id:bike" rev="data/medium/{$product_info.thumbnail}"><img src="data/small/{$product_info.thumbnail}" style="width:131px"></a>
			{if $all_product_pictures}
			{section name=i loop=$all_product_pictures}
<a href="data/big/{$all_product_pictures[i].enlarged}" rel="zoom-id:bike" rev="data/medium/{$all_product_pictures[i].enlarged}"><img src="data/small/{$all_product_pictures[i].enlarged}" style="width:131px"></a>&nbsp{/section}{/if}
{/if}

в этой строчке ставим размеры окошка увеличения
rel=" zoom-width:493px; zoom-height:265px "



Готово)

Прикрепленные файлы

  • Прикрепленный файл  magiczoom.zip   29.57К   23 Количество загрузок:

  • 3

#2 fl3x

    Пользователь

  • Download User
  • PipPip
  • 12 сообщений
Репутация: 4
Начинающий
  • ГородMoscow

Отправлено 31 July 2012 - 04:41 PM

изменил немного, добавилось анимированное переключение между дополнительными фото
  • 1

#3 inokewm

    Новичок

  • Download User
  • Pip
  • 1 сообщений
Репутация: 0
Начинающий

Отправлено 05 August 2012 - 09:22 PM

Спасибо, только у меня проблема. Все установил, добавил товар, жму на фото в низу, и появляется надпись Загрузка и все. Фото не отображается. http://swiss-timer.ru/product_6.html
  • 0

#4 fl3x

    Пользователь

  • Download User
  • PipPip
  • 12 сообщений
Репутация: 4
Начинающий
  • ГородMoscow

Отправлено 06 August 2012 - 05:31 PM

inokewm,

у вас класс не тот стоит, сейчас у вас стоит:
class="highslide"
а нужно поставить для основной фото
class="MagicZoom" id="bike"
и для дополнительных
rel="zoom-id:bike"
так же нужно убрать
onclick="[url=""]return hs.expand(this)[/url]
посмотрите внимательнее на пример:
{if $product_info.thumbnail}
						{if $product_info.big_picture} <a href="data/big/{$product_info.big_picture}" class="MagicZoom" id="bike"   rel=" zoom-width:493px; zoom-height:265px "><img src="data/medium/{$product_info.thumbnail}"></a>{/if}
						<div class="fil"></div>
<a href="data/big/{$product_info.big_picture}" rel="zoom-id:bike" rev="data/medium/{$product_info.thumbnail}"><img src="data/small/{$product_info.thumbnail}" style="width:131px"></a>
						{if $all_product_pictures}
						{section name=i loop=$all_product_pictures}
<a href="data/big/{$all_product_pictures[i].enlarged}" rel="zoom-id:bike" rev="data/medium/{$all_product_pictures[i].enlarged}"><img src="data/small/{$all_product_pictures[i].enlarged}" style="width:131px"></a>&nbsp{/section}{/if}
{/if}

  • 0

#5 amigo_r

    Новичок

  • Assistent vsupport.club
  • Pip
  • 3 сообщений
Репутация: 0
Начинающий

Отправлено 08 August 2012 - 03:16 PM

А есть у кого magicthumb не фрии, а полная версия? буду очень благодарен!
  • 0