Skip to content

Instantly share code, notes, and snippets.

View ivanproskuryakov's full-sized avatar
🏢
https://github.com/communa

Ivan ivanproskuryakov

🏢
https://github.com/communa
View GitHub Profile
@ivanproskuryakov
ivanproskuryakov / orderexport.php
Last active September 8, 2016 07:58
Magento orders export
$file = __DIR__.’/orders/orders.xml’;
if (file_exists($file)) {
exit();
}
set_time_limit(0);
ini_set(‘memory_limit’, ’1024M’);
include_once “../app/Mage.php”;
umask (0);
//Mage::app(‘default’);
# Inspired from http://blog.hio.fr/2011/09/17/doctrine2-yaml-mapping-example.html
MyEntity:
type: entity
repositoryClass: MyRepositoryClass
table: my_entity
namedQueries:
all: "SELECT u FROM __CLASS__ u"
# Class-Table-Inheritance
php indexer.php --status
php indexer.php --reindex catalog_product_price
Here catalog_product_price is the index type that you want to rebuild. You can use next arguments for different types of indexes:
catalog_product_attribute Product Attributes
catalog_product_price Product Prices
catalog_url Catalog Url Rewrites
catalog_product_flat Product Flat Data
catalog_category_flat Category Flat Data
catalog_category_product Category Products
1. apt-get install varnish
2. http://www.magentocommerce.com/magento-connect/turpentine-varnish-cache.html
3. insert key nano /etc/varnish/secret +"\n"
varnishlog
DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \
-f ${VARNISH_VCL_CONF} \
-T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \
-t ${VARNISH_TTL} \
@ivanproskuryakov
ivanproskuryakov / gist:9861246
Last active August 29, 2015 13:57
symfony2 cache
sudo chmod +a "_www allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
php app/console assets:install web --symlink
SET FOREIGN_KEY_CHECKS=0;
TRUNCATE `sales_flat_creditmemo`;
TRUNCATE `sales_flat_creditmemo_comment`;
TRUNCATE `sales_flat_creditmemo_grid`;
TRUNCATE `sales_flat_creditmemo_item`;
TRUNCATE `sales_flat_invoice`;
TRUNCATE `sales_flat_invoice_comment`;
TRUNCATE `sales_flat_invoice_grid`;
TRUNCATE `sales_flat_invoice_item`;
TRUNCATE `sales_flat_order`;
#Servers
set :application, "internetsms"
set :domain, "internetsms.org"
set :deploy_to, "/home/karser/internetsms"
set :app_path, "app"
role :web, domain # Your HTTP server, Apache/etc
role :app, domain # This may be the same as your `Web` server
role :db, domain, :primary => true # This is where Symfony2 migrations will run
set :keep_releases, 3
logger.level = Logger::INFO