Skip to content

Instantly share code, notes, and snippets.

View andresams's full-sized avatar
❤️
In a relationship with Magento 2

Andresa Martins andresams

❤️
In a relationship with Magento 2
View GitHub Profile
Rank Type Prefix/Suffix Length
1 Prefix my+ 2
2 Suffix +online 6
3 Prefix the+ 3
4 Suffix +web 3
5 Suffix +media 5
6 Prefix web+ 3
7 Suffix +world 5
8 Suffix +net 3
9 Prefix go+ 2
@KevinMace
KevinMace / RepairDefaultConfigCommand.php
Created January 10, 2018 14:33
Magento 2 console command to find any configuration values missing a default/global value and sets them to null. This is a fix for issue #12097
<?php
/**
* @author Kevin Mace (kevin.mace@sotechnology.co.uk). All rights reserved.
*/
namespace KevinMace\Framework\Console;
use Symfony\Component\Console\Command\Command;
use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Filesystem\DriverPool;
@SearchStar
SearchStar / PHP Eccommerce Tracking.php
Last active May 9, 2021 23:08
Implementing a Google Tag Manager ecommerce data layer with PHP
<?php
$transactionId='test1001';
$sku=array('test1003','test1001','test1002');
$name=array('six1','six2','six3');
$category=array('142139113','161477257','574557754');
$price=array(53.90,9.99,36.36);
$quantity=array(1.00,1.00,1.00);
$transactionAffiliation='affil';
@ceckoslab
ceckoslab / tinydump
Last active July 13, 2021 06:44
Simple PHP script, that creates a dump of Magento DB with smaller footprint ... the script just excludes the data some of the log tables, but keep the the schema of these tables.
<?php
define('DS', DIRECTORY_SEPARATOR);
function _getExtractSchemaStatement($sqlFileName, $db)
{
$dumpSchema = 'mysqldump' . ' ';
$dumpSchema .= '--no-data' . ' ';
$dumpSchema .= '-u ' . $db['user'] . ' ';
$dumpSchema .= '-p' . $db['pass'] . ' ';
$dumpSchema .= '-h ' . $db['host'] . ' ';