Skip to content

Instantly share code, notes, and snippets.

https://modx.pro/solutions/10040-add-your-fields-in-the-order-form/
https://dart.agency/blog/modx/kak-dobavit-dopolnitelnoe-pole-k-zakazu-v-minishop2.html
https://modx.pro/solutions/7037-expanding-any-table-modx/#comment-84315
Инструкция:
1)В системных настройках добавляем свои поля в ms2_order_address_fields
2)Создаём плагин на событие OnMODXInit для расширения модели БД
<?php
switch ($modx->event->name) {
@sitecustom
sitecustom / masonry_imageloaded.js
Created November 20, 2017 18:56 — forked from agragregra/masonry_imageloaded.js
Masonry imagesLoaded
var $container = $(".masonry-container");
$container.imagesLoaded(function () {
$container.masonry({
columnWidth: ".item",
itemSelector: ".item"
});
});
@sitecustom
sitecustom / README.md
Created November 5, 2017 22:29 — forked from em-piguet/README.md
Minimal Portfolio with MODX and Isotope.js
@sitecustom
sitecustom / pdoResources.tpl
Created November 1, 2017 17:49 — forked from jerrydeakins/pdoResources.tpl
Навигация по автометкам (ModX Revo)
А вот вызов pdoResources, для создания блога и фильтрации по автометке.
[[!pdoResources?
&parents=`[[*id]]`
&tvFilters=`[[!tagLinks? &get=`1`]]`
&tpl=`@INLINE <div class="row">
<div class="cols col-10 intro">
<h2><a href="{{+link}}">{{+pagetitle}}</a> ({{+publishedon}})</h2>
<div>{{!tagLinks? &tags=`{{+tv.autotag}}`}}</div>
{{+introtext}} <a href="{{+link}}">читать дальше..</a>
</div>
HTML:
<div class="wrapper">
<div class="tabs">
<span class="tab">Вкладка 1</span>
<span class="tab">Вкладка 2</span>
<span class="tab">Вкладка 3</span>
</div>
<div class="tab_content">
<div class="tab_item">Содержимое 1</div>
<div class="tab_item">Содержимое 2</div>
@sitecustom
sitecustom / media.css
Created August 14, 2017 17:01
Медиа-запрос для изменения точки сворачивания меню в bootstrap 3
@media (max-width: px) {
.navbar-header {
float: none;
}
.navbar-toggle {
display: block;
}
.navbar-collapse {
border-top: 1px solid transparent;
box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
@sitecustom
sitecustom / functions.php
Created July 18, 2017 21:28 — forked from artikus11/functions.php
Адаптивные таблицы в статьях и страницах
add_action( 'wp_footer', 'art_responsive_tables' );
function art_responsive_tables() {
if ( is_singular() ) {
?>
<script>
jQuery(document).ready(function ($) {
$('article table').wrap('<div class="table-cover"></div>');
});
</script>
<style>
@sitecustom
sitecustom / how2wordpress
Created March 29, 2017 01:32 — forked from ivanmarkovich/how2wordpress
Посадка на WordPress
Порядок действий:
1) Установить WordPress
2) Зайти на URL сайта, выполнить установку WP ввести базу данных, логин, пароль
3) Перейти в /wp-content/themes/ и добавить папку со своей темой(сайтом)
4) Изменить расширение файла index.html на index.php
5) Создать файл style.css и прописать комментарий с описанием темы ( https://gist.github.com/ivanmarkovich/2a056172db4cc4c39827343222a00855 )
6) Перенести <link>'и со стилями из index.php в style.css, добавить их через @import
7) В файле index.php: подключить файл со стилями используя функцию php - <link href="<?php bloginfo('stylesheet_url');?>" rel="stylesheet">
8) В файле index.php: перенести все скрипты из подвала в тег head
9) Создать файл functions.php, в него перенести скрипты из head ( https://gist.github.com/ivanmarkovich/954e4cf068efb55211c9e58210d7952a )
@sitecustom
sitecustom / button.sass
Created March 27, 2017 23:29 — forked from agragregra/button.sass
Button Sass Styles (Universal Starter)
.button
display: inline-block
border: none
color: #fff
text-decoration: none
background-color: $accent
padding: 15px 45px
font-size: 13px
text-transform: uppercase
font-weight: 600
<main class="cd-main-content">
<section class="center">
<h1>SVG Modal Window</h1>
<a href="#0" class="cd-btn" id="modal-trigger" data-type="cd-modal-trigger">Fire Modal Window</a>
</section>
</main> <!-- .cd-main-content -->
<div class="cd-modal" data-modal="modal-trigger">
<div class="cd-svg-bg"
data-step1="M-59.9,540.5l-0.9-1.4c-0.1-0.1,0-0.3,0.1-0.3L864.8-41c0.1-0.1,0.3,0,0.3,0.1l0.9,1.4c0.1,0.1,0,0.3-0.1,0.3L-59.5,540.6 C-59.6,540.7-59.8,540.7-59.9,540.5z"