Skip to content

Instantly share code, notes, and snippets.

@mblarsen
mblarsen / Numeric.php
Created August 15, 2016 17:56
Module rewrite that enables same increment prefix for each Magento store under a website.
<?php
// app/code/local/Namespace/Modulename/Eav/Model/Entity/Increment/Numeric.php
/**
* Changes the next id behaviour so that all stores share the same increment
* for orders, invoces, creditmemos and shipments if they share the same
* increment prefix.
*
* 1. In eav_entity_type leave increment_model to be the default eav/entity_increment_numeric
*
@tomazzaman
tomazzaman / class-developer-import.php
Created March 31, 2015 18:03
Import JSON into WordPress
<?php
// Published under GPL
// tutorial here: https://codeable.io/community/how-to-import-json-into-wordpress/
class Developer_Import {
public function __construct() {
add_action( 'wp_ajax_import_developer', array( $this, 'import_developer' ) );