/**
* @var array $resultObjectList - Массив объектов
* @var VirtueMartModelProduct $productModel
*/
$productModel = VmModel::getModel('product');
// Получаем цены для товаров
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Getting node-sass to output a sourcemap took a bit of trial & error | |
Mostly because phpstorm does not allow for the same colon syntax that most sources reference, | |
specifically the Output paths to reference only took 1 argument | |
--- | |
Add File Watcher SCSS in settings | |
Watcher Settings | |
Program : | |
C:\Users\%username%\AppData\Roaming\npm\node-sass.cmd | |
Arguments : | |
--no-cache --update --source-map=$FileNameWithoutExtension$.css.map $FileName$ $FileNameWithoutExtension$.css |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Переопределение расположения CONFIGURATION | |
* | |
* Добавить - этот код в низ файлов : | |
* -- /includes/defines.php | |
* -- /administrator/includes/defines.php | |
* Удалить в этих файлах стандартное определение константы define('JPATH_CONFIGURATION', JPATH_ROOT); | |
* | |
* Скопировать файл /configuration.php в директорию - /includes/dev/ | |
* - в место *.*.*.* - вставить свой IP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const math = { | |
map: (x, a, b, c, d) => ((x - a) * (d - c)) / (b - a) + c, | |
lerp: (a, b, n) => (1 - n) * a + n * b | |
}; | |
const { body } = document; | |
// Window | |
let winsize; | |
const calcWinsize = () => { | |
winsize = { width: window.innerWidth, height: window.innerHeight }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.isInViewport = function() { | |
const elementTop = $(this).offset().top; | |
const elementBottom = elementTop + $(this).outerHeight(); | |
const viewportTop = $(window).scrollTop(); | |
const viewportBottom = viewportTop + $(window).height(); | |
return elementBottom > viewportTop && elementTop < viewportBottom; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_expires.c> | |
ExpiresActive on | |
ExpiresDefault "access plus 1 month" | |
# CSS | |
ExpiresByType text/css "access plus 1 year" | |
# Data interchange | |
ExpiresByType application/atom+xml "access plus 1 hour" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Создать дерево категорий для товара | |
* Использовано для CMS - OpenCart | |
* | |
* @param int $product_id | |
* @param int $categoryId | |
* @param string $categoryTreeArray | |
* | |
* @return array|mixed|string | |
* @since 3.9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const template = document.createElement('template'); | |
template.innerHTML = ` | |
<style> | |
* { | |
font-size: 200%; | |
} | |
span { | |
width: 4rem; | |
display: inline-block; |
NewerOlder