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


Перенос Кнопки "в Корзину"


  • Авторизуйтесь для ответа в теме
Сообщений в теме: 75

#1 Ильяc

Ильяc

    Активный участник

  • Пользователи
  • PipPipPipPip
  • 563 сообщений

Отправлено 02 Апрель 2016 - 10:54

SL-251638 Здравствуйте! Можно перенести кнопку "В корзину" с верхней части, в саму карточку на главной странице? См. фото
кнопка.png

#2 RedHead

RedHead

    Активный участник

  • Модераторы
  • 1 052 сообщений

Отправлено 03 Апрель 2016 - 10:39

 Ильяc (02 Апрель 2016 - 10:54) писал:

SL-251638 Здравствуйте! Можно перенести кнопку "В корзину" с верхней части, в саму карточку на главной странице? См. фото
кнопка.png

Здравствуйте. На данном аккаунте кнопка "в корзину" уже расположена, как Вы указываете. Правильно ли я понимаю, что вопрос уже не актуален?

#3 Ильяc

Ильяc

    Активный участник

  • Пользователи
  • PipPipPipPip
  • 563 сообщений

Отправлено 11 Апрель 2016 - 19:58

Да все сделали, спасибо!

#4 Ильяc

Ильяc

    Активный участник

  • Пользователи
  • PipPipPipPip
  • 563 сообщений

Отправлено 11 Апрель 2016 - 20:22

Подскажите как сделать кнопки желтыми?
кнопки.png

#5 RedHead

RedHead

    Активный участник

  • Модераторы
  • 1 052 сообщений

Отправлено 11 Апрель 2016 - 20:32

 Ильяc (11 Апрель 2016 - 20:22) писал:

Подскажите как сделать кнопки желтыми?
кнопки.png

Здравствуйте. В шаблоне main.css  найдите строку:

.ajax-buttons .button {margin:0 0 10px 0; background: ffdb4d;}
замените ее на:
.ajax-buttons .button {margin:0 0 10px 0; background: #ffdb4d; border: 1px solid #cbad33;}
.ajax-buttons .button:hover {background: #ff5f1f;color:#fff;}

1.jpg

#6 Ильяc

Ильяc

    Активный участник

  • Пользователи
  • PipPipPipPip
  • 563 сообщений

Отправлено 11 Апрель 2016 - 20:35

 RedHead (11 Апрель 2016 - 20:32) писал:

Здравствуйте. В шаблоне main.css  найдите строку:

.ajax-buttons .button {margin:0 0 10px 0; background: ffdb4d;}
замените ее на:
.ajax-buttons .button {margin:0 0 10px 0; background: #ffdb4d; border: 1px solid #cbad33;}
.ajax-buttons .button:hover {background: #ff5f1f;color:#fff;}

1.jpg

А теперь можно еще в корзине 2 кнопки поменять на  такой цвет?
кнопка в корзине.png

#7 RedHead

RedHead

    Активный участник

  • Модераторы
  • 1 052 сообщений

Отправлено 11 Апрель 2016 - 20:45

 Ильяc (11 Апрель 2016 - 20:35) писал:

А теперь можно еще в корзине 2 кнопки поменять на  такой цвет?
кнопка в корзине.png

В шаблоне main.css найдите строки:

.ajax-buttons .button {margin:0 0 10px 0; background: #ffdb4d; border: 1px solid #cbad33;}
.ajax-buttons .button:hover {background: #ff5f1f;color:#fff;}

замените их на:

.ajax-buttons .button, .buttons .left a, .buttons .right a {margin:0 0 10px 0; background: #ffdb4d; border: 1px solid #cbad33;}
.ajax-buttons .button:hover, .buttons .left a:hover, .buttons .right a:hover {background: #ff5f1f;color:#fff;}


#8 Ильяc

Ильяc

    Активный участник

  • Пользователи
  • PipPipPipPip
  • 563 сообщений

Отправлено 12 Апрель 2016 - 16:57

Слайд можно немного меньше сделать по длине? Что бы с блоком отображения товаров равнялся?
слайд.png

#9 RedHead

RedHead

    Активный участник

  • Модераторы
  • 1 052 сообщений

Отправлено 12 Апрель 2016 - 17:40

 Ильяc (12 Апрель 2016 - 16:57) писал:

Слайд можно немного меньше сделать по длине? Что бы с блоком отображения товаров равнялся?
слайд.png

Здравствуйте! На данный момент у Вас слайдер скрыт. Если Вы имеете ввиду, уменьшить его размеры, то в шаблоне html найдите строку:

<div id="slideshow" class="wrap" style="display:none;"/>
замените ее на:
<div id="slideshow" class="wrap" />

Затем, в шаблоне main.js найдите строку:

jssor_slider1.$SetScaleWidth(Math.min(bodyWidth, 1920));
замените ее на:
jssor_slider1.$SetScaleWidth(Math.min(bodyWidth, 1170));

Результат:

1.jpg

#10 Ильяc

Ильяc

    Активный участник

  • Пользователи
  • PipPipPipPip
  • 563 сообщений

Отправлено 12 Апрель 2016 - 17:55

 RedHead (12 Апрель 2016 - 17:40) писал:

Здравствуйте! На данный момент у Вас слайдер скрыт. Если Вы имеете ввиду, уменьшить его размеры, то в шаблоне html найдите строку:

<div id="slideshow" class="wrap" style="display:none;"/>
замените ее на:
<div id="slideshow" class="wrap" />

Затем, в шаблоне main.js найдите строку:

jssor_slider1.$SetScaleWidth(Math.min(bodyWidth, 1920));
замените ее на:
jssor_slider1.$SetScaleWidth(Math.min(bodyWidth, 1170));

Результат:

1.jpg

Отлично! Спасибо, то что нужно. Еще можно исправить функцию "показать еще" сейчас сразу все товары видны когда открываешь главную страницу, можно сделать по умолчанию, чтобы часть была скрыта и раскрывалась при нажатии на кнопку "показать еще"

#11 RedHead

RedHead

    Активный участник

  • Модераторы
  • 1 052 сообщений

Отправлено 12 Апрель 2016 - 18:53

 Ильяc (12 Апрель 2016 - 17:55) писал:

Отлично! Спасибо, то что нужно. Еще можно исправить функцию "показать еще" сейчас сразу все товары видны когда открываешь главную страницу, можно сделать по умолчанию, чтобы часть была скрыта и раскрывалась при нажатии на кнопку "показать еще"

Внесли Вам небольшие правки для слайдера в шаблоне main.css: строки:

#slider {position: relative; margin: 0 auto;top: 0px; left: 0px; width: 1170px; height: 347px; overflow: hidden;z-index:1;}
.slides_container {cursor: move; position: absolute; left: 0px; top: 0px; width: 1170px;height: 347px; overflow: hidden;}

изменили размер слайдера, чтобы он при перезагрузке страницы оставался с нужными размерами.

На вопрос о функции "показать еще" , Вам ответят чуть позже.

#12 Ильяc

Ильяc

    Активный участник

  • Пользователи
  • PipPipPipPip
  • 563 сообщений

Отправлено 12 Апрель 2016 - 19:20

 RedHead (12 Апрель 2016 - 18:53) писал:

Внесли Вам небольшие правки для слайдера в шаблоне main.css: строки:

#slider {position: relative; margin: 0 auto;top: 0px; left: 0px; width: 1170px; height: 347px; overflow: hidden;z-index:1;}
.slides_container {cursor: move; position: absolute; left: 0px; top: 0px; width: 1170px;height: 347px; overflow: hidden;}

изменили размер слайдера, чтобы он при перезагрузке страницы оставался с нужными размерами.

На вопрос о функции "показать еще" , Вам ответят чуть позже.

Спасибо большое! А я думал что так и должно быть)

#13 Ильяc

Ильяc

    Активный участник

  • Пользователи
  • PipPipPipPip
  • 563 сообщений

Отправлено 15 Апрель 2016 - 16:36

Добрый день! Скажите можно сделать автоматическую отсылку письма, когда в статусе заказа указываешь "Доставлено"? Письмо с просьбой оставить отзыв на маркете

#14 Firefly

Firefly

    Активный участник

  • Модераторы
  • 3 810 сообщений

Отправлено 15 Апрель 2016 - 18:15

 Ильяc (15 Апрель 2016 - 16:36) писал:

Добрый день! Скажите можно сделать автоматическую отсылку письма, когда в статусе заказа указываешь "Доставлено"? Письмо с просьбой оставить отзыв на маркете

Здравствуйте.
К сожалению сделать отдельную функцию по отправке почты не получится.
Как вариант, Вы можете использовать один из статусов смс оповещения (например, Согласовано) и внести свой текст в шаблон смс, после изменения статуса на "Доставлено" Вам нужно будет изменить статус на "Согласовано" и клиенту отправится смс сообщение с просьбой оставить отзыв на Яндекс маркете.

#15 Ильяc

Ильяc

    Активный участник

  • Пользователи
  • PipPipPipPip
  • 563 сообщений

Отправлено 16 Апрель 2016 - 10:21

 RedHead (12 Апрель 2016 - 18:53) писал:

Внесли Вам небольшие правки для слайдера в шаблоне main.css: строки:

#slider {position: relative; margin: 0 auto;top: 0px; left: 0px; width: 1170px; height: 347px; overflow: hidden;z-index:1;}
.slides_container {cursor: move; position: absolute; left: 0px; top: 0px; width: 1170px;height: 347px; overflow: hidden;}

изменили размер слайдера, чтобы он при перезагрузке страницы оставался с нужными размерами.

На вопрос о функции "показать еще" , Вам ответят чуть позже.

Добрый день! Мне все еще не ответили по данному вопросу

#16 RedHead

RedHead

    Активный участник

  • Модераторы
  • 1 052 сообщений

Отправлено 16 Апрель 2016 - 15:07

 Ильяc (16 Апрель 2016 - 10:21) писал:

Добрый день! Мне все еще не ответили по данному вопросу

Здравствуйте. Извините за долгое ожидание. Перед внесением изменений, создайте бэкап шаблона.

1) В шаблоне main.css найдите строки:

.item.item-animate.show-addtocart:nth-child(1), .item.item-animate.show-addtocart:nth-child(2), .item.item-animate.show-addtocart:nth-child(3), .item.item-animate.show-addtocart:nth-child(4),
.item.item-animate.show-addtocart:nth-child(5), .item.item-animate.show-addtocart:nth-child(6), .item.item-animate.show-addtocart:nth-child(7), .item.item-animate.show-addtocart:nth-child(8),
.item.item-animate.show-addtocart:nth-child(9), .item.item-animate.show-addtocart:nth-child(10), .item.item-animate.show-addtocart:nth-child(11), .item.item-animate.show-addtocart:nth-child(12),
.item.item-animate.show-addtocart:nth-child(13), .item.item-animate.show-addtocart:nth-child(14), .item.item-animate.show-addtocart:nth-child(15), .item.item-animate.show-addtocart:nth-child(16),
.item.item-animate.show-addtocart:nth-child(17), .item.item-animate.show-addtocart:nth-child(18), .item.item-animate.show-addtocart:nth-child(19), .item.item-animate.show-addtocart:nth-child(20) {display:block;}

замените их на:

.item.item-animate.show-addtocart:nth-child(1), .item.item-animate.show-addtocart:nth-child(2), .item.item-animate.show-addtocart:nth-child(3), .item.item-animate.show-addtocart:nth-child(4),
.item.item-animate.show-addtocart:nth-child(5), .item.item-animate.show-addtocart:nth-child(6), .item.item-animate.show-addtocart:nth-child(7), .item.item-animate.show-addtocart:nth-child(8) {display:block;}

2) В шаблоне main.js найдите строки:

//Функция показать больше для Товаров на главной
$(function(){
  var i = 0;
  $('.pdt_best_sales .item.item-animate.show-addtocart').each(function(){
	i++;
  })
  if(i<=20){$('.pdt_best_sales .showAllGoods').hide()}
	$('.pdt_best_sales .showAllGoods').on('click',function(){
  if($(this).hasClass('active')){
	$(this).removeClass('active');
	$('.pdt_best_sales .item.item-animate.show-addtocart').removeClass('showThis');  
	$(this).text('Показать все');
  }else{
	$('.pdt_best_sales .item.item-animate.show-addtocart').addClass('showThis');
	$(this).text('Скрыть');
	$(this).addClass('active');
  }
})
});
//Функция показать больше для Новинок
$(function(){
  var i = 0;
  $('.pdt_created_at .item.item-animate.show-addtocart').each(function(){
	i++;
  })
  if(i<=8){$('.pdt_created_at .showAllGoods').hide()}
	$('.pdt_created_at .showAllGoods').on('click',function(){
  if($(this).hasClass('active')){
	$(this).removeClass('active');
	$('.pdt_created_at .item.item-animate.show-addtocart').removeClass('showThis');  
	$(this).text('Показать все');
  }else{
	$('.pdt_created_at .item.item-animate.show-addtocart').addClass('showThis');
	$(this).text('Скрыть');
	$(this).addClass('active');
  }
})
});
//Функция показать больше для Хитов продаж
$(function(){
  var i = 0;
  $('.pdt_top_rating .item.item-animate.show-addtocart').each(function(){
	i++;
  })
  if(i<=8){$('.pdt_top_rating .showAllGoods').hide()}
	$('.pdt_top_rating .showAllGoods').on('click',function(){
  if($(this).hasClass('active')){
	$(this).removeClass('active');
	$('.pdt_top_rating .item.item-animate.show-addtocart').removeClass('showThis');  
	$(this).text('Показать все');
  }else{
	$('.pdt_top_rating .item.item-animate.show-addtocart').addClass('showThis');
	$(this).text('Скрыть');
	$(this).addClass('active');
  }
})
});

замените их на:

//Функция показать больше для Товаров на главной
$(function(){
  var i = 0;
  $('.pdt_best_sales .item.item-animate.show-addtocart').each(function(){
	i++;
  })
  if(i<=8){$('.pdt_best_sales .showAllGoods').hide()}
	$('.pdt_best_sales .showAllGoods').on('click',function(){
  if($(this).hasClass('active')){
	$(this).removeClass('active');
	$('.pdt_best_sales .item.item-animate.show-addtocart').removeClass('showThis');  
	$(this).text('Показать еще');
	$(this).attr('title', 'Показать еще');
  }else{
	$('.pdt_best_sales .item.item-animate.show-addtocart').addClass('showThis');
	$(this).addClass('active');
	$(this).text('Скрыть');
	$(this).attr('title', 'Скрыть');
  }
})
});
//Функция показать больше для Новинок
$(function(){
  var i = 0;
  $('.pdt_created_at .item.item-animate.show-addtocart').each(function(){
	i++;
  })
  if(i<=8){$('.pdt_created_at .showAllGoods').hide()}
	$('.pdt_created_at .showAllGoods').on('click',function(){
  if($(this).hasClass('active')){
	$(this).removeClass('active');
	$('.pdt_created_at .item.item-animate.show-addtocart').removeClass('showThis');  
	$(this).text('Загрузить все');
	$(this).attr('title', 'Загрузить все');
  }else{
	$('.pdt_created_at .item.item-animate.show-addtocart').addClass('showThis');
	$(this).addClass('active');
	$(this).text('Скрыть');
	$(this).attr('title', 'Скрыть');
  }
})
});
//Функция показать больше для Хитов продаж
$(function(){
  var i = 0;
  $('.pdt_top_rating .item.item-animate.show-addtocart').each(function(){
	i++;
  })
  if(i<=8){$('.pdt_top_rating .showAllGoods').hide()}
	$('.pdt_top_rating .showAllGoods').on('click',function(){
  if($(this).hasClass('active')){
	$(this).removeClass('active');
	$('.pdt_top_rating .item.item-animate.show-addtocart').removeClass('showThis');  
	$(this).text('Загрузить все');
	$(this).attr('title', 'Загрузить все');
  }else{
	$('.pdt_top_rating .item.item-animate.show-addtocart').addClass('showThis');
	$(this).addClass('active');
	$(this).text('Скрыть');
	$(this).attr('title', 'Скрыть');
  }
})
});

3) Теперь, в шаблоне html найдите блок кода:

{% IFNOT index_page_goods_empty %}
					  <div class="pdt-content tab-content-actived is-loaded pdt_best_sales">
						<div class="pdt-list products-grid zoomOut play">
						  <div class="inner">
							{% FOR index_page_goods %}
									<form action="{CART_ADD_GOODS_MODIFICATION_URL | url_amp}" method="post" class="product-form-{index_page_goods.MIN_PRICE_NOW_ID} goodsListForm">
							<div class="item item-animate show-addtocart col-xs-3 col-lg-4 col-md-6 col-sm-12 {% IF index_page_goods.index> 8 %}load-animate{% ENDIF %}"  itemscope itemtype="http://schema.org/Product">
							  <div class="item-inner clearfix">
								<div class="item-img have-additional clearfix">


									<input type="hidden" name="hash" value="{HASH}" />
									<input type="hidden" name="form[goods_from]" value="{index_page_goods.GOODS_FROM}" />
									<input type="hidden" name="form[goods_mod_id]" value="{index_page_goods.MIN_PRICE_NOW_ID}" />
									{% IF index_page_goods.IS_NEW %}
									  <span class="ico-product new">Новинка</span>
									{% ELSEIF index_page_goods.IS_TOP %}
									  <span class="ico-product best">Популярное</span>

									{% ENDIF %}
									{% IF index_page_goods.MAX_DISCOUNT %}
									  <span class="ico-product sale">Скидка</span>
									{% ENDIF %}

замените его на:

 {% IFNOT index_page_goods_empty %}
					  <div class="pdt-content tab-content-actived is-loaded pdt_best_sales">
						<div class="pdt-list products-grid zoomOut play">
						  <div class="inner">
							{% FOR index_page_goods %}
							<div class="item item-animate show-addtocart col-xs-3 col-lg-4 col-md-6 col-sm-12 {% IF index_page_goods.index> 8 %}load-animate{% ENDIF %}"  itemscope itemtype="http://schema.org/Product">
							  <div class="item-inner clearfix">
								<div class="item-img have-additional clearfix">
									{% IF index_page_goods.IS_NEW %}
									  <span class="ico-product new">Новинка</span>
									{% ELSEIF index_page_goods.IS_TOP %}
									  <span class="ico-product best">Популярное</span>
									{% ENDIF %}
									{% IF index_page_goods.MAX_DISCOUNT %}
									  <span class="ico-product sale">Скидка</span>
									{% ENDIF %}
									<div class="item-img-info">
									  <a href="{index_page_goods.URL_MIN_PRICE_NOW | url_amp}" title="{index_page_goods.NAME}" class="product-image">
										<span class="img-main">
										  <img src="{% IF index_page_goods.IMAGE_EMPTY %}{ASSETS_IMAGES_PATH}no-photo-small.png?design=azure{% ELSE %}{index_page_goods.IMAGE_MEDIUM}{% ENDIF %}" class="goods-image-small" alt="{index_page_goods.NAME}">
										</span>
									  </a>

Затем, найдите строки:

 </form>
							{% ENDFOR %}
							<div class="pdt-loadmore">
							  <div class="button btn-loadmore showAllGoods"><span>Показать еще</span></div>

замените их на:

							{% ENDFOR %}
							<div class="pdt-loadmore">
							  <div class="button btn-loadmore showAllGoods"><span>Показать еще</span></div>

Затем, блок кода:

<div class="item-info">
								  <div class="info-inner">
									<div class="item-title">
									  <a href="{index_page_goods.URL_MIN_PRICE_NOW | url_amp}" title="{index_page_goods.NAME}" itemprop="name">{index_page_goods.NAME}</a>
									  <meta itemprop="description" content="{% IF index_page_goods.DESCRIPTION_SHORT %}{index_page_goods.DESCRIPTION_SHORT}{% ELSE %}Описание отсутствует{% ENDIF %}">
									</div>
									<div class="item-content">
									  <div class="item-price">
										<div class="price-box" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
										  <!-- информация для поисковика о валюте товара -->
										  <meta itemprop="priceCurrency" content="{CURRENCY_CHAR_CODE}"/>
										  {% IF index_page_goods.MIN_PRICE_NOW_WITHOUT_DISCOUNT>index_page_goods.MIN_PRICE_NOW %}
										  <p class="old-price">
											<span class="price">{index_page_goods.MIN_PRICE_NOW_WITHOUT_DISCOUNT}</span>
										  </p>
										  {% ELSEIF index_page_goods.MIN_PRICE_OLD>index_page_goods.MIN_PRICE_NOW %}
										  <p class="old-price">
											<span class="price">{index_page_goods.MIN_PRICE_OLD}</span>
										  </p>
										  {% ENDIF %} 
										  <p class="special-price">
											<span class="price" itemprop="price">{index_page_goods.MIN_PRICE_NOW}</span>
										  </p>
										</div>
									  </div>
									  <div class="rating">
										<div class="ratings">
										  <div class="spk-good-rating" shop-id="4ba156e59a2fb095321234" good-id="{index_page_goods.ID}" good-url="{index_page_goods.URL}" ></div>




										  <div class="rating-box" itemscope itemtype="http://schema.org/AggregateRating">
											{% IF index_page_goods.OPINION_RATING_VALUE %}
											  <meta itemprop="worstRating" content = "1">
											  <meta itemprop="bestRating" content = "10">
											  <meta itemprop="ratingValue" content = "{index_page_goods.OPINION_RATING_VALUE}">
											  <div class="rating" style="width:{index_page_goods.OPINION_RATING_VALUE}0%" alt="{index_page_goods.OPINION_RATING_VALUE}"></div>
											{% ELSE %}
											  <div class="rating" style="width:0%" alt="Рейтинг не определён"></div>
											{% ENDIF %}
										  </div>
										</div>
									  </div>

									  <br><br><br>
										   <div class="cart-wrap">
									  <div class="cart">
										<a id="button-cart" class="add-cart button btn-cart" {% IF index_page_goods.MAX_REST_VALUE>0 %}style="display:none;"{% ENDIF %} onclick="if($(this).text() == 'Предзаказ') { document.location = '/feedback/?form[feedback_message]=Могли бы Вы уведомить меня о наличии товара &laquo;{index_page_goods.NAME}&raquo;?' } return false;" title="Положить &laquo;{index_page_goods.NAME}&raquo; в корзину"/ >Предзаказ</a>
																				<a class="add-cart btn-cart button btn-addto" title="В корзину" {% IF SETTINGS_GOODS_DONT_PUT_TO_CART_MORE_THAN_AVAILABLE %}{% IF index_page_goods.MAX_REST_VALUE=0 %}style="display:none;"{% ENDIF %}{% ENDIF %}>В корзину</a>

									  </div>
									</div>




									</div>
								  </div>
								</div>

замените на:

<form action="{CART_ADD_GOODS_MODIFICATION_URL | url_amp}" method="post" class="product-form-{index_page_goods.MIN_PRICE_NOW_ID} goodsListForm">
									<input type="hidden" name="hash" value="{HASH}" />
									<input type="hidden" name="form[goods_from]" value="{index_page_goods.GOODS_FROM}" />
									<input type="hidden" name="form[goods_mod_id]" value="{index_page_goods.MIN_PRICE_NOW_ID}" />
								<div class="item-info">
								  <div class="info-inner">
									<div class="item-title">
									  <a href="{index_page_goods.URL_MIN_PRICE_NOW | url_amp}" title="{index_page_goods.NAME}" itemprop="name">{index_page_goods.NAME}</a>
									  <meta itemprop="description" content="{% IF index_page_goods.DESCRIPTION_SHORT %}{index_page_goods.DESCRIPTION_SHORT}{% ELSE %}Описание отсутствует{% ENDIF %}">
									</div>
									<div class="item-content">
									  <div class="item-price">
										<div class="price-box" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
										  <!-- информация для поисковика о валюте товара -->
										  <meta itemprop="priceCurrency" content="{CURRENCY_CHAR_CODE}"/>
										  {% IF index_page_goods.MIN_PRICE_NOW_WITHOUT_DISCOUNT>index_page_goods.MIN_PRICE_NOW %}
										  <p class="old-price">
											<span class="price">{index_page_goods.MIN_PRICE_NOW_WITHOUT_DISCOUNT}</span>
										  </p>
										  {% ELSEIF index_page_goods.MIN_PRICE_OLD>index_page_goods.MIN_PRICE_NOW %}
										  <p class="old-price">
											<span class="price">{index_page_goods.MIN_PRICE_OLD}</span>
										  </p>
										  {% ENDIF %}
										  <p class="special-price">
											<span class="price" itemprop="price">{index_page_goods.MIN_PRICE_NOW}</span>
										  </p>
										</div>
									  </div>
									  <div class="rating">
										<div class="ratings">
										  <div class="spk-good-rating" shop-id="4ba156e59a2fb095321234" good-id="{index_page_goods.ID}" good-url="{index_page_goods.URL}" ></div>
										  <div class="rating-box" itemscope itemtype="http://schema.org/AggregateRating">
											{% IF index_page_goods.OPINION_RATING_VALUE %}
											  <meta itemprop="worstRating" content = "1">
											  <meta itemprop="bestRating" content = "10">
											  <meta itemprop="ratingValue" content = "{index_page_goods.OPINION_RATING_VALUE}">
											  <div class="rating" style="width:{index_page_goods.OPINION_RATING_VALUE}0%" alt="{index_page_goods.OPINION_RATING_VALUE}"></div>
											{% ELSE %}
											  <div class="rating" style="width:0%" alt="Рейтинг не определён"></div>
											{% ENDIF %}
										  </div>
										</div>
									  </div>
									  <br><br><br>
										   <div class="cart-wrap">
									  <div class="cart">
										<a id="button-cart" class="add-cart button btn-cart" {% IF index_page_goods.MAX_REST_VALUE>0 %}style="display:none;"{% ENDIF %} onclick="if($(this).text() == 'Предзаказ') { document.location = '/feedback/?form[feedback_message]=Могли бы Вы уведомить меня о наличии товара &laquo;{index_page_goods.NAME}&raquo;?' } return false;" title="Положить &laquo;{index_page_goods.NAME}&raquo; в корзину"/ >Предзаказ</a>
																				<a class="add-cart btn-cart button btn-addto" title="В корзину" {% IF SETTINGS_GOODS_DONT_PUT_TO_CART_MORE_THAN_AVAILABLE %}{% IF index_page_goods.MAX_REST_VALUE=0 %}style="display:none;"{% ENDIF %}{% ENDIF %}>В корзину</a>
																			   
									  </div>
									</div>
									</div>
								  </div>
								</div>
								</form>

Товары на главной будут отображаться корректно, кнопка будет работать. Проделайте, пожалуйста, данную инструкцию. Чтобы не запутаться, для новинок и хитов выполним инструкцию в следующем письме.

#17 Ильяc

Ильяc

    Активный участник

  • Пользователи
  • PipPipPipPip
  • 563 сообщений

Отправлено 20 Апрель 2016 - 17:51

 RedHead (16 Апрель 2016 - 15:07) писал:

Здравствуйте. Извините за долгое ожидание. Перед внесением изменений, создайте бэкап шаблона.

1) В шаблоне main.css найдите строки:

.item.item-animate.show-addtocart:nth-child(1), .item.item-animate.show-addtocart:nth-child(2), .item.item-animate.show-addtocart:nth-child(3), .item.item-animate.show-addtocart:nth-child(4),
.item.item-animate.show-addtocart:nth-child(5), .item.item-animate.show-addtocart:nth-child(6), .item.item-animate.show-addtocart:nth-child(7), .item.item-animate.show-addtocart:nth-child(8),
.item.item-animate.show-addtocart:nth-child(9), .item.item-animate.show-addtocart:nth-child(10), .item.item-animate.show-addtocart:nth-child(11), .item.item-animate.show-addtocart:nth-child(12),
.item.item-animate.show-addtocart:nth-child(13), .item.item-animate.show-addtocart:nth-child(14), .item.item-animate.show-addtocart:nth-child(15), .item.item-animate.show-addtocart:nth-child(16),
.item.item-animate.show-addtocart:nth-child(17), .item.item-animate.show-addtocart:nth-child(18), .item.item-animate.show-addtocart:nth-child(19), .item.item-animate.show-addtocart:nth-child(20) {display:block;}

замените их на:

.item.item-animate.show-addtocart:nth-child(1), .item.item-animate.show-addtocart:nth-child(2), .item.item-animate.show-addtocart:nth-child(3), .item.item-animate.show-addtocart:nth-child(4),
.item.item-animate.show-addtocart:nth-child(5), .item.item-animate.show-addtocart:nth-child(6), .item.item-animate.show-addtocart:nth-child(7), .item.item-animate.show-addtocart:nth-child(8) {display:block;}

2) В шаблоне main.js найдите строки:

//Функция показать больше для Товаров на главной
$(function(){
var i = 0;
$('.pdt_best_sales .item.item-animate.show-addtocart').each(function(){
i++;
})
if(i<=20){$('.pdt_best_sales .showAllGoods').hide()}
$('.pdt_best_sales .showAllGoods').on('click',function(){
if($(this).hasClass('active')){
$(this).removeClass('active');
$('.pdt_best_sales .item.item-animate.show-addtocart').removeClass('showThis');
$(this).text('Показать все');
}else{
$('.pdt_best_sales .item.item-animate.show-addtocart').addClass('showThis');
$(this).text('Скрыть');
$(this).addClass('active');
}
})
});
//Функция показать больше для Новинок
$(function(){
var i = 0;
$('.pdt_created_at .item.item-animate.show-addtocart').each(function(){
i++;
})
if(i<=8){$('.pdt_created_at .showAllGoods').hide()}
$('.pdt_created_at .showAllGoods').on('click',function(){
if($(this).hasClass('active')){
$(this).removeClass('active');
$('.pdt_created_at .item.item-animate.show-addtocart').removeClass('showThis');
$(this).text('Показать все');
}else{
$('.pdt_created_at .item.item-animate.show-addtocart').addClass('showThis');
$(this).text('Скрыть');
$(this).addClass('active');
}
})
});
//Функция показать больше для Хитов продаж
$(function(){
var i = 0;
$('.pdt_top_rating .item.item-animate.show-addtocart').each(function(){
i++;
})
if(i<=8){$('.pdt_top_rating .showAllGoods').hide()}
$('.pdt_top_rating .showAllGoods').on('click',function(){
if($(this).hasClass('active')){
$(this).removeClass('active');
$('.pdt_top_rating .item.item-animate.show-addtocart').removeClass('showThis');
$(this).text('Показать все');
}else{
$('.pdt_top_rating .item.item-animate.show-addtocart').addClass('showThis');
$(this).text('Скрыть');
$(this).addClass('active');
}
})
});

замените их на:

//Функция показать больше для Товаров на главной
$(function(){
var i = 0;
$('.pdt_best_sales .item.item-animate.show-addtocart').each(function(){
i++;
})
if(i<=8){$('.pdt_best_sales .showAllGoods').hide()}
$('.pdt_best_sales .showAllGoods').on('click',function(){
if($(this).hasClass('active')){
$(this).removeClass('active');
$('.pdt_best_sales .item.item-animate.show-addtocart').removeClass('showThis');
$(this).text('Показать еще');
$(this).attr('title', 'Показать еще');
}else{
$('.pdt_best_sales .item.item-animate.show-addtocart').addClass('showThis');
$(this).addClass('active');
$(this).text('Скрыть');
$(this).attr('title', 'Скрыть');
}
})
});
//Функция показать больше для Новинок
$(function(){
var i = 0;
$('.pdt_created_at .item.item-animate.show-addtocart').each(function(){
i++;
})
if(i<=8){$('.pdt_created_at .showAllGoods').hide()}
$('.pdt_created_at .showAllGoods').on('click',function(){
if($(this).hasClass('active')){
$(this).removeClass('active');
$('.pdt_created_at .item.item-animate.show-addtocart').removeClass('showThis');
$(this).text('Загрузить все');
$(this).attr('title', 'Загрузить все');
}else{
$('.pdt_created_at .item.item-animate.show-addtocart').addClass('showThis');
$(this).addClass('active');
$(this).text('Скрыть');
$(this).attr('title', 'Скрыть');
}
})
});
//Функция показать больше для Хитов продаж
$(function(){
var i = 0;
$('.pdt_top_rating .item.item-animate.show-addtocart').each(function(){
i++;
})
if(i<=8){$('.pdt_top_rating .showAllGoods').hide()}
$('.pdt_top_rating .showAllGoods').on('click',function(){
if($(this).hasClass('active')){
$(this).removeClass('active');
$('.pdt_top_rating .item.item-animate.show-addtocart').removeClass('showThis');
$(this).text('Загрузить все');
$(this).attr('title', 'Загрузить все');
}else{
$('.pdt_top_rating .item.item-animate.show-addtocart').addClass('showThis');
$(this).addClass('active');
$(this).text('Скрыть');
$(this).attr('title', 'Скрыть');
}
})
});

3) Теперь, в шаблоне html найдите блок кода:

{% IFNOT index_page_goods_empty %}
<div class="pdt-content tab-content-actived is-loaded pdt_best_sales">
<div class="pdt-list products-grid zoomOut play">
<div class="inner">
{% FOR index_page_goods %}
<form action="{CART_ADD_GOODS_MODIFICATION_URL | url_amp}" method="post" class="product-form-{index_page_goods.MIN_PRICE_NOW_ID} goodsListForm">
<div class="item item-animate show-addtocart col-xs-3 col-lg-4 col-md-6 col-sm-12 {% IF index_page_goods.index> 8 %}load-animate{% ENDIF %}" itemscope itemtype="http://schema.org/Product">
<div class="item-inner clearfix">
<div class="item-img have-additional clearfix">


<input type="hidden" name="hash" value="{HASH}" />
<input type="hidden" name="form[goods_from]" value="{index_page_goods.GOODS_FROM}" />
<input type="hidden" name="form[goods_mod_id]" value="{index_page_goods.MIN_PRICE_NOW_ID}" />
{% IF index_page_goods.IS_NEW %}
<span class="ico-product new">Новинка</span>
{% ELSEIF index_page_goods.IS_TOP %}
<span class="ico-product best">Популярное</span>

{% ENDIF %}
{% IF index_page_goods.MAX_DISCOUNT %}
<span class="ico-product sale">Скидка</span>
{% ENDIF %}

замените его на:

{% IFNOT index_page_goods_empty %}
<div class="pdt-content tab-content-actived is-loaded pdt_best_sales">
<div class="pdt-list products-grid zoomOut play">
<div class="inner">
{% FOR index_page_goods %}
<div class="item item-animate show-addtocart col-xs-3 col-lg-4 col-md-6 col-sm-12 {% IF index_page_goods.index> 8 %}load-animate{% ENDIF %}" itemscope itemtype="http://schema.org/Product">
<div class="item-inner clearfix">
<div class="item-img have-additional clearfix">
{% IF index_page_goods.IS_NEW %}
<span class="ico-product new">Новинка</span>
{% ELSEIF index_page_goods.IS_TOP %}
<span class="ico-product best">Популярное</span>
{% ENDIF %}
{% IF index_page_goods.MAX_DISCOUNT %}
<span class="ico-product sale">Скидка</span>
{% ENDIF %}
<div class="item-img-info">
<a href="{index_page_goods.URL_MIN_PRICE_NOW | url_amp}" title="{index_page_goods.NAME}" class="product-image">
<span class="img-main">
<img src="{% IF index_page_goods.IMAGE_EMPTY %}{ASSETS_IMAGES_PATH}no-photo-small.png?design=azure{% ELSE %}{index_page_goods.IMAGE_MEDIUM}{% ENDIF %}" class="goods-image-small" alt="{index_page_goods.NAME}">
</span>
</a>

Затем, найдите строки:

</form>
{% ENDFOR %}
<div class="pdt-loadmore">
<div class="button btn-loadmore showAllGoods"><span>Показать еще</span></div>

замените их на:

						 {% ENDFOR %}
						 <div class="pdt-loadmore">
							 <div class="button btn-loadmore showAllGoods"><span>Показать еще</span></div>

Затем, блок кода:

<div class="item-info">
<div class="info-inner">
<div class="item-title">
<a href="{index_page_goods.URL_MIN_PRICE_NOW | url_amp}" title="{index_page_goods.NAME}" itemprop="name">{index_page_goods.NAME}</a>
<meta itemprop="description" content="{% IF index_page_goods.DESCRIPTION_SHORT %}{index_page_goods.DESCRIPTION_SHORT}{% ELSE %}Описание отсутствует{% ENDIF %}">
</div>
<div class="item-content">
<div class="item-price">
<div class="price-box" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<!-- информация для поисковика о валюте товара -->
<meta itemprop="priceCurrency" content="{CURRENCY_CHAR_CODE}"/>
{% IF index_page_goods.MIN_PRICE_NOW_WITHOUT_DISCOUNT>index_page_goods.MIN_PRICE_NOW %}
<p class="old-price">
<span class="price">{index_page_goods.MIN_PRICE_NOW_WITHOUT_DISCOUNT}</span>
</p>
{% ELSEIF index_page_goods.MIN_PRICE_OLD>index_page_goods.MIN_PRICE_NOW %}
<p class="old-price">
<span class="price">{index_page_goods.MIN_PRICE_OLD}</span>
</p>
{% ENDIF %}
<p class="special-price">
<span class="price" itemprop="price">{index_page_goods.MIN_PRICE_NOW}</span>
</p>
</div>
</div>
<div class="rating">
<div class="ratings">
<div class="spk-good-rating" shop-id="4ba156e59a2fb095321234" good-id="{index_page_goods.ID}" good-url="{index_page_goods.URL}" ></div>




<div class="rating-box" itemscope itemtype="http://schema.org/AggregateRating">
{% IF index_page_goods.OPINION_RATING_VALUE %}
<meta itemprop="worstRating" content = "1">
<meta itemprop="bestRating" content = "10">
<meta itemprop="ratingValue" content = "{index_page_goods.OPINION_RATING_VALUE}">
<div class="rating" style="width:{index_page_goods.OPINION_RATING_VALUE}0%" alt="{index_page_goods.OPINION_RATING_VALUE}"></div>
{% ELSE %}
<div class="rating" style="width:0%" alt="Рейтинг не определён"></div>
{% ENDIF %}
</div>
</div>
</div>

<br><br><br>
<div class="cart-wrap">
<div class="cart">
<a id="button-cart" class="add-cart button btn-cart" {% IF index_page_goods.MAX_REST_VALUE>0 %}style="display:none;"{% ENDIF %} onclick="if($(this).text() == 'Предзаказ') { document.location = '/feedback/?form[feedback_message]=Могли бы Вы уведомить меня о наличии товара &laquo;{index_page_goods.NAME}&raquo;?' } return false;" title="Положить &laquo;{index_page_goods.NAME}&raquo; в корзину"/ >Предзаказ</a>
<a class="add-cart btn-cart button btn-addto" title="В корзину" {% IF SETTINGS_GOODS_DONT_PUT_TO_CART_MORE_THAN_AVAILABLE %}{% IF index_page_goods.MAX_REST_VALUE=0 %}style="display:none;"{% ENDIF %}{% ENDIF %}>В корзину</a>

</div>
</div>




</div>
</div>
</div>

замените на:

<form action="{CART_ADD_GOODS_MODIFICATION_URL | url_amp}" method="post" class="product-form-{index_page_goods.MIN_PRICE_NOW_ID} goodsListForm">
								 <input type="hidden" name="hash" value="{HASH}" />
								 <input type="hidden" name="form[goods_from]" value="{index_page_goods.GOODS_FROM}" />
								 <input type="hidden" name="form[goods_mod_id]" value="{index_page_goods.MIN_PRICE_NOW_ID}" />
							 <div class="item-info">
								 <div class="info-inner">
								 <div class="item-title">
									 <a href="{index_page_goods.URL_MIN_PRICE_NOW | url_amp}" title="{index_page_goods.NAME}" itemprop="name">{index_page_goods.NAME}</a>
									 <meta itemprop="description" content="{% IF index_page_goods.DESCRIPTION_SHORT %}{index_page_goods.DESCRIPTION_SHORT}{% ELSE %}Описание отсутствует{% ENDIF %}">
								 </div>
								 <div class="item-content">
									 <div class="item-price">
									 <div class="price-box" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
										 <!-- информация для поисковика о валюте товара -->
										 <meta itemprop="priceCurrency" content="{CURRENCY_CHAR_CODE}"/>
										 {% IF index_page_goods.MIN_PRICE_NOW_WITHOUT_DISCOUNT>index_page_goods.MIN_PRICE_NOW %}
										 <p class="old-price">
										 <span class="price">{index_page_goods.MIN_PRICE_NOW_WITHOUT_DISCOUNT}</span>
										 </p>
										 {% ELSEIF index_page_goods.MIN_PRICE_OLD>index_page_goods.MIN_PRICE_NOW %}
										 <p class="old-price">
										 <span class="price">{index_page_goods.MIN_PRICE_OLD}</span>
										 </p>
										 {% ENDIF %}
										 <p class="special-price">
										 <span class="price" itemprop="price">{index_page_goods.MIN_PRICE_NOW}</span>
										 </p>
									 </div>
									 </div>
									 <div class="rating">
									 <div class="ratings">
										 <div class="spk-good-rating" shop-id="4ba156e59a2fb095321234" good-id="{index_page_goods.ID}" good-url="{index_page_goods.URL}" ></div>
										 <div class="rating-box" itemscope itemtype="http://schema.org/AggregateRating">
										 {% IF index_page_goods.OPINION_RATING_VALUE %}
											 <meta itemprop="worstRating" content = "1">
											 <meta itemprop="bestRating" content = "10">
											 <meta itemprop="ratingValue" content = "{index_page_goods.OPINION_RATING_VALUE}">
											 <div class="rating" style="width:{index_page_goods.OPINION_RATING_VALUE}0%" alt="{index_page_goods.OPINION_RATING_VALUE}"></div>
										 {% ELSE %}
											 <div class="rating" style="width:0%" alt="Рейтинг не определён"></div>
										 {% ENDIF %}
										 </div>
									 </div>
									 </div>
									 <br><br><br>
										 <div class="cart-wrap">
									 <div class="cart">
									 <a id="button-cart" class="add-cart button btn-cart" {% IF index_page_goods.MAX_REST_VALUE>0 %}style="display:none;"{% ENDIF %} onclick="if($(this).text() == 'Предзаказ') { document.location = '/feedback/?form[feedback_message]=Могли бы Вы уведомить меня о наличии товара &laquo;{index_page_goods.NAME}&raquo;?' } return false;" title="Положить &laquo;{index_page_goods.NAME}&raquo; в корзину"/ >Предзаказ</a>
																			 <a class="add-cart btn-cart button btn-addto" title="В корзину" {% IF SETTINGS_GOODS_DONT_PUT_TO_CART_MORE_THAN_AVAILABLE %}{% IF index_page_goods.MAX_REST_VALUE=0 %}style="display:none;"{% ENDIF %}{% ENDIF %}>В корзину</a>
																			
									 </div>
								 </div>
								 </div>
								 </div>
							 </div>
							 </form>

Товары на главной будут отображаться корректно, кнопка будет работать. Проделайте, пожалуйста, данную инструкцию. Чтобы не запутаться, для новинок и хитов выполним инструкцию в следующем письме.

Все сделал как написано, но сайт совсем искажается

#18 RedHead

RedHead

    Активный участник

  • Модераторы
  • 1 052 сообщений

Отправлено 20 Апрель 2016 - 18:03

 Ильяc (20 Апрель 2016 - 17:51) писал:

Все сделал как написано, но сайт совсем искажается

Здравствуйте. Вам создали бэкап от 20.04.2016 17:56:34 и произвели изменения. Инструкция была верная. Проверьте, пожалуйста.

#19 Ильяc

Ильяc

    Активный участник

  • Пользователи
  • PipPipPipPip
  • 563 сообщений

Отправлено 20 Апрель 2016 - 18:39

 RedHead (20 Апрель 2016 - 18:03) писал:

Здравствуйте. Вам создали бэкап от 20.04.2016 17:56:34 и произвели изменения. Инструкция была верная. Проверьте, пожалуйста.

Сейчас не работает снова. Я восстановил шаблон. Вы не можете сами все исправить?

#20 RedHead

RedHead

    Активный участник

  • Модераторы
  • 1 052 сообщений

Отправлено 20 Апрель 2016 - 19:07

 Ильяc (20 Апрель 2016 - 18:39) писал:

Сейчас не работает снова. Я восстановил шаблон. Вы не можете сами все исправить?

Вам были внесены изменения для товаров на главной. Они стали показываться по 8 штук на страницу. Работали кнопки "свернуть" "Развернуть" "В корзину". Уточните, пожалуйста, почему Вы откатили изменения? Где была ошибка, или что Вас не устроило?




Количество пользователей, читающих эту тему: 0

0 пользователей, 0 гостей, 0 анонимных