Skip to content

Instantly share code, notes, and snippets.

config.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<KK_BLSync>
<version>0.0.1</version>
</KK_BLSync>
</modules>
<global>
<models>
<checkout_onepage_index>
<reference name="root">
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>
</reference>
</checkout_onepage_index>
<?php
require_once 'app/Mage.php';
$app = Mage::app();
echo "<pre>";
if($app != null) {
echo "The app was initialized.\n";
$cache = $app->getCache();
if($cache != null) {
echo "The cache is not empty. Clean it.\n";
CREATE TABLE IF NOT EXISTS `catalog_product_index_group_price` (
`entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
`customer_group_id` smallint(5) unsigned NOT NULL COMMENT 'Customer Group ID',
`website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
`price` decimal(12,4) DEFAULT NULL COMMENT 'Min Price',
PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`),
KEY `IDX_CATALOG_PRODUCT_INDEX_GROUP_PRICE_CUSTOMER_GROUP_ID` (`customer_group_id`),
KEY `IDX_CATALOG_PRODUCT_INDEX_GROUP_PRICE_WEBSITE_ID` (`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Catalog Product Group Price Index Table';
CREATE TABLE IF NOT EXISTS `catalog_product_entity_group_price` (
`value_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Value ID',
`entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity ID',
`all_groups` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'Is Applicable To All Customer Groups',
`customer_group_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer Group ID',
`value` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Value',
`website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
PRIMARY KEY (`value_id`),
UNIQUE KEY `CC12C83765B562314470A24F2BDD0F36` (`entity_id`,`all_groups`,`customer_group_id`,`website_id`),
KEY `IDX_CATALOG_PRODUCT_ENTITY_GROUP_PRICE_ENTITY_ID` (`entity_id`),
array(40) {
["MANPATH"]=>
string(26) "/usr/lib/courier-imap/man:"
["HOSTNAME"]=>
string(25) "magdev.inverseparadox.net"
["TERM"]=>
string(5) "xterm"
["SHELL"]=>
string(9) "/bin/bash"
["HISTSIZE"]=>
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Mdunbar_Loyalty>
<version>1.0.0</version>
</Mdunbar_Loyalty>
</modules>
<global>
<resources>
<loyalty_setup>
<?php
class Mdunbar_Loyalty_Model_Entity_Setup extends Mage_Eav_Model_Entity_Setup
{
public function getDefaultEntities()
{
return array(
'customer' => array(
'entity_model' => 'customer/customer',
UPDATE `catalog_category_entity_int` `e`
LEFT JOIN `eav_attribute` `a`
ON `a`.`attribute_id` = `e`.`attribute_id`
SET `e`.`value` = 1
WHERE `a`.`attribute_code` = 'is_anchor'