Skip to content

Instantly share code, notes, and snippets.

@stansidel
stansidel / components.simple-drag\.js
Last active October 14, 2020 19:46 — forked from dgavey/components.simple-drag\.js
Simple Drag Example
import Component from '@glimmer/component';
import { action } from '@ember/object';
import { tracked } from '@glimmer/tracking';
export default class SimpleDrag extends Component {
@tracked statusText = "";
@tracked overDropZone = false;
@action dragHasStarted() {
@stansidel
stansidel / gitrm.sh
Last active December 18, 2015 04:39 — forked from olistik/gitrm.sh
#!/bin/bash
# Performs a git rm on every deleted file.
deletion_list=$(git status | grep deleted: | cut -c 15-)
for file in $deletion_list; do
git rm --ignore-unmatch $file
done
<?php
//событие подмены нужной цены для покупки услуг
AddEventHandler("catalog", "OnGetOptimalPrice", 'OnGetOptimalPriceHandler');
function OnGetOptimalPriceHandler($productID)
{
//получаем id инфоблока покупаемого товара. Если это услуга, то подменяем цену.
$db_iblock = CIBlockElement::GetList(array(), array("ID" => $productID), false, false, array("IBLOCK_ID"));
$iblock = $db_iblock->Fetch();