Skip to content

Instantly share code, notes, and snippets.

@justindmyers
justindmyers / woocommerce-sage-template-part-overrides.md
Created June 18, 2016 19:55 — forked from drawcard/woocommerce-sage-template-part-overrides.md
Woocommerce - Using template part overrides in Sage

So, you know how to override a template file in Woocommerce using Sage, but you're having trouble changing something within the deeper level of that template file. For example, you want to change the output HTML structure of a given part of the product page loop, or incorporate a Bootstrap class into a button element without using Jquery to inject it. Here's how you can override deeper level parts, the default WC theme elements.

Prerequisites

Now you're familiar with how to do Sage + Woocommerce templates, it's time to make it happen.

The template page override

@justindmyers
justindmyers / server.js
Created January 17, 2016 12:13
https with Ionic
var fs = require('fs');
var httpProxy = require('http-proxy');
var http = require('http');
var https = require('https');
var express = require('express');
var app = express();
app.use(function (req, res, next) {
console.log(req);
if (req.url === '/') {
@justindmyers
justindmyers / CURP and RFC for Mexico
Last active August 10, 2018 14:21
Hard to find regex
# CURP
/\A[A-Z][AEIOUX][A-Z]{2}[0-9]{2}[0-1][0-9][0-3][0-9][MH][A-Z][BCDFGHJKLMNÑPQRSTVWXYZ]{4}[0-9A-Z][0-9]\z/i
# RFC
/\A[A-ZÑ&]{3,4}[0-9]{2}[0-1][0-9][0-3][0-9]([A-Z0-9]{3})?\z/i