sim.plified.com

Chris Pollock

Chris Pollock - web developer & ecommerce entrepreneur
undivided… my thoughts on world, family, church, business, technology and Jesus Christ (all in all)

Make DOMPDF work with Magento

I’m currently working on a project where I wanted to use DOMPDF to export html from magento.  With some help from some folks who got DOMPDF to work with Zend I was able to get it working with Magneto.

Step 1

Copy the dompdf folder to the lib directory of your magento install.

Step 2

Edit app/Mage.php to include the following code

include_once 'dompdf/dompdf_config.inc.php';
spl_autoload_register('DOMPDF_autoload');

This goes around line 52 inside the else statement right after

 include_once "Varien/Autoload.php";

Step 3

Use the code.  Here’s an example of what I  am doing inside on of my custom contollers

public function printAction(){
        
        
        if ($quote = $this->_iniQuote()) {
            
            $html = $this->getLayout()->createBlock('crm/quotes_print')->toHtml();
            
            $dompdf = new DOMPDF();
            $dompdf->load_html($html);
            $dompdf->render();
            $dompdf->stream("sample.pdf");
            
         }
        
    }

Basically that’s it.  Pretty straight forward and seems to work like a charm.

NOTE:  This was done using DOMPDF 0.6.0 beta1 and Magneto 1.4.0.1

[ Leave a Comment ]

DIY Portable Kid’s Climbing Wall

I have 5 boys, so needless to say there’s a lot of activity in our house.  Our 2nd son is by far the most active (at the moment anyhow) and Amy and I couldn’t resist buying him some rock climbing holds for his birthday.  Originally I was going to mount them on the back of our garage, or outside somewhere, but the other night the idea came to me.  Use some wood I had lying around to build an indoor climbing wall for the basement.  I literally thought of this and built it the next day.  The kids helped and within a matter of hours they were climbing away and having a great time!

Caleb's Climbing Wall

Here’s the finished product.

Idea

The ideas was to use two pieces of plywood I had lying around to make a triangle structure. The more I thought, the more refined the idea.  Using bolts to connect the wood accomplished a couple of things.

  1. Theoretically I could change the board length at the top and bottom to change the angle of the unit and make it steeper or easier.
  2. The bolts make the whole unit disassemble into a fairly portable unit.  This is great if you want to take it outside, take it to a family runion or just stow it away when not in use.

Another port of the idea was to attach indoor/outdoor carpeting.  This protected the kids from splinters (it was really rough plywood) and makes it a little more weather proof if I take it outside (If I take it outside I would also paint the side boards because they are not pressure treated.

If you build something like this I hope you’ll use your own creativity to improve the idea.

Parts List

  • 40 Climbing holds from EMS
  • 2pc.  4 x 8 plywood (I used B Grade)
  • 2×4 lumber – various lengths depending on the size of your unit
  • 4×4 lumber – for the base
  • 4pc. 4” Galvanized 1/2” Bolts
  • 4pc.  6'” Galvanized 1/2” Bolts
  • 16pc. 1/2” Galvanized Washers
  • 8pc. 1/2” Galvanized Nuts
  • 6’ x 8’ section of indoor/outdoor carpet
  • 8’ Poly Rope

 

Step 1: Build the Frames

Caleb's Climbing Wall

  • The frames are made of 2×4 lumber.  My wall was going to be about 5-1/2’ tall so I cut my 2x4s just a couple inches longer. 
  • I used a jig saw to round the ends of the height boards.  That allowed the unit to be pivoted and got rid of sharp edges when the kids were climbing.
  • I screwed the whole thing together with 2-1/2” in screws. 
  • I spaced the cross supports about 6” from either end.  A little bit longer on the top.Make sure you measure from one end.  Because the rounding of the he 2x4s will make them uneven, you don’t want to measure from both sides.

 

Step 2 – Cut and Drill the Support Lumber

Caleb's Climbing Wall

  • On the top I simply used some of the remnant 2×4 to create the connection points.
  • On the bottom I used some old 4×4 lumber that was lying around in the backyard.  This gives a nice solid base and also some durability if I do place it outside.

 

Step 3 – Drilling the Holes

  • This was hardest part of the project.  if the holes are off then the unit will not hinge properly.  In the end I basically made my holes on center in the 2×4 lumber.  So for instance a 2×4 is 3-1/2” wide.  So I centered my holes at 1-3/4” from the sizdes and ends. 
  • On the bottom I centered my holes more toward the top of the 4×4 so that only the 4x4s are touching the ground.

Caleb's Climbing Wall

Caleb's Climbing Wall

 

Step 4 – Test Fit

Once the holes are drilled then you can test fit the structure by inserting the bolts.  Everything should come together nicely.  If it doesn’t make your adjustments now before you mount the plywood

 

Step 5 – Attach Plywood

Caleb's Climbing Wall

Caleb's Climbing Wall

  • I cut my plywood down to about 5-1/2” feet.
  • I attached all over the frame using 2” decking screws.  If you built your frames correctly it should mount perfectly
  • I left a little bit of room at both ends so that the 2x4s just peak out on either side of the unit – this allows the carpeting to be tucked under the unit.

 

Step 6 – Attach the Carpet

  • I got some indoor outdoor carpet.  This stuff is really inexpensive and gives the climbing wall a very nice finish.
  • I cut the carpet to be a little longer so that it could be wrapped around the ends.
  • Glue the carpet down with some adhesive and then staple the carpet on the “bottom” of the plywood. 

 

Step 7 – Layout and Attach the Climbing Holds

  • I am no expert at climbing layouts, so we basically laid them out in a way that made sense for small guys. 
  • After laying them out, the boys and I screwed them down.

Caleb's Climbing Wall

Caleb's Climbing Wall

Caleb's Climbing Wall

 

Step 8 – Assemble and Finishing Touches

  • Once the glue has dried (the label says 24 hours, but my boys were not going to wait that long) then attach the top with 4” Galvanized 1/2'” bolts
  • Connect the bottom with 6” Galvanized 1/2” bolts
  • When talking this over with a friend, we talked about the possible need for an additional support to fix the angle.  After tightening down the bolts, I saw no need to to add the additional supports, but depending on your angle and and lumber its something you might want to consider.
  • To finish it off I attached poly rope by drilling a hole into one of the supporting 2x4s to add some interest and variety to the climbing. 

Caleb's Climbing Wall

 

Let the Fun Begin

Caleb's Climbing WallCaleb's Climbing WallCaleb's Climbing WallCaleb's Climbing WallCaleb's Climbing WallCaleb's Climbing WallCaleb's Climbing Wall

[ Leave a Comment ]

You have how many children???

We by no means have a lot of children by historical standards, but according to our current culture standards the reactions we get are quite the opposite. One of my little jokes when people remark about how many children we have, I say that I'm just making up for all the people who are not having children. Well it turns out that my joke is really no joke at all. Here's a short video on a stable population.

[ Leave a Comment ]

Yes this really happened…

Just a few minutes ago I was visiting a site looking for Canadian proxy addresses so I could test my country specific detection script. The moment I opened the proxy page my mouse started flying all over my screen. I thought my computer had been infected with some sort of screen sharing virus and immediately set to work at shutting down the computer.

Just then my wife walked up and saw the look on my face. I told her what happened and she had an idea. She went downstairs and came back up to report: my six year old was playing with my bluetooth mouse 🙂

Kind of coincidence of timing! But I'm glad my computer can't be hijacked just by opening a web page 🙂

Moral of the story: Keep track of your bluetooth mouse!

[ Leave a Comment ]

Transition to Mac NOT going as well as had expected

I hope this attempted transition to MAC doesn’t end in tragedy, but it looks like its heading that way fast…

  • MS Excel 2008 maxes processor
  • Cannot drag and drop files into Dreamweaver file manger
  • Lack of any “finder” based SVN client (e.g. such as tortoise SVN)
  • Lack of blogging software that holds a candle to MS Live Writer (come on! this is a Microsoft product)
  • MAC Skype client doesn’t support multi video
  • Have to pay for a lot of programs I got via open source before.

Yes there are some things I like, but I’m afraid that this list is only going to continue to grow. 

Update After this momentary crisis I didn't just ditch the MAC. I kept with it and am enjoying it more and more.

[ Leave a Comment ]

Idea For Power Companies. Offer Something Different

A couple of weeks ago I was accosted on my front step by a power company that wanted me to switch. I was called a liar and a thief by an ignorant rep who didn't know what a spreadsheet was (honestly I felt bad for her). They basically wanted to get my business by offering a fractional of a percent in savings while still offering me the same fundamental service. This is one of those areas where competition in the free market does not seem to be working.

Here's an idea for a bright young power company out there. How about offing something different. How about moving things in the direction of the smart grid by offering me a device to allow me to track my power usage or better yet allow me to control certain parts of my home electricity usage via a web accessible control panel. This would be something. This would be a reason to switch.

There it is power companies. Have a think on it.

[ Leave a Comment ]

It’s Official… I’m converting… to Mac

Looks like it’s official, I’m converting over to Mac.  After working in the field of web development for over 5 years now, I think it’s time to make the switch and see how things work out.  I’m looking for software recommendations for the following:

  • SSH
  • SSH private key handling
  • SFTP
  • S3 access program
  • Zip file manager
  • HTTP watch program (like fiddler)
  • Auto Hot Key
  • Best integration program for running windows only programs
  • IDE programs

Looking forward to recommendations on these and anything else you want to toss my way.

[ Leave a Comment ]

You know you’ve risen in the industry when…

You can call me Mr. Kee Klamp

You can call me Mr. Kee Klamp.

PS > Google’s new image search is pretty stinking cool!

[ Leave a Comment ]

Simplified Building enters a New Era

image

You haven’t heard much from me over the past couple of months, and that’s because our flag ship web site, Simplified Building Concepts has undergone a complete overhaul.  Last year I release Simplified Safety, my first foray into Merging Magento and Expression Engine.  Simplified Building is the next generation of that project.

Hopefully I’ll be getting some time over the next couple of weeks to blog about some of the adventure. 

[ Leave a Comment ]

Too Awesome Not to Share: Adobe offers Edu Pricing to Homeschoolers

My good friend Jay brought this fact to my attention via facebook.  Adobe offers educational pricing to homeschooling parents.  Here’s what you need to verify:

Home Schooling

Those who are home schooling must provide a valid photo ID, and a copy of one of the following:

  • Letter of intent to home school addressed to local school district for current school year
  • Home School Legal Defense Association membership card
  • Home School Charter School membership card
  • Book/curriculum receipt for the current year

http://kb2.adobe.com/cps/000/25f26dd.html#what_forms_of_ID

If you like Adobe products and you’re a homeschooling parent take advantage of this great offer.

[ Leave a Comment ]

Things I see

Day 2: the back yard is swarming with fluffy tailed rodents. The boys are delighted. There is ample GoPro footage of inquisitive squirrel faces. Caleb was even hand feeding. #lifewithboysOwl pellet dissection is an interesting experience!! It was almost like archaeology, but different in the “this was puked up by a bird” kind of way :stuck_out_tongue:. #lifewithboys #owlbranddiscoverykits #biologyDoes baiting squirrels with Cheerios and observing their behavior count as biology? We are studying mammals after all. :smile:#citysquirrels #lifewithboys #backyardwildlifePhotoSushi for 9 courtesy of @amylpollockSomewhere, deep down inside, I’m thankful that they can cook their own breakfast:raised_hands:. But parenting is filled with such conflicting emotions. :yum: #lifewithboys #cleanupyourmess #wafflesShearing my sheep today :sheep:! #lifewithboys #This is for my friends who don’t live in upstate ny #snowCaleb’s birthday lunch. Now I have two teenagersBeautiful upstate NY #home#Repost @andrewpetersonmusic ・・・ The Burning Edge of Dawn is on sale for $5.99 through this Thursday, anywhere you buy music online!Classic PhotoDinner with the Jobs :grinning:Worn down by the world.

Chris Pollock

Web Developer - proficient in both PHP and ASP.NET.
Rochester, New York

View my web developement site.

View Chris Pollock's LinkedIn profile

My Pictures

Day 2: the back yard is swarming with fluffy tailed rodents. The boys are delighted. There is ample GoPro footage of inquisitive squirrel faces. Caleb was even hand feeding. #lifewithboysOwl pellet dissection is an interesting experience!! It was almost like archaeology, but different in the “this was puked up by a bird” kind of way :stuck_out_tongue:. #lifewithboys #owlbranddiscoverykits #biologyDoes baiting squirrels with Cheerios and observing their behavior count as biology? We are studying mammals after all. :smile:#citysquirrels #lifewithboys #backyardwildlifePhotoSushi for 9 courtesy of @amylpollockSomewhere, deep down inside, I’m thankful that they can cook their own breakfast:raised_hands:. But parenting is filled with such conflicting emotions. :yum: #lifewithboys #cleanupyourmess #wafflesShearing my sheep today :sheep:! #lifewithboys #This is for my friends who don’t live in upstate ny #snowCaleb’s birthday lunch. Now I have two teenagersBeautiful upstate NY #home#Repost @andrewpetersonmusic ・・・ The Burning Edge of Dawn is on sale for $5.99 through this Thursday, anywhere you buy music online!Classic PhotoDinner with the Jobs :grinning:Worn down by the world.