Skip to content

Instantly share code, notes, and snippets.

View bjarneo's full-sized avatar
🏠
Working from home

bjarneo bjarneo

🏠
Working from home
View GitHub Profile
$now = time();
$cache_timer = get_option('frontpage_categories_box_cachetime', $now);
if ($cache_timer > $now) {
$content = get_option('frontpage_cateogires_box_content');
if (empty($content)) {
ob_start();
include 'views/frontpage_categories_box.php';
$content = ob_get_clean();
update_option('frontpage_cateogires_box_content', $content);
update_option('frontpage_categories_box_cachetime', (time() + (60 * 60)));

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
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`;

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name