Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/
./pear download magento-community/Shipping_Agent
./mage download community Shipping_Agent
<?php | |
$attribute_code = 'ATTRIBUTE_NAME'; | |
$attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', $attribute_code); | |
$options = $attribute->getSource()->getAllOptions(); | |
$optionsDelete = array(); | |
foreach($options as $option) { | |
if ($option['value'] != "") { | |
$optionsDelete['delete'][$option['value']] = true; |
SET FOREIGN_KEY_CHECKS=0; | |
-- Customers | |
TRUNCATE `customer_address_entity`; | |
TRUNCATE `customer_address_entity_datetime`; | |
TRUNCATE `customer_address_entity_decimal`; | |
TRUNCATE `customer_address_entity_int`; | |
TRUNCATE `customer_address_entity_text`; | |
TRUNCATE `customer_address_entity_varchar`; | |
TRUNCATE `customer_entity`; |
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}
).
DELETE eav_attribute_option_value FROM eav_attribute_option,eav_attribute_option_value WHERE eav_attribute_option.attribute_id > 133 and eav_attribute_option.option_id = eav_attribute_option_value.option_id; | |
DELETE FROM eav_attribute WHERE attribute_id > 133; | |
DELETE FROM eav_attribute_label WHERE attribute_id > 133; | |
DELETE FROM eav_attribute_option WHERE attribute_id > 133; | |
DELETE FROM eav_attribute_group WHERE attribute_set_id > 25; |
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))); |
login url | |
<?php echo Mage::getUrl('customer/account/login'); ?> | |
logout url | |
<?php echo Mage::getUrl('customer/account/logout'); ?> | |
My Account url | |
<?php echo Mage::getUrl('customer/account'); ?> | |
Register url |
Index: app/code/core/Mage/Admin/Model/Variable.php | |
IDEA additional info: | |
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
<+>UTF-8 | |
=================================================================== | |
--- app/code/core/Mage/Admin/Model/Variable.php (revision 2bd128c1f190cd9ea63269824f09789199565251) | |
+++ app/code/core/Mage/Admin/Model/Variable.php (revision ) | |
@@ -30,6 +30,13 @@ | |
class Mage_Admin_Model_Variable extends Mage_Core_Model_Abstract | |
{ |
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`; | |