Skip to content

Instantly share code, notes, and snippets.

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

Lucas van Staden ProxiBlue

🏠
Working from home
View GitHub Profile
$('form input:text').each(function(index, elem) {
var eId = $(elem).attr('id');
var label = null;
if (eId && (label = $(elem).parents('form').find('label[for='+eId.replace(':', '\\:')+']')).length === 1) {
$(elem).attr('placeholder', $(label).html().replace(/<\/?[^>]+(>|$)/g, ""));
@ProxiBlue
ProxiBlue / fix-url-keys.php
Last active February 19, 2016 15:33 — forked from Vinai/fix-url-keys.php
This fixes the duplicate url_key issue in a Magento 1.8 / 1.13 installation.
<?php
/**
* Drop this into the shell directory in the Magento root and run with -h to see all options.
*/
require_once 'abstract.php';
/**
* Fix duplicate url keys for categories and products to work with the 1.8 alpha1 CE url key constraints.