Skip to content

Instantly share code, notes, and snippets.

@markvds
markvds / filterable_attributes.php
Created February 25, 2015 09:17
Magento shell script (place it in /shell) to output all filterable attributes. You can then copy/paste it into robots.txt to effectively stop bots from indexing your layered navigation. See also https://www.byte.nl/blog/zoekmachine-bots-en-serverbelasting/
<?php
require_once 'abstract.php';
class Mage_Shell_Filterable_Attributes extends Mage_Shell_Abstract
{
/**
* Run script
*
*/
public function run()
@jklance
jklance / magento_removeAllCategories.sql
Created March 20, 2014 14:01
Magento: Remove all categories from a store
SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE `catalog_category_entity`;
TRUNCATE TABLE `catalog_category_entity_datetime`;
TRUNCATE TABLE `catalog_category_entity_decimal`;
TRUNCATE TABLE `catalog_category_entity_int`;
TRUNCATE TABLE `catalog_category_entity_text`;
TRUNCATE TABLE `catalog_category_entity_varchar`;
TRUNCATE TABLE `catalog_category_product`;
TRUNCATE TABLE `catalog_category_product_index`;