Skip to content

Instantly share code, notes, and snippets.

View brankoajzele's full-sized avatar

Branko Ajzele brankoajzele

View GitHub Profile
@brankoajzele
brankoajzele / gist:9487779
Created March 11, 2014 15:08
Simple SOAP 'magento.info' API call on clean Magento 1.8
2014-03-11T15:06:50+00:00 DEBUG (7): Array
(
[REDIRECT_HTTP_AUTHORIZATION] =>
[REDIRECT_TMP] => C:/Program Files (x86)/Ampps/tmp
[REDIRECT_STATUS] => 200
[HTTP_AUTHORIZATION] =>
[TMP] => C:/Program Files (x86)/Ampps/tmp
[HTTP_HOST] => magento18.ce
[HTTP_CONNECTION] => close
[PATH] => C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Lenovo\Fingerprint Manager Pro\;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x64;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Ampps\php;C:\Program Files (x86)\Ampps\mysql\bin;C:\Program Files (x86)\Ampps\a
@brankoajzele
brankoajzele / gist:38fa394d0b276aa5dab8
Created July 30, 2014 20:26
magento-csv-product-generator
<?php
/* Magento CSV products generator */
if(php_sapi_name() != 'cli' && !empty($_SERVER['REMOTE_ADDR'])) {
exit('Only shell execution execution is allowed!');
}
require_once 'faker/autoload.php';
@brankoajzele
brankoajzele / gist:eb22ef28443dbadf30d0
Created July 30, 2014 20:27
elasticsearch-requests-generator
<?php
if(php_sapi_name() != 'cli' && !empty($_SERVER['REMOTE_ADDR'])) {
exit('Only shell execution execution is allowed!');
}
$csv = $argv[1]; /* Full absolute path to CSV file */
$_index = $argv[2]; /* Index */
$_type = $argv[3]; /* Index type */
$_id = $argv[4]; /* CSV column to use for ID */
<style>
#current-category-content ul {
padding-left: 20px;
}
.elastic-active-category-title span {
color: silver;
}
</style>
<div class="block block-list block-current-category">
@brankoajzele
brankoajzele / gist:fc3a20ffc9a64de24610
Created August 12, 2015 05:55
Magento 2 - full JavaScript list across entire Magento installation
app/code/Magento/AdminNotification/view/adminhtml/requirejs-config.js
app/code/Magento/AdminNotification/view/adminhtml/web/system/notification.js
app/code/Magento/AdminNotification/view/adminhtml/web/toolbar_entry.js
app/code/Magento/Authorizenet/view/adminhtml/web/js/direct-post.js
app/code/Magento/Authorizenet/view/frontend/requirejs-config.js
app/code/Magento/Authorizenet/view/frontend/web/js/view/payment/authorizenet.js
app/code/Magento/Authorizenet/view/frontend/web/js/view/payment/method-renderer/authorizenet-directpost.js
app/code/Magento/Backend/view/adminhtml/web/js/bootstrap/editor.js
app/code/Magento/Braintree/view/adminhtml/requirejs-config.js
app/code/Magento/Braintree/view/adminhtml/web/js/cc-data.js
@brankoajzele
brankoajzele / gist:1430081
Created December 4, 2011 12:29
Inchoo_Phonebook Magento Test Extension: app/etc/modules/Inchoo_Phonebook.xml
<?xml version="1.0"?>
<config>
<modules>
<Inchoo_Phonebook>
<active>true</active>
<codePool>local</codePool>
<depends>
<Mage_Core />
<Mage_Eav />
@brankoajzele
brankoajzele / gist:1430085
Created December 4, 2011 12:31
Inchoo_Phonebook Magento Test Extension: app/code/local/Inchoo/Phonebook/etc/config.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Inchoo_Phonebook>
<version>1.0.0.0</version>
</Inchoo_Phonebook>
</modules>
<global>
<models>
@brankoajzele
brankoajzele / gist:1430086
Created December 4, 2011 12:32
Inchoo_Phonebook Magento Test Extension: app/code/local/Inchoo/Phonebook/Model/User.php
<?php
class Inchoo_Phonebook_Model_User extends Mage_Core_Model_Abstract
{
/**
* Maps to the array key from Setup.php::getDefaultEntities()
*/
const ENTITY = 'inchoo_phonebook_user';
protected $_eventPrefix = 'inchoo_phonebook';
@brankoajzele
brankoajzele / gist:1430090
Created December 4, 2011 12:33
Inchoo_Phonebook Magento Test Extension: app/code/local/Inchoo/Phonebook/Model/Resource/User.php
<?php
class Inchoo_Phonebook_Model_Resource_User extends Mage_Eav_Model_Entity_Abstract
{
public function __construct()
{
$resource = Mage::getSingleton('core/resource');
$this->setType(Inchoo_Phonebook_Model_User::ENTITY);
@brankoajzele
brankoajzele / gist:1430091
Created December 4, 2011 12:34
Inchoo_Phonebook Magento Test Extension: app/code/local/Inchoo/Phonebook/Model/Resource/User/Collection.php
<?php
class Inchoo_Phonebook_Model_Resource_User_Collection extends Mage_Eav_Model_Entity_Collection_Abstract
{
protected function _construct()
{
$this->_init('inchoo_phonebook/user');
}
protected function _initSelect()