Дмитрий Кондаков

Дмитрий Кондаков

С нами с 28 февраля 2013; Место в рейтинге пользователей: #231
Дмитрий Кондаков
29 ноября 2017, 10:33
1
+1
Вот таким плагином при открытии страницы товара добавляю его в корзину предварительно очистив её:
<?php
switch ($modx->event->name) {
		
	case 'OnLoadWebDocument':
	  $class = $modx->resource->get('class_key');
	  $resourceId = $modx->resource->get('id');
	  
	  if ($class == 'msProduct') {
	    $miniShop2 = $modx->getService('minishop2','miniShop2',
	      MODX_CORE_PATH . 'components/minishop2/model/minishop2/', $scriptProperties);
      
      if (!($miniShop2 instanceof miniShop2)) return '';
      
      $miniShop2->initialize($modx->context->key, $scriptProperties);
      $miniShop2->cart->clean();
      $miniShop2->cart->add($resourceId);
      
	    }
	  break;
}
далее на странице самого товара вывожу форму заказа без корзины.
Дмитрий Кондаков
20 ноября 2017, 18:51
1
0
Используй slick slider, там есть опция «rows»
Дмитрий Кондаков
26 октября 2017, 13:21
+1
Поля нет, используйте плагины, например в плагине на событие msieOnBeforeImportProduct можно изменить товар перед его созданием. В документации есть несколько примеров
Дмитрий Кондаков
11 августа 2017, 17:04
0
И еще тогда бы кнопочку для загрузки картинки по внешнему url)
Дмитрий Кондаков
18 июля 2017, 08:40
0
Евгений, проблема с mixedimage.check_resid, даже с выключенным значением не дает загрузить картинку без сохранения, вылетает пустой алерт и картинка не грузится
Дмитрий Кондаков
11 июля 2017, 09:37
0
Годная вещь, спасибо за подсказку!
Дмитрий Кондаков
06 июля 2017, 22:20
+2
Вот как посоветовал Сергей:
<form>
	...
	<label for="agree">
		<input type="checkbox" name="agree" id="agree"> 
		 Даю свое согласие на обработку персональных данных</a>
	</label>
	<button type="submit" class="submit">Отправить</button>
</form>

<script>
	$(window).load(function() {
		$("button.submit").prop("disabled", true);
		$("#agree").change(function() {
		  state = $(this).prop("checked");
		  if (state) {
		    $("button.submit").prop("disabled", false).removeClass("disabled");
		  } else {
		    $("button.submit").prop("disabled", true).addClass("disabled");
		  }
		});
	});
</script>
Дмитрий Кондаков
19 июня 2017, 17:52
+1
Нужно создавать запись в лексиконах под каждое поле
Дмитрий Кондаков
09 июня 2017, 19:54
+1
если включен fenom:
{if $_modx->resource.hotel | resource : 'images-tours_01'?}
	<img src="{$_modx->resource.hotel | resource : 'images-tours_01'}">
{/if}
Дмитрий Кондаков
07 июня 2017, 10:29
0
$(document).ready(function(){
  $('.service-wrap').on('click', function(event){
  	if(!$(this).parents('a').hasClass('collapsed')) {
	    $('.service-wrap').removeClass('grayscale');
	  } else {
	  	$('.service-wrap').addClass('grayscale');
	    $(this).removeClass('grayscale');
	  }
   
  });
});
Дмитрий Кондаков
06 июня 2017, 23:45
0
держи
@media only screen and (max-width: 1200px) {
	.panel-group1 .panel {
	  display: flex;
	  flex-wrap: wrap;
	  background: none;
	}

	.panel-group1 .panel > div:nth-child(1) {order: 1}
	.panel-group1 .panel > div:nth-child(2) {order: 2}
	.panel-group1 .panel > div:nth-child(3) {order: 5}
	.panel-group1 .panel > div:nth-child(4) {order: 3}
	.panel-group1 .panel > div:nth-child(5) {order: 4}
	.panel-group1 .panel > div:nth-child(6) {order: 7}
	.panel-group1 .panel > div:nth-child(7) {order: 6}
	.panel-group1 .panel > div:nth-child(8) {order: 9}
	.panel-group1 .panel > div:nth-child(9) {order: 10}
	.panel-group1 .panel > div:nth-child(10) {order: 8}
	.panel-group1 .panel > div:nth-child(11) {order: 11}
	.panel-group1 .panel > div:nth-child(12) {order: 12}
	.panel-group1 .panel > div:nth-child(13) {order: 13}
	.panel-group1 .panel > div:nth-child(14) {order: 14}
	.panel-group1 .panel > div:nth-child(15) {order: 15}
	.panel-group1 .panel > div:nth-child(16) {order: 16}
}


@media only screen and (max-width: 767px) {
	.panel-group1 .panel > div:nth-child(1) {order: 1}
	.panel-group1 .panel > div:nth-child(2) {order: 3}
	.panel-group1 .panel > div:nth-child(3) {order: 5}
	.panel-group1 .panel > div:nth-child(4) {order: 2}
	.panel-group1 .panel > div:nth-child(5) {order: 4}
	.panel-group1 .panel > div:nth-child(6) {order: 6}
	.panel-group1 .panel > div:nth-child(7) {order: 7}
	.panel-group1 .panel > div:nth-child(8) {order: 9}
	.panel-group1 .panel > div:nth-child(9) {order: 11}
	.panel-group1 .panel > div:nth-child(10) {order: 8}
	.panel-group1 .panel > div:nth-child(11) {order: 10}
	.panel-group1 .panel > div:nth-child(12) {order: 12}
	.panel-group1 .panel > div:nth-child(13) {order: 13}
	.panel-group1 .panel > div:nth-child(14) {order: 15}
	.panel-group1 .panel > div:nth-child(15) {order: 14}
	.panel-group1 .panel > div:nth-child(16) {order: 16}
}
Дмитрий Кондаков
06 июня 2017, 23:16
0
Если эти блоки выводятся статичной версткой, то можно попробовать переделать верстку под flex, и поиграться со свойством order, т.е. расставить блоки видимые и не видимые в нужный порядок
Дмитрий Кондаков
29 мая 2017, 09:20
0
Евгений добрый день! По проблеме с pdoPage не найдено решение?
Дмитрий Кондаков
27 мая 2017, 11:49
+1
После открывающейся скобки "{" нужно поставить пробел
Дмитрий Кондаков
19 мая 2017, 17:49
0
так не работает?
WHERE u.id RLIKE '(^|,){$var}(,|$)'
Дмитрий Кондаков
19 мая 2017, 12:56
+1
Сразу не заметил, правильно писать:
&includeThumbs=`medium`
и в чанке вызывать миниатюру так {$medium}
Дмитрий Кондаков
19 мая 2017, 08:33
+1
Используй такие настройки:
"medium":{"w":145,"h":320,"q":90,"zc":"0","bg":"ffffff","far": "C"}
Дмитрий Кондаков
05 мая 2017, 17:17
0
После вызова assets/components/msearch2/js/web/lib/jquery-ui.min.js добавьте скрипт raw.githubusercontent.com/furf/jquery-ui-touch-punch/master/jquery.ui.touch-punch.min.js
Дмитрий Кондаков
11 апреля 2017, 15:58
+1
Попробуй так:
[[pdoResources?
  	&returnIds=`1`
  	&limit=`0`
  	&where=`{ "alias":"services"}`
  	&toPlaceholder=`service_parent`
  ]]

[[pdoResources?
	&parents=`[[+service_parent]]`
        &depth=`1`
        &tpl=`@INLINE <li class="list-services-item"><a href="[[+uri]]">[[+pagetitle]]</a></li>`
        &sortdir=`ASC`
]]
Дмитрий Кондаков
08 апреля 2017, 12:04
0
<form id="project_form" method="get" action="[[~[[*id]]]]">