Skip to content

Instantly share code, notes, and snippets.

View adampmoss's full-sized avatar
🏠
Working from home

Adam Moss adampmoss

🏠
Working from home
View GitHub Profile
@adampmoss
adampmoss / gulpfile.js
Last active September 4, 2015 14:53
Magento gulpfile.js Boilerplate
/****************************
*
* Boilerplate gulpfile.js for custom Magento 1.9+ theme development
* Authors: Adam Moss / Dan Long
*
* Suggested Theme Contents & Structure:
* /css
* /images
* /js
* /js/lib
@adampmoss
adampmoss / 0_reuse_code.js
Created October 17, 2013 10:20
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@adampmoss
adampmoss / magento-logo-schema.php
Created January 10, 2014 16:07
Magento Logo with Schema
<div itemscope itemtype="http://schema.org/Organization">
<a itemprop="url" href="<?php echo $this->getUrl('') ?>">
<img itemprop="logo" src="<?php echo $this->getLogoSrc() ?>" alt="<?php echo $this->getLogoAlt() ?>" />
</a>
</div>
@adampmoss
adampmoss / local.xml
Last active April 3, 2018 22:41
Magento local.xml Boilerplate
<?xml version="1.0" encoding="UTF-8"?>
<layout>
<!-- ############# GLOBAL LAYOUT UPDATES ############# -->
<default>
<!-- Remove unwanted blocks entirely
<remove name="right.poll"/>
<remove name="right.permanent.callout"/>
@adampmoss
adampmoss / funtions.php
Created July 26, 2019 13:51
WooCommerce - check cart before adding item and fail validation if certain items exist
<?php
/**************************************************************************
* CART VALIDATION FOR GOURMET / PACKAGES
*/
/**
* This function loops through cart items to see if
* there are ANY packages in it
*