git clone https://github.com/OpenMage/magento-mirror.git magento ;
cd magento ;
extract compressed-magento-sample-data-1.9.1.0.tgz ./ ;
cp -rv magento-sample-data-1.9.1.0/* ./ ;
| #for Fooman Speedster 2 nginx rewrite rule | |
| location /skin/m/ { | |
| rewrite ^/skin/m/([^/]+)(/.*.(js|css))$ /lib/minify/m.php?f=$2&d=$1; | |
| } |
| <?php | |
| /** | |
| * Lock manager to ensure our cron doesn't run twice at the same time. | |
| * | |
| * Inspired by the lock mechanism in Mage_Index_Model_Process | |
| * | |
| * Usage: | |
| * | |
| * $lock = Mage::getModel('stcore/cron_lock'); |
| /**************************** | |
| * | |
| * Util function for a recursive filesearch using glob function | |
| * | |
| ****************************/ | |
| if ( ! function_exists('glob_recursive')) { | |
| // Does not support flag GLOB_BRACE | |
| function glob_recursive($pattern, $flags = 0) { |
| #!/bin/bash | |
| # VARIABLES | |
| CONFIG_FILE="./app/etc/local.xml" | |
| DUMP_FILE="./var/db-sales-users.sql" | |
| TABLES="sales_bestsellers_aggregated_daily sales_bestsellers_aggregated_monthly sales_bestsellers_aggregated_yearly sales_billing_agreement sales_billing_agreement_order sales_flat_creditmemo sales_flat_creditmemo_comment sales_flat_creditmemo_grid sales_flat_creditmemo_item sales_flat_invoice sales_flat_invoice_comment sales_flat_invoice_grid sales_flat_invoice_item sales_flat_order sales_flat_order_address sales_flat_order_grid sales_flat_order_item sales_flat_order_payment sales_flat_order_status_history sales_flat_quote sales_flat_quote_address_item sales_flat_quote_item sales_flat_quote_item_option sales_flat_quote_payment sales_flat_quote_shipping_rate | |
| sales_flat_shipment sales_flat_shipment_comment sales_flat_shipment_grid sales_flat_shipment_item sales_flat_shipment_track sales_invoiced_aggregated sales_invoiced_aggregated_order sales_order_aggregated_created sales_order_aggregated_updated sales_order_statu |
| diff -rupN mage_org/app/code/core/Mage/Catalog/Model/Url.php src_shop/app/code/core/Mage/Catalog/Model/Url.php | |
| --- mage_org/app/code/core/Mage/Catalog/Model/Url.php 2013-11-19 00:48:25.679009391 +0100 | |
| +++ src_shop/app/code/core/Mage/Catalog/Model/Url.php 2013-11-19 00:49:24.188005601 +0100 | |
| @@ -643,13 +643,24 @@ class Mage_Catalog_Model_Url | |
| $this->_rewrite = $rewrite; | |
| return $requestPath; | |
| } | |
| + | |
| + // avoid unnecessary creation of new url_keys for duplicate url keys | |
| + $noSuffixPath = substr($requestPath, 0, -(strlen($suffix))); |
| <?php | |
| /** | |
| * Convert a multi-dimensional array into a single-dimensional array. | |
| * @author Sean Cannon, LitmusBox.com | [email protected] | |
| * @param array $array The multi-dimensional array. | |
| * @return array | |
| */ | |
| function array_flatten($array) { | |
| if (!is_array($array)) { |
git clone https://github.com/OpenMage/magento-mirror.git magento ;
cd magento ;
extract compressed-magento-sample-data-1.9.1.0.tgz ./ ;
cp -rv magento-sample-data-1.9.1.0/* ./ ;
All custom modules should have a Namespace and Module Name.
These are used below as {Namespace} and {Module}.
Caution: The Magento autoloader is known to have problems with CamelCase namespaces and/or modules between Windows and *nix systems. If your module requires more than one word for either of these, it is best to just concatenate them to avoid any issues (Example:
{Namespace}_{Examplemodule}).
| $originalCollection = Mage::getModel('catalog/product') | |
| ->getCollection(); | |
| $newCollection = Mage::getModel('catalog/product') | |
| ->getCollection(); | |
| $selectParts = array( | |
| Varien_Db_Select::DISTINCT, | |
| Varien_Db_Select::COLUMNS, | |
| Varien_Db_Select::UNION, |
| <?php | |
| if(php_sapi_name()!=="cli"){ | |
| echo "Must be run from the commend line."; | |
| }; | |
| /** | |
| * Setup a magento instance so we can run this export from the command line. | |
| */ | |
| require_once('app/Mage.php'); | |
| umask(0); | |
| if (!Mage::isInstalled()) { |