git clone https://github.com/cartalyst/platform.git blog
Navigate into the downloaded folder and run
<?php | |
require_once('app/Mage.php'); //Path to Magento | |
umask(0); | |
Mage::app(); | |
$setup = new Mage_Eav_Model_Entity_Setup('core_setup'); | |
$setup->startSetup(); | |
$setup->addAttribute(Mage_Catalog_Model_Category::ENTITY, 'secondary_heading', | |
array( |
RewriteCond %{HTTPS} off | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
RewriteCond %{HTTP_HOST} !^content\.(.*)$ [NC] | |
RewriteCond %{HTTP_HOST} !^themes\.(.*)$ [NC] | |
RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC] | |
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
RewriteCond %{HTTPS} off | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] | |
RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC] |
$categoryLink = Mage::getModel("catalog/category")->load(10)->getUrl(); | |
$pos = strpos($categoryLink, '?'); | |
$categoryLink = ($pos>0) ? substr($categoryLink, 0, $pos) : $categoryLink; |
<?php | |
/* | |
If your products have been deleted but not your media gallery images you | |
can use the following SQL statement to remove these dormant records. | |
Please make sure you backup your installation and database before running this | |
SQL statement. It has been used on Mage 1.8.1 system: | |
<?php | |
require_once('app/Mage.php'); | |
umask(0); | |
Mage::app(); | |
$customers = Mage::getModel('customer/customer')->getCollection(); | |
$customers->addAttributeToSelect('*'); | |
$customersArray[0] = array( |
######################################################################################## | |
# Kathir 'Sid' Vel's robots.txt file for Magento websites | |
######################################################################################## | |
User-agent: * | |
Allow: / | |
#Disallow: / | |
######################################################################################## | |
# Do not crawl development files and folders |