Categories
Development

PayPal Buy Now add quantity with HTML

I was working on a project where PayPal Buy Now buttons were being generated by a widget and not allowing the quantity option to be used when a user was making a purchase. PayPal’s button generator does easily allow for quantities to be enabled with simple click, but this wasn’t an option for me in this case.

It was fairly difficult finding the tag to add to enable quantity on checkout, so I figured I’d share in case someone else ran into the same issue. Official documentation was eventually found.

It’s a very basic input that must be included with the form:

<input type="hidden" name="undefined_quantity" value="1">

<input type=”hidden” name=”undefined_quantity” value=”1″>

That’s all, just include that with the form and you’re all set.

Categories
Sports

Dodgeball Week 2

Honey BadgerWeek 2 pitted the noble Honey Badgers against the all boy team of the Banzai Executioners. This week we were allowed to mix a co-ed team to play when their girls were supposed to be playing games. It did level things in terms of fairness, but I felt bad that it meant more sitting out for some of our girls.

We got ourselves into a pretty deep whole early, losing the first several matches. They had a couple of hard throwers on their team, with one guy really launching that ball with some serious heat.

Once we settled down we began to take several games, some in a dominant fashion. I saw us develop some teamwork; coordinating attacks, communicating better, shielding our throwers, etc. It was really great to see us play better as a team. I’m still pretty certain that if we can develop some further chemistry we’ll be able to take down any dodgeball squad.

I did catch a fastball from robo-dodgeball man. I thought this was important to try to do. I wanted everyone to know that he was human and we didn’t have to just duck whenever he unleashed a laser on our side. I was also glad to get a good amount of hits in tonight as well, it’s great feeling when you hear a teammate say, “nice throw”. The whole playing for your teammates is corny be also really gratifying as well.

Afterwards I stopped by Gregory’s with the lady Honey Badgers minus Lauren (apparently she really likes Dancing with the Stars). It was really great to get to know one another better. They all seem to be a really great bunch and I’ve very glad to be on the same team as them.

It was also nice to get carded as well as see jaws drop by my teammates when they learned my age. While I’m not exactly super old, it’s still nice to know that I also don’t look my age either. They were all very funny about it, I did get a little chuckle out of it.

Categories
Sports

Dodgeball Week 1

Honey BadgerThe SJSL dodgeball league kicked off last night, and the Honey Badgers (our team) played 2 games to start the season. Let me start off by saying what a great bunch of teammates we’ve got. We somehow seem to really luck out with getting good people randomly assigned to our team. The 3 “new” girls were fantastic and perfect teammates, really look forward to playing more alongside them.

The first game was against the Terror Squad. They had some hard throwers on both their girl and guy sides. As a team we started pretty slow, but once we settled down and got the hang of the speed and the ball we won a few of the matches.

I personally got off to a pretty lousy start. I don’t think I threw a ball until the 3rd or 4th match. I spent too much time surveying the field and got hit with some pretty easy one’s early on. Once I settled in though, I let out some decent throws.

The Terror Squad won the game, but I could feel our team’s confidence grow as we played more matches. I was really proud of our girls. Lauren and the sisters Caitlin and Meghan were really aggressive running up to the line to get the ball make many throws. Katie and Stephanie played really great too, lot’s of courage on display.

Dodgeball is very tiring. The frantic pace of the games and playing 16 matches per game can really were you out. Our team somehow drew to play 2 games this night. Despite the fatigue, we were ready for our second game (against a fresh team that hadn’t played yet)!

The Lightning Donkeys greeted us for our second game of the night. A very unique aspect of their team is that they have no girls, just guys. So they played a handicapped game of 4 of their guys against our 5 girls. I’m not so sure that this format will be fair as the season goes on, but we’ll see.

Easily the highlight of the night was the first game pitting our 5 girls against 4 of their guys. I can genuinely say that I can’t easily recall a prouder moment than watching our girls play that first game. They were fearless! They sprinted up to the line and played tough the entire game. In an instant classic moment for the ages, we were down to just Caitlin and a few of their guys. Caitlin took them all out! It was amazing, she is truly my hero.

Our guys new settled down and wiser from our earlier game were able to handle their guys for all but one of our matches. I saw some much improved play by Jared and Kevin the iron man didn’t rest a single match last night (I how you still have an arm today).

I felt a lot more comfortable throwing and was pleased to of been able to take out a number of their guys, with a few clinching our victory. I still have to work on staying more alert and not being so reckless on the court, but the season is still earlier. Hopefully their is a Coach Emanski instructional VHS tape on the fundamentals of dodgeball I can watch.

In an ugly moment for the night Katie did get struck perfectly in the face by a very hard throw by one of the Lightning Donkeys. It was a pretty bad scene, she wasn’t at all pleased, but it was clearly an accident. He wasn’t trying to hit anyone in the head, but at the same time their guys didn’t have to throw quite so hard at our girls when they were playing against them.

All in all it was a great night. Big Mike launching some bone crushing throws, Dustin and Geoff with very solid play, great stuff. While a bit hectic at times, dodgeball is really shaping up to be one of the better ideas in a long time.

Honey Badgers don’t care!

Categories
Development

Display WordPress Child Pages as a List of Links

After figuring this one out, it’s really easy to do but I did have a hard time since I didn’t bother to check and see if a specific function already existed to do this behavior.

I wanted to display all the child pages of a Page as an unordered list. I initially tried using the WP_Query function to make this work. I tried creating a loop and feeding it some parameters, but kept getting no results.

Upon some further searching I did come across the wp_list_pages() function. I’m not sure why I didn’t begin with this, but for some reason I was set on using WP_Query.

There’s a ton of parameters and some great examples found on the wp_list_pages() page.

Here’s the little bit of code I added to a template to output the child pages as a list. Notice that the parent page’s id is the 32 that you will see as a parameter below. Enter whatever your parent page’s id is in it’s place.

wp_list_pages('sort_column=menu_order&amp;title_li=&amp;child_of=32');

Doesn’t really get much easier that that.

Categories
Books

Blink: The Power of Thinking Without Thinking

BlinkFigured I’d give something different a shot at the library, so I checked out Blink. It is pretty much about the first 2 seconds of making a decision. It was pretty interesting stuff.

There’s a ton of real world examples and how split second decisions are usually as good and many times better than a well researched decision. The whole simulated battle with the side with all the additional information losing to the less informed one was really interesting. More information means more time to process, and many decisions just don’t have that much time available.

I kept thinking to work where I see areas that need to form a committee to form a committee to evaluate everything, etc. I see it all the time, and usually the result is no decision seems to be made. Perhaps I should recommend this book to some people I know ;-)

Working on the web, and constantly analyzing a users behavior really has a lot of similarities with the Blink theory. It was weird, I felt as though I had read this book before since so much of it has been applied to when I develop things for the web.

Interesting read.

Categories
Books

The Last Boy: Mickey Mantle and the End of America’s Childhood

The Last BoyI figured I’d visit the non-fiction area downstairs in my local library for my next book to read. I happened to stumble over the biographies, and began to scan for someone who might be interesting to me. Being a Yankees fan, and hearing so many different stories about Mickey Mantle over the years I figured I’d give this one a shot.

Though I’ve heard it many times, I must say that after reading this I’m still amazed at how much of a jerk Mantle was through most of his life. The way he treated women, fans, kids, etc. it’s really shocking at times. Granted, just because you can crush a baseball and are idolized doesn’t require you to be perfect, but he just did some very trashy stuff.

It’s very sad to hear of his and his families unfortunate luck throughout life. With the exception of his amazing athletic ability, they really weren’t dealt good health. Unfortunate short lfes seemed to be the Mantle norm.

While the book does cover much of the scummier side of Mantle through the years, it does also do a good job of pointing out what a great teammate he was. He really did give that organization his all (well when he wasn’t showing up to games drunk that is).

This was a very interesting book. However if you grew up idolizing Mantle you might want to consider if you want your childhood hero’s image to be tarnished or not.