Skip to content

Instantly share code, notes, and snippets.

Wayne Roddy dubrod

  • MODX
  • Inverness, FL
Block or report user

Report or block dubrod

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dubrod
dubrod / Magento Advanced Import Dataflow SQL Database
Last active Dec 17, 2015
Here I have exported my Magento Advanced Import Dataflow Empty SQL Database. I wrote a PHP application to take values from various sources to create this master sheet. I then exported as csv and imported with no problems using the System->Import->Advanced Dataflows inside Magento
View Magento Advanced Import Dataflow SQL Database
CREATE TABLE `master` (
`mst_id` int(100) NOT NULL AUTO_INCREMENT,
`store` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`websites` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`attribute_set` varchar(75) COLLATE utf8_unicode_ci NOT NULL,
`type` varchar(75) COLLATE utf8_unicode_ci NOT NULL,
`category_ids` int(50) NOT NULL,
`sku` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`has_options` int(50) NOT NULL,
`name` varchar(300) COLLATE utf8_unicode_ci NOT NULL,
@dubrod
dubrod / Magento Custom XML Sitemap Creator
Created May 15, 2013
Get Collections for products, categories, and pages. Filter them, use any custom PHP you like and create an XML file. Couldn't find it so I built it. Very useful for carts that only have configurable "main" products and don't want all the bits and pieces "simple products" showing in the sitemap. 1. create a my_sitemap.xml to be overwritten. 2. K…
View Magento Custom XML Sitemap Creator
<?php
/* Compilation includes configuration file */
define('MAGENTO_ROOT', getcwd());
$compilerConfig = MAGENTO_ROOT . '/includes/config.php';
if (file_exists($compilerConfig)) {
include $compilerConfig;
}
$mageFilename = MAGENTO_ROOT . '/app/Mage.php';
@dubrod
dubrod / Using Radio Buttons on Color Selector Plus for Magento
Last active Feb 19, 2018
Configurable.phtml File for Magento that will switch SELECT to RADIO Buttons. Some customization required. This is not an automated extension but rather a hack. Working on a live site and tested on Magento 1.7 -- Full Instructions will be available on our blog, http://www.revitalagency.com/blog This file is at: template/colorselectorplus/catalog…
View Using Radio Buttons on Color Selector Plus for Magento
<?php
$_product = $this->getProduct();
$_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes());
$swatch_attributes = Mage::helper('colorselectorplus')->getSwatchAttributes();
$title = Mage::getStoreConfig('color_selector_plus/colorselectorplusgeneral/title', Mage::app()->getStore());
$hide = Mage::getStoreConfig('color_selector_plus/colorselectorplusgeneral/hidedropdown', Mage::app()->getStore());
?>
<?php if ($_product->isSaleable() && count($_attributes)): ?>
<dl>
View Run a PHP or jQuery Function after jQuery UI Dialog Confirmation
<script>
$(function() {
//run function after jquery dialong confirm
//step 1 - the action
$(".deleteBtn").click(function(e) {
e.preventDefault();
pid = $(this).attr("title"); // the id of the photo i want to delete
//console.log($(this).attr("title")); // check you get it first
@dubrod
dubrod / jQuery Over 21 Dialog Checker
Last active Jan 25, 2016
Completely jQuery Over 21 Dialog Check
View jQuery Over 21 Dialog Checker
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Over 21 script</title>
<style type="text/css">
#ageCheckWrapper{
@dubrod
dubrod / Call Google Geocoding API with jQuery
Created Aug 30, 2013
Call the Google Geocoding API with jQuery. Get the formatted address, the LAT & LONG, the County, all the official google map data for an address.
View Call Google Geocoding API with jQuery
<label>Street Address #: <small>123</small></label><br>
<input type="text" id="stAddNum"><br>
<label>Street Address Name: <small>Elm</small></label><br>
<input type="text" id="stAdd"><br>
<label>Address Type: <small>St, Ave, Ln, Rd, etc</small></label><br>
<input type="text" id="stAddPrefix"><br>
<label>City: </label><br>
<input type="text" id="city"><br>
<label>State: <small>Abbreviation</small></label><br>
<input type="text" id="state"><br>
@dubrod
dubrod / zap-banner-engine
Last active Aug 29, 2015
Zap Banner Engine
View zap-banner-engine
<?php
//BOOSTRAP FILE CODE
//ZAP Banner Engine
include_once('zap.banner.engine.php');
$ZAP_banner_engine = new ZAP_banner_engine;
$banner_html = $ZAP_banner_engine->get_unseen();
?>
<?php
@dubrod
dubrod / jquery-device-detect
Created Jun 17, 2014
jQuery Device Detect via User Agent
View jquery-device-detect
//touch/mobile detection
if (
navigator.userAgent.match(/Phone/i) ||
navigator.userAgent.match(/DROID/i) ||
navigator.userAgent.match(/Android/i) ||
navigator.userAgent.match(/webOS/i) ||
navigator.userAgent.match(/iPhone/i) ||
navigator.userAgent.match(/iPod/i) ||
navigator.userAgent.match(/BlackBerry/) ||
navigator.userAgent.match(/Windows Phone/i) ||
@dubrod
dubrod / gist:3e6276350bd5ee27f232
Created Dec 14, 2015
Firebase DB to Static File for React JS
View gist:3e6276350bd5ee27f232
// first you have included your FireBase client JS
var leaguesNode = new Firebase("https://XXXX.firebaseio.com/Leagues");
jsonLeagues = '{"leagues": []}';
leaguesNode.once("value", function(snapshot) {
snapshot.forEach(function(childSnapshot) {
var key = childSnapshot.key();
var val = childSnapshot.val();
@dubrod
dubrod / Commonly Used MODX Head Tags
Last active Jan 7, 2019
Commonly Used MODX Head Tags for use in my Public Snapshots
View Commonly Used MODX Head Tags
<title>[[*pagetitle]]</title>
<title>[[*longtitle:default=`[[*pagetitle]]`]]</title>
<meta name="description" content="[[*description]]">
<meta name="keywords" content="[[*keywords]]">
<meta itemprop="url" content="[[~[[*id? &scheme=`full`]]]]">
<meta itemprop="name headline" content="[[*pagetitle]]">
<meta itemprop="description" content="[[*description]]">
<meta itemprop="image" content="">
<!-- Twitter -->
You can’t perform that action at this time.