Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Adam Moss adampmoss

🏠
Working from home
View GitHub Profile
@adampmoss
adampmoss / funtions.php
Created Jul 26, 2019
WooCommerce - check cart before adding item and fail validation if certain items exist
View funtions.php
<?php
/**************************************************************************
* CART VALIDATION FOR GOURMET / PACKAGES
*/
/**
* This function loops through cart items to see if
* there are ANY packages in it
*
@adampmoss
adampmoss / gulpfile.js
Last active Sep 4, 2015
Magento gulpfile.js Boilerplate
View gulpfile.js
/****************************
*
* 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 / magento-logo-schema.php
Created Jan 10, 2014
Magento Logo with Schema
View magento-logo-schema.php
<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 / 0_reuse_code.js
Created Oct 17, 2013
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@adampmoss
adampmoss / local.xml
Last active Apr 3, 2018
Magento local.xml Boilerplate
View local.xml
<?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"/>
You can’t perform that action at this time.