Skip to content

Instantly share code, notes, and snippets.

View predavlad's full-sized avatar

Preda Vlad predavlad

View GitHub Profile
@predavlad
predavlad / hb.txt
Last active February 28, 2020 12:13
51 66 20 72 7a 71 79 6e 20 66 73 6e 20 78 6e 20 6b 6a 71 6e 68 6e 79 66 77 6e 20 75 6a 73 79 77 7a 20 68 6a 6e 20 39 20 66 73 6e 20 75 6a 79 77 6a 68 7a 79 6e 20 6e 73 20 6b 6e 77 72 66 21 20 2d 2d 20 41 71 66 69 0d 0a 0d 0a
@predavlad
predavlad / create stores.php
Last active March 7, 2018 15:16
Move stores to newly created websites
<?php
require_once "app/Mage.php";
Mage::app();
$storeCodes = array('nl', 'dk', 'es', 'fr'); // new websites to be created - also used to get current store IDs
$websiteIds = array(1, 2); // existing websites (default + at)
$rooterCategoryId = 2; // root category for the storeGroup
foreach ($storeCodes as $code) {
@predavlad
predavlad / magento-healthcheck.php
Created February 13, 2018 14:42
A simple healthcheck
<?php
require_once "app/Mage.php";
Mage::app();
$category = Mage::getModel('catalog/category')->load(3);
$name = $category->getName();
if (strlen($name)) {
header("HTTP/1.1 200 OK");
exit(0);
}
header("HTTP/1.1 500 Error");