Nov |
12 |
The book jQuery in Action is no light reading. It's not the type of book you can read in a couple of sittings. I started reading my copy several months ago. It might easily become one of the best three-to-five computer books I'll read in my life. I am reading the excellent appendix now, titled: JavaScript that you need to know but might not!
Boy did I totally not! I will dump what I am learning here in two installments. Read more →
Oct |
31 |
So I modified my Shovell code to use unobtrusive jQuery. Read more →
Oct |
30 |
Where did time go? Last time I added an entry to my Learning Ruby on Rails journal, it was May 6th. Today is October 30th. There may have been 40 days of learning between then and now. I am back into it — is what matters. Read more →
Oct |
27 |
When I googled how to use jQuery in a Greasemonkey script — a script to run on a web page that already loads some other, conflicting, JavaScript framework, like Prototype — I found no script that worked. Not a fucking one. They all contained very wrong bits, and I wander why they're still published. They're still indexed so that people like me can experience more pain. Here's what I came up with after much labor. I believe it is fail-proof. Read more →
Sep |
01 |
There's a very sweet jQuery plugin that makes it possible to bind event listeners to elements that may not have been added, yet, to the document. Read more →
Aug |
21 |
I received in the mail my pre-ordered copy of Pro Drupal Development Second Edition yesterday.
The book is a brick. 667 pages with the index.
I am a little disappointed already... To be fair, I had high expectations. The treatment JavaScript and Ajax would receive was the first thing I'd look into. Read more →
Apr |
09 |
I’m currently working on a Drupal 6 theming ebook. The beta ebook attached to this posting is for Drupal 5.
— Update, March 29th, 2008.
I am in the process of writing a 50-and-some pages ebook on Drupal theming. I have an outline and a spiral book full of notes, and lots of sections are already written. My current draft (call that a beta-book) is 15 pages long and if you log in you may download it. Read more →
Sep |
26 |
Although we will want the browser to execute our JavaScript code on product pages only, we will not add our JavaScript code to product.liquid. We could, but we prefer to add all JavaScript to the head element of the document — where we can find all code in a snap, even when tired and confused. Read more →
Sep |
26 |
I will be using the jQuery library in this tutorial, but use any JavaScript library you know and love. Read more →
Sep |
25 |
The goal of this tutorial is to show how to “descramble” a long list of variants in Shopify using JavaScript.
The code will work for any number of variants. It will also work for any number of categories of variants. For example, you could sell a pen with these three categories of “variation”: quantity, precision in points (fine, extra-fine, etc.), and color. Other products you sell may hold a different list of options for quantity, type and color — and that's all good. Some other products may have different categories of variants altogether, or just more categories. Still all good. The code will actually parse through the variants titles and create select elements based on what is available on a per-product basis.
The following is not a screenshot. Pick something.
Hard to find anything in there. JavaScript will simplify that.
We want to present visitors with one drop-down select box per hard attribute your product has (for example, one for quantity, and one for color...). By hard attribute, I mean an attribute that justifies the creation of Shopify variants — any attribute that affects pricing. In our little example case, we assume that the color does affect pricing. But it is also possible to add to the mix a pure JavaScript attribute for color, as I explain in this other tutorial.
Here is a way to select a variant that is much easier on the eye:
This method uses JavaScript and is cosmetic. With JavaScript disabled in the browser, your visitors will still be able to pick any variant they want but will need to locate it in your list. If you do have a long list of variants, this tutorial may prove useful. If not... what are you doing here? ;-)