Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Copyright © All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);
namespace Brildor\Migration\Console\Command;
use JsonMachine\JsonMachine;
@paugnu
paugnu / exportCategoriesCsv.php
Created April 4, 2020 11:36
Magento 1 category information exporter for module catgento/magento-2-category-importer
<?php
/**
* This is a shell script that has to be placed in a Magento 1 shell/ directory
* It outputs the category information
*
* @category Mage
* @package Mage_Shell
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
@paugnu
paugnu / gist:1eb7045d660ebe61e51987554e3a1450
Created June 14, 2019 06:08
Owebia configuration for product shipping restriction
{
"envio_AD": {
"label": "Andorra",
"description": "Envío normal Andorra",
"shipto": "AD",
"conditions": "{skus_es_only.conditions} && {cart.free_shipping}!='true'",
"fees": "{table {cart.weight} in 5.0100:5.5100,10.0100:5.5100,15.0100:6.9200,20.0100:8.0000,25.0100:10.4500,30.0100:11.3400,35.0100:11.3400,40.0100:11.3400,45.0100:11.3800,50.0100:12.4100,60.0100:13.4400,70.0100:15.5000,80.0100:17.5700,90.0100:19.3000,100.0100:21.0200,110.0100:22.7500,120.0100:27.0700,130.0100:27.0700,140.0100:31.3900,150.0100:31.3900,160.0100:35.7100,170.0100:35.7100,180.0100:39.0800,190.0100:39.0800,10000.0000:39.0800}"
},
"envio_EU1": {
"label": "Países: AT, BG, CH, CY, CZ, DK, EE, FI, GR, HU, IE, IS, IT, LI, LT, LU, LV, MC, MT, NO, PL, RO, SK, SI, SE",
@paugnu
paugnu / magento2_multiselect.php
Last active April 20, 2017 04:54
Magento 2: Create multiselect product attribute
<?php
['code' => 'code_of_the_attribute',
'attribute_set' => '*',
'label' => 'Concern',
'attribute_group' => 'Extra Content',
'type' => 'text',
'input' => 'multiselect',
'option' => ['values' => [
'Option 1',
@paugnu
paugnu / drop-mysql-tables.sh
Created September 27, 2016 16:47 — forked from ticean/drop-mysql-tables.sh
Shell script to drop all tables from MySQL.
#!/bin/bash
# A shell script to delete / drop all tables from MySQL database.
# Usage: ./script user password dbnane
# Usage: ./script user password dbnane server-ip
# Usage: ./script user password dbnane mysql.nixcraft.in
# -------------------------------------------------------------------------
# Copyright (c) 2008 nixCraft project <http://www.cyberciti.biz/fb/>
# This script is licensed under GNU GPL version 2.0 or above
# -------------------------------------------------------------------------
# This script is part of nixCraft shell script collection (NSSC)
@paugnu
paugnu / mce-table-buttons - tinymce41-table - plugin.js
Last active December 10, 2015 08:40
MCE Table buttons plugin (add custom class field)
/**
* Compiled inline version. (Library mode)
*/
/*jshint smarttabs:true, undef:true, latedef:true, curly:true, bitwise:true, camelcase:true */
/*globals $code */
(function(exports, undefined) {
"use strict";