I
I
Ilya Nekrasov2019-07-28 19:35:40
PHP
Ilya Nekrasov, 2019-07-28 19:35:40

How to remove duplicate image?

Hello uv. forum users. In general, such a problem. I do not know how to remove the image repeated twice when pressing the "PHOTO GALLERY" button? Link to the site: https://selldis.ru/catalog/_senses_executive/
And the template code itself..

<a href="/{local_catalog_group_image_big_src}" onclick="return false" rel="prettyPhoto[images]"  style="text-decoration: none; background-color: #008080; color: #fff; font-family: Arial, Helvetica, sans-serif; font-size: 19px; text-align: left; padding: 10px 60px 10px 20px; text-transform: uppercase; margin: 20px;">Фото галерея</a>

Whole template code
<br><br>
<div class="b-seria-page">
<table width="100%"><tr valign="top"><td>
<h2 style="font-weight: normal; font-size: 30px; padding: 5px 20px 5px 20px; margin-bottom:0px; margin-bottom:10px; position: relative;">{local_catalog_group_name}</h2>
<%if (isset($local_catalog_group_image_src)&&$local_catalog_group_image_src!='')%>
<div style="border: none;">
<%if (!empty($local_catalog_group_comment))%><div style="position: absolute; top: 133px; right: 554px; background: #ed1a3e; color:#fff; padding: 3px; text-decoration:none; font-size:20px; font-weight: bold;">{local_catalog_group_comment}</div><%/if%>
<a href="/{local_catalog_group_image_big_src}" rel="prettyPhoto[images]"><img src="/{local_catalog_group_image_src}" width="{local_catalog_group_image_width}" height="{local_catalog_group_image_height}" alt="{local_catalog_group_name}" rel="1" style="margin: 4px; cursor: pointer;" id="catalogImg"></a>
<a href="/{local_catalog_group_image_big_src}" onclick="return false" rel="prettyPhoto[images]"  style="text-decoration: none; background-color: #008080; color: #fff; font-family: Arial, Helvetica, sans-serif; font-size: 19px; text-align: left; padding: 10px 60px 10px 20px; text-transform: uppercase; margin: 20px;">Фото галерея</a>
</div>
<br>
{local_image_list}
<script type="text/javascript" charset="utf-8">
    $(document).ready(function(){
      $("a[rel^='prettyPhoto']").prettyPhoto({
      overlay_gallery:false,
      show_title: false,
      social_tools:'',
      deeplinking:false
      });
    });
</script>
<%/if%>
<br />
{local_materials}
</td><td style="padding-left: 25px; padding-top: 60px" width="100%">
  <div class="like-link-form">
    Описание
  </div>


<%if (!empty($local_catalog_group_description))%>
  <div style="background: #f2f2f2; padding: 20px; padding-bottom: 60px; position: relative;">
  <span>{local_catalog_group_description}</span>
  <%if ($local_catalog_group_sum>0)%>
    <div style="position: absolute; color:#717171; font-size:18px; bottom: 20px; right:20px; text-align: right; font-weight: bold;">
       Цена стандартной комплектации: <span style="font-size:18px; color:#ed1a3e;">{local_catalog_group_sum} руб.</span><br />
      <%if ($local_catalog_discont>0)%>
        <span style="font-size:18px; color:#717171; text-decoration: line-through;">{local_catalog_group_old_sum} руб.</span>
      <%/if%>
    </div>
  <%/if%>
  </div><div>
<%/if%>
                <br>
                <div style="float: left;">
                    <a href="javascript:void(0);" class="down-price-button js-price-click-event">{global_oo_price_down_title}</a><br><br>
                </div>

                <div align="right">
                <a href="javascript:void(0);" class="one-click-button js-click-event">{global_oo_buy_one_click_title}</a><br><br>
                </div>

        <div style="" class="like-box-form js-like-box">
          {global_oo_buy_one_click}
          <br><br>
          <div id="like-form-message" align="left"></div>
          <form method="POST" id="like-form" onsubmit="formsubmit(); return false;">
            <input name="name" value="" type="text" class="textfield" placeholder="Ваше имя"><br>
            <input name="phone" value="" type="text" class="textfield" placeholder="Телефон *"><br>
            <input name="email" value="" type="text" class="textfield" placeholder="Эл. почта"><br>
            <textarea name="text" rows="10" class="textarea" placeholder="Комментарий"></textarea><br>
            <input type="hidden" name="collect" value="{local_catalog_group_name}">
            <input type="hidden" name="collect_uid" value="{local_catalog_group_uid}">

            <span id="like-form-loader"></span><input type="hidden" name="send"><input name="submit" type="submit" value="Отправить" style="">
          </form></div>

                <div style="" class="like-box-form js-price-down-box">
                    {global_oo_price_down}
                    <br><br>
                    <div id="price-down-message" align="left"></div>
                    <form method="POST" enctype="multipart/form-data" id="price-down-form">
                        <input name="name" value="" type="text" class="textfield" placeholder="Ваше имя"><br>
                        <input name="phone" value="" type="text" class="textfield" placeholder="Телефон *"><br>
                        <input name="email" value="" type="text" class="textfield" placeholder="Эл. почта *"><br>
                        <div style="text-align: center; position: relative; overflow: hidden; width: 468px; height: 29px; margin-bottom: 10px; cursor: pointer;">
                            <div style="background: #fff; border: 1px solid #bbbbbb; cursor: pointer; width: 342px; height: 22px; text-align: left; padding: 5px 0 0 10px;"><div
                                        style="width: 340px; overflow: hidden;"><div style="width: 1000px; cursor: pointer; color: #acacac; font-family: Tahoma, Geneva, sans-serif; font-size: 14px;" id="file-name">Прикрепить файл *</div></div></div>
                            <input value="ОБЗОР" type="button" style="position: absolute; right: 0; top: 0; padding: 7px 35px; border: 0; color: #fff; background-color: #008080;">
                            <input type="file" name="addfile" id="file" style="cursor: pointer; margin-top: -50px; margin-left:-410px; -moz-opacity: 0; filter: alpha(opacity=0); opacity: 0; font-size: 150px; height: 100px; ">
                        </div>
                        <textarea name="text" rows="10" class="textarea" placeholder="Комментарий"></textarea><br>
                        <input type="hidden" name="collect" value="{local_catalog_group_name}">
                        <input type="hidden" name="collect_uid" value="{local_catalog_group_uid}">

                        <span id="price-down-loader"></span><input type="hidden" name="send"><input name="submit" type="submit" value="Отправить" style="background-color: #008080;">
                    </form></div>


<span>{local_catalog_group_text}</span>

</div>
</td></tr></table>
</div>

<%if (!empty($local_catalog_group_text3))%>
<div style="padding: 20px; background: url(/images/advice-bg.png) left 0 repeat-y #f2f2f2; margin:30px 0; padding-left:218px; border-right:6px solid #f20e38; position: relative; min-height:45px;">{local_catalog_group_text3}<div style="position:absolute; width: 105px; left: 47px; top: 50%; font-size: 22px; margin-top:-29px;" align="center">СОВЕТ НА<br>ЗАМЕТКУ</div></div>
<%/if%>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Gennady S, 2019-07-28
@Suzumi

In the code, there is simply a link to the same image twice, on the image itself and on the "Photo gallery" heading, which falls under the engine filter: $("a[rel^='prettyPhoto']") , prettyPhoto selects all images for the given gallery in the gallery criterion. Either set a different header image or remove rel="prettyPhoto[images]" by manually opening the gallery ( $.prettyPhoto.open , I guess).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question