Posts

Showing posts from February, 2015

My Silly Quotes and Stupid Jokes Collection

--------------------- Feb 15, 2015 -------------------------------
My Building Permit:
Some have asked what I've been doing in retirement.
Well, I applied for a building permit for a new house.
It was going to be 100 ft tall and 400 ft wide,
With 12 gun turrets at various heights, and windows
All over the place and a loud outside entertainment sound system.
It would have parking for 200 cars, and I was going to paint it
Snot green with pink trim. The City Council told me
“Forget it...AIN'T GONNA HAPPEN!”
So, I sent in the application again, but this time I called it a "Mosque."
Work starts on Monday. And here is the best part, it's going to be tax exempt! I love this country.
It’s the government that scares the shit out of me.

-------------------- Feb 23, 2015 --------------------------------
We had a guy walking his Magellanic penguin down the side walk in town.   When the police chief saw him, he told him not to walk the penguin there, but take it to the zoo.  The …

The Magento Cookbook and Tricks Bag

Stupid tricks that you can do using PHP in the Magento CE backend:

1) Search the Product Catalog
function getProductIdsBySearch($searchstring, $storeId =''){ $ids = array();// Code to Search Product by $searchstring and get Product IDs $product_collection =Mage::getResourceModel('catalog/product_collection')->addAttributeToSelect('*')->addAttributeToFilter('name', array('like'=>'%'.$searchstring.'%'))->load();foreach($product_collection as $product){ $ids[]= $product->getId();}//return array of product idsreturn $ids;} Magento 1.7+ Source: StackOverflow


2) Find an image in a product

3) Automatic Color Swatches for Products with different colors, each being their own product
Search the product catalog for items with the exact same name, find the image called 'swatch' then show the color swatches in a little div in the product page. Put this code in your theme's view.phtml page:
in:  &qu…