This file contains 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
#!/bin/bash | |
# Adding php wrapper | |
user="$1" | |
domain="$2" | |
ip="$3" | |
home_dir="$4" | |
docroot="$5" | |
wrapper_script="#!/bin/sh | |
PHPRC=/usr/local/lib |
This file contains 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
<?php | |
class ModelToolYMLOcextDMPRO extends Model | |
{ | |
protected $registry; | |
private $categories = array(); | |
public function __construct($registry) |
This file contains 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
$(function() { | |
let _window = $(window); | |
_window.on("resize", function() { | |
if (window.innerWidth <= 992) { | |
if (window.location.pathname = '/') { | |
let categoryId = '123'; | |
window.location.href = '/index.php?route=product/category&category_id=' + categoryId; | |
} | |
} | |
}); |
This file contains 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
<?php | |
class ControllerToolTranslate extends Controller | |
{ | |
private $yandexApi; | |
public function __construct($registry) | |
{ | |
parent::__construct($registry); |
This file contains 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
#!/bin/bash | |
# ssh | |
sudo apt-get update; | |
sudo apt-get install openssh-server; | |
sudo service ssh start; | |
sudo update-rc.d ssh defaults; | |
# nginx | |
sudo apt-get install nginx; |
This file contains 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
public function scan_Dir($dir) { | |
$dir = str_replace("//", "/", $dir); | |
$arrfiles = array(); | |
if (is_dir($dir)) { | |
if ($handle = opendir($dir)) { | |
chdir($dir); | |
while (false !== ($file = readdir($handle))) { | |
if ($file != "." && $file != "..") { | |
if (is_dir($file)) { | |
$arr = $this->scan_Dir($file); |
This file contains 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
DELETE t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15 | |
FROM `oc_product` t1 | |
LEFT JOIN `oc_product_attribute` t2 ON(t1.product_id=t2.product_id) | |
LEFT JOIN `oc_product_description` t3 ON(t1.product_id=t3.product_id) | |
LEFT JOIN `oc_product_discount` t4 ON(t1.product_id=t4.product_id) |
This file contains 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
/usr/bin/wget -O - -q -t 1 'https://mixtools.com.ua/index.php?route=feed/ocext_feed_generator_yamarket&token=31082' |
This file contains 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
<?php | |
ini_set('max_execution_time', 600); | |
ini_set('memory_limit','1024M'); | |
// Start the backup! | |
zipData('public_html', 'backup.zip'); | |
echo 'Finished.'; | |
// Here the magic happens :) | |
function zipData($folder, $zipTo) { | |
if (extension_loaded('zip') === true) { |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<modification> | |
<name>Product discount options</name> | |
<version>1.0.0</version> | |
<link>https://e-m.com.ua</link> | |
<author>em</author> | |
<code>product_discount_options</code> | |
<file path="catalog/model/catalog/product.php"> | |
<operation error="skip"> | |
<search><![CDATA[$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "product_discount WHERE product_id = '" . (int)$product_id . "' AND customer_group_id = '" . (int)$this->config->get('config_customer_group_id') . "' AND quantity > 1 AND ((date_start = '0000-00-00' OR date_start < NOW()) AND (date_end = '0000-00-00' OR date_end > NOW())) ORDER BY quantity ASC, priority ASC, price ASC");]]></search> |
NewerOlder