./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
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/sh | |
DEFAULT_MAGENTO_VERSION=1.7.0.2 | |
DEFAULT_MAGE_URL="http://127.0.0.1/" | |
if [ -z $1 ] # Magento version | |
then | |
read -p "Choose Magento version ($DEFAULT_MAGENTO_VERSION): " MAGENTO_VERSION | |
if [ -z "$MAGENTO_VERSION" ] | |
then |
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"?> | |
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd"> | |
<acl> | |
<resources> | |
<resource id="Magento_Backend::admin"> | |
</resource> | |
</resources> | |
</acl> | |
</config> |
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 | |
/** | |
* Working with Magento outside of the normal routing dispatch | |
* flow of Mage::run()? Mage::app(); is the way to go. This | |
* workbench script can be a quick way to check on various | |
* parts of the app, including configuration, which can be | |
* handy when verifying custom modules. | |
*/ | |
//set some PHP params for ease of debugging | |
ini_set('display_errors',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
SET FOREIGN_KEY_CHECKS = 0; | |
TRUNCATE TABLE `core_url_rewrite`; | |
TRUNCATE TABLE `enterprise_catalog_category_rewrite`; | |
TRUNCATE TABLE `enterprise_catalog_product_rewrite`; | |
TRUNCATE TABLE `enterprise_url_rewrite`; | |
TRUNCATE TABLE `enterprise_url_rewrite_category_cl`; | |
TRUNCATE TABLE `enterprise_url_rewrite_product_cl`; | |
TRUNCATE TABLE `enterprise_url_rewrite_redirect_cl`; | |
TRUNCATE TABLE `enterprise_url_rewrite_redirect_rewrite`; | |
TRUNCATE TABLE `enterprise_url_rewrite_redirect`; |
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 | |
var_dump(gaSendRefund('2642236223')); | |
function gaSendRefund($transaction_id) | |
{ | |
$url = 'https://www.google-analytics.com/collect'; | |
$tid = 'UA-XXXXXXX-X'; | |
$params = http_build_query( | |
array( |
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 | |
if [ "$#" == "0" ]; then | |
echo | |
echo "Sorry cant run!" | |
echo "No arguments provided. Please pass this script agruments in the following format:" | |
echo "./magestocker.sh magento_root theme_base current_theme_name" | |
echo "example: " | |
echo "./magestocker.sh /var/www/magento default mytheme" | |
echo "another example:" |
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); | |
ini_set('display_startup_errors', 1); | |
error_reporting(E_ALL); | |
//echo "hello world"; | |
try { | |
require __DIR__ . '/app/bootstrap.php'; |
Recently had a client that wanted to customize the layout for a category landing page so that the category's title and description would be displayed above the layered navigation and product grid — essentially creating a full-width section above the left sidebar and main content areas.
NOTE: For reference, this is based off the blog post from Collaboration133.com's Magento - Add Custom Structural Block Reference.
I created a custom module to help organize and identify that there are some custom modifications to layout templates. Not saying you have to, but it may be easier for other's (or your future self) to recognize and find what customizations were done (and hopefully why).
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 | |
# This script is a very basic curl utility to analyze urls. | |
# To use it, download the file, make it executable, and run: | |
# ./curl_speedtest.sh https://www.byte.nl | |
URL="$1" | |
if [ "x${URL}" == "x" ] || [[ ! "${URL}" =~ "http" ]] ; then | |
echo "Usage: $0 <url>" | |
exit 1 |
OlderNewer