2009.08.31

Shopify Design Upgrades

By underblob @ 3:24am — Categories: Design, Tech

Shopify is a hosted e-commerce solution that I have been using for a couple years now for clients that want to sell their products online. It is great software with quick setup and really intuitive and easy to use Admin. They offer a variety of pre-canned themes to choose from so a store can be set up in a few hours by anyone. If you know HTML/CSS and aren’t afraid of a little bit of programming, you can also create your own customized themes. So it is a perfect choice for smaller companies without a million dollar budget to hire a web designer to get a custom-branded storefront up on their website.

Shopify just released a whole bag of tricks for theme designers that really extends the flexibility of theme design. Previously, the theme structure was set to a fixed number of templates that could be used in the theme… collections, products, informational pages, etc. They’ve just added the ability to add child templates that you can specify on each product, collection, or page in the Admin. For example, 3 different types of products need to have different visual treatment and layout: shoes, pants, shirts. Instead of trying to jam a bunch of conditions into one product template to make it work, you can create 3 additional templates (product.liquid is the default template):
product.shoes.liquid
product.pants.liquid
product.shirts.liquid

The same type of branching is now available for the entire layout as well using the new layout tag.

This is only one of the great new features that was added in this round of upgrades. Read more about the other just-as-great additions on the Shopify blog: blog.shopify.com/theme-customization-for-everyone


2009.08.12

URL decode PHP with JS — Removing the Plus Sign

By underblob @ 10:00am — Categories: Javascript, LAMP, Tech
Tags: , , , , , ,

PHP functions for creating and decipering URL-safe strings are urlencode and urldecode.

Javascript functions for creating and deciphering URL-safe strings are escape and unescape.

PHP’s urlencode replaces spaces with + and Javascript’s escape replaces spaces with %20. So if you are decocing a string from PHP with Javascript, you have to replace all the + in the string with spaces using the JS string.replace function. Since + is an operator in Javascript, it has to be escaped with a backslash ( \ ) for the function to execute without error. The g flag has to be included to replace all instances of occurance ( g = global):

string.replace ( /\+/g, ' ' );

Links

urlencode
urldecode
escape
unescape
string.replace

2009.08.09

Bay after storm

By underblob @ 2:24pm — Categories: Remote Post

Bay after storm

DSC01482.jpeg

2009.08.05

Crabacon Mango Salad

By underblob @ 5:42pm — Categories: Random
Tags: , ,
  • 1 package artificial crab meat (flake style works best)
  • 3 strips of cooked turkey bacon, chop up
  • 1/2 bunch of cilantro, fine chop
  • 1/2 mango, dice
  • 1/4 juicy lime squeezed juice (1/2 or whole lime if is a dry one)
  • 3 tbsp olive oil mayo

Mix that up in a mix bowl, salt and pepper to taste. Serve on toasted whole grain English muffin or sandwich thin.