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> |
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
<?php | |
ini_set ("display_errors", 1); | |
$start_time = microtime(true); | |
// Configuration | |
if (file_exists('config.php')) { | |
require_once('config.php'); | |
} else { | |
die("Config file is not exists"); |
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
CACHE | |
$this->cache->delete($key) - Deletes cache [product, category, country, zone, language, currency, | |
manufacturer] | |
CART | |
$this->cart->getProducts() Gets all products currently in the cart including options, discounted prices, etc. | |
$this->cart->add( $product_id, $qty = 1, $options = array()) - Allows you to add a product to the cart | |
$this->cart->remove( $key ) - Allows you to remove a product from the cart | |
$this->cart->clear() - Allows you to remove all products from the cart | |
$this->cart->getWeight() - Sum of the weight of all products in the cart that have require shipping set to Yes | |
$this->cart->getSubTotal() - returns the subtotal of all products added together before tax |
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 | |
final class Encryption { | |
private $key; | |
public function __construct($key) { | |
$this->key = hash('sha256', $key, true); | |
} | |
public function encrypt($value) { | |
return strtr(base64_encode(openssl_encrypt($value, 'aes-128-cbc', $this->key)), '+/=', '-_,'); |
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
/* | |
* Migrate Fontawesome 4 to Fontawesome 5 | |
* @website https://www.litecart.net/ | |
*/ | |
(function(){ | |
var icons = { | |
"fa-500px": "fab fa-500px", | |
"fa-address-book-o": "far fa-address-book", | |
"fa-address-card-o": "far fa-address-card", |
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
{ | |
_id: ObjectId("51174626b173c26d4d000006"), | |
product_description: { | |
name: "iPod Nano", | |
meta_description: "", | |
meta_keyword: "", | |
description: "<div>\r\n\t<p>\r\n\t\t<strong>Video in your pocket.</strong></p>\r\n\t<p>\r\n\t\tIts the small iPod with one very big idea: video. The worlds most popular music player now lets you enjoy movies, TV shows, and more on a two-inch display thats 65% brighter than before.</p>\r\n\t<p>\r\n\t\t<strong>Cover Flow.</strong></p>\r\n\t<p>\r\n\t\tBrowse through your music collection by flipping through album art. Select an album to turn it over and see the track list.<strong>&nbsp;</strong></p>\r\n\t<p>\r\n\t\t<strong>Enhanced interface.</strong></p>\r\n\t<p>\r\n\t\tExperience a whole new way to browse and view your music and video.</p>\r\n\t<p>\r\n\t\t<strong>Sleek and colorful.</strong></p> |
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
<modification> | |
<id>Common_home</id> | |
<version>For OpenCart 1.5.x</version> | |
<vqmver>1.2.3</vqmver> | |
<author>Andrew Dacenko</author> | |
<file name="system/library/response.php"> | |
<operation> | |
<search position="after"><![CDATA[ | |
public function output() { | |
]]></search> |
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 | |
define('SAFE', 1); | |
define('EXTREME', 2); | |
define('EXTREME_SAVE_COMMENTS', 4); | |
define('EXTREME_SAVE_PRE', 3); | |
function minify($html, $level=2) | |
{ | |
switch((int)$level) |
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
######################################################################## | |
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2019 | |
# ---------------------------------------------------------------------- | |
# @Author: Andreas Hecht | |
# @Author URI: https://andreas-hecht.com | |
# License: GNU General Public License v2 or later | |
# License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
######################################################################## | |
NewerOlder