Skip to content

Instantly share code, notes, and snippets.

View josephmcdermott's full-sized avatar

Joseph McDermott josephmcdermott

View GitHub Profile
@josephmcdermott
josephmcdermott / _extend.less
Created September 13, 2018 15:31
CSS skeleton structure for Magento 2 Responsive LESS Theme
// Import variables globally
@import "_variables_extend";
// Mobile-first / Common styles
& when (@media-common = true) {
@import "vendor/bootstrap/3.3/bootstrap";
@import "vendor/font-awesome/5.0/fontawesome";
@import "_common/_header";
@import "_common/_footer";
@import "_common/_cms";
@josephmcdermott
josephmcdermott / Post.php
Created February 22, 2017 18:15
Magento2 add customer name to Contact Form Reply-To header
# path/to/your/Post.php
<?php
class Post extends \Magento\Contact\Controller\Index
{
public function execute()
{
...
->setFrom($this->scopeConfig->getValue(self::XML_PATH_EMAIL_SENDER, $storeScope))
@josephmcdermott
josephmcdermott / SystemConfigSource.php
Last active September 15, 2015 13:47
Magento System Configuration option
<?php
class Namespace_Module_Model_System_Config_NameOfOption
{
const MODE_ONE = 'one';
const MODE_TWO = 'two';
/**
* @return array
* @author Joseph McDermott <code@josephmcdermott.co.uk>
*/
@josephmcdermott
josephmcdermott / my.ini
Created August 26, 2015 14:25
General error: 2006 MySQL server has gone away
Increase value of MySQL setting:
[mysqld]
wait_timeout = 60
@josephmcdermott
josephmcdermott / !magento1-remove-carrier-title
Last active August 29, 2015 14:25
Magento1: Remove the 'carrier' from shipping description
Remove the carrier title from the Magento shipping method description
- from: Shipping & Handling (Carrier Title - Method Title)
- to: Shipping & Handling (Method Title)
@josephmcdermott
josephmcdermott / test.php
Last active August 29, 2015 14:10
Just testing
<?php
echo "hello world!";