K
K
kolibry12016-07-21 12:24:28
PHP
kolibry1, 2016-07-21 12:24:28

What path to set for fancybox?

Good afternoon.
there is a site, on it there is a Fancy-Box image enlarger on click.
in code looks like this

<!-- Дополнительные фото продукта -->
  {if $product->images|count>1}
  <div class="images">
    {* cut удаляет первую фотографию, если нужно начать 2-й - пишем cut:2 и тд *}
    {foreach $product->images|cut as $i=>$image}
      <a href="{$image->filename|resize:1500:1500:w}" class="zoom fancybox-button" rel="gallery" data-rel="group"><img src="{$image->filename|resize:95:95}" alt="{$product->name|escape}" /></a>
    {/foreach}
                <p style="clear:both;cursor:pointer;text-decoration:underline;color:#0095eb;" onclick="location.reload()">Не открываются изображения? Нажмите для перезагрузки</p>
  </div>
  {/if}
  <!-- Дополнительные фото продукта (The End)-->

but at the same time: when you first visit the page, the address is substituted like this
ABC.RU/files/products/http%253A%252F%252Fonline.AB...
and, accordingly, the picture does not open, because the path is incorrect. If you refresh the page, then let it be correct
ABC.RU/files/products/3111-2_3.95x95.jpg?4fa41e5d2...
and the picture will open.
why is this happening? how can this be fixed?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question