Skip to content

Instantly share code, notes, and snippets.

View elamurugan's full-sized avatar

Ela elamurugan

  • One Team US
  • Troy, Michigan
View GitHub Profile
@elamurugan
elamurugan / removeTestDataResetEntitySeries.sql
Created May 30, 2019 02:48 — forked from peterjaap/removeTestDataResetEntitySeries.sql
Remove orders, invoices, shipments, creditmemos, customers and quotes from Magento
# Empty relevant tables
DELETE FROM sales_flat_creditmemo;
DELETE FROM sales_flat_invoice;
DELETE FROM sales_flat_order;
DELETE FROM sales_flat_quote;
DELETE FROM sales_flat_shipment;
DELETE FROM customer_entity;
# Reset increment_ids
# Beware of store_ids when using multiple stores
@elamurugan
elamurugan / UpgradeSchema.php
Created July 7, 2017 06:22 — forked from NicolasMugnier/UpgradeSchema.php
Magento2 : add foreign keys
<?php
class UpgradeSchema implements UpgradeSchemaInterface
{
/**
* {@inheritdoc}
*/
public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $context){
$setup->startSetup();
@elamurugan
elamurugan / Magento_clean_up.php
Created June 13, 2017 11:16 — forked from organizm/Magento_clean_up.php
Magento clean up #magento
<?php
switch($_GET['clean']) {
case 'log':
clean_log_tables();
break;
case 'var':
clean_var_directory();
break;
}
#!/bin/bash
#Instructions to use this script
#
#chmod +x SCRIPTNAME.sh
#
#sudo ./SCRIPTNAME.sh
echo "###################################################################################"
echo "Please be Patient: Installation will start now.......and it will take some time :)"
@elamurugan
elamurugan / magento_custom_index.php
Created June 8, 2017 08:33 — forked from hslatman/magento_custom_index.php
Custom Magento re-indexing script
<?php
/******************************************************************************************************************
* Source: http://www.emvee-solutions.com/blog/magento-custom-reindex-script/
*
* Custom Magento re-indexing script
******************************************************************************************************************/
//Place this file in your Magento root folder, or modify the require once to match your directory.
@elamurugan
elamurugan / 0_reuse_code.js
Created June 7, 2017 11:31
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@elamurugan
elamurugan / gist:d7050efef39fe47a0f47
Last active January 5, 2016 06:24 — forked from fbrnc/gist:bdade1df328c3f766a3c
Magento XML Connect Demo
<?php
// Initialize
$app = new SimpleHttpClient('http://www.demo.local/xmlconnect/');
$app->addCookie('app_code', 'INSERT APP CODE HERE');
$app->addCookie('screen_size', '600x400');
// get products in category 3