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
<pre> | |
<?php | |
require_once dirname(__FILE__) . '/app/Mage.php'; | |
Mage::app(); | |
$fromDate = date('Y-m-d H:i:s', strtotime('2019-07-01 00:00:00')); | |
$toDate = date('Y-m-d H:i:s', strtotime('2019-07-31 23:59:59')); | |
$o = Mage::getModel('sales/order')->getCollection()->addFieldToFilter('status','complete')->addAttributeToFilter('created_at', array('from'=>$fromDate, 'to'=>$toDate)); |
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
<pre> | |
<?php | |
require_once dirname(__FILE__) . '/app/Mage.php'; | |
Mage::app(); | |
$fromDate = date('Y-m-d H:i:s', strtotime("-2 years")); | |
$toDate = date('Y-m-d H:i:s', strtotime("-1 week")); |
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
<?php | |
$xml = simplexml_load_file('ppp.xml'); | |
foreach ($xml->shop->offers->offer as $offer) { | |
$offerArray = _xml2array($offer); | |
$offerId = $offerArray['@attributes']['id']; | |
foreach ($offer->param as $p) { |
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
<?php | |
error_reporting(E_ALL); | |
ini_set('display_errors', '1'); | |
ini_set('time_limit', 180); | |
set_time_limit(180); | |
require_once dirname(__FILE__) . '/app/Mage.php'; | |
$app = Mage::app('admin'); | |
umask(0); | |
$skuList = '7038973, 7000845, 7039052, 7036176"; |
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
<?php | |
error_reporting(E_ALL); | |
ini_set('display_errors', '1'); | |
ini_set('time_limit', 180); | |
set_time_limit(180); | |
require_once dirname(__FILE__) . '/app/Mage.php'; | |
$app = Mage::app('admin'); | |
umask(0); | |
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
vcl 4.0; | |
C{ | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <time.h> | |
#include <pthread.h> | |
static pthread_mutex_t lrand_mutex = PTHREAD_MUTEX_INITIALIZER; | |
void generate_uuid(char* buf) { | |
pthread_mutex_lock(&lrand_mutex); | |
long a = lrand48(); |
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
<?php | |
/** | |
* Check if the given user agent string is one of a crawler, spider, or bot. | |
* | |
* @param string $user_agent | |
* A user agent string (e.g. Googlebot/2.1 (+http://www.google.com/bot.html)) | |
* | |
* @return bool | |
* TRUE if the user agent is a bot, FALSE if not. |
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
<?php | |
extension_check(array( | |
'curl', | |
'dom', | |
'gd', | |
'hash', | |
'iconv', | |
'mcrypt', | |
'pcre', | |
'pdo', |
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
<input type="text" name="test" id="test"> | |
<script> | |
var t = ''; | |
document.getElementById("test").addEventListener( 'keyup', function (e) { | |
console.log(e.keyCode); | |
if ( e.keyCode == 13 ) { | |
// Simulate clicking on the submit button. | |
// submitButton.click(); |
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
<?php | |
error_reporting(E_ALL); | |
ini_set('display_errors', 1); | |
require_once './app/Mage.php'; | |
$attributeCode = 'faktstock_sklad'; | |
$groupName = 'Для Заказа'; | |
Mage::app(); | |
Mage::getSingleton('core/translate')->setLocale('en_US')->init('frontend', true); |