I’ve just added (the beginnings of) a new feature to YAK (user-funded development) that will probably only be useful to one or two users — but it’s worth mentioning anyway.

[yak_get_remote...] is a new tag which can be used in a product post. This allows you to set up a store on one blog, then use the products (posts) on another. The basic idea is that you can have a central store with all your products, then separate (smaller) sites which pull in specific relevant products. When you click the buy button on the smaller site you are, of course, redirected to the central store.

There are 2 fundamental limitations:

1. it currently only works with libcurl (thus your PHP install must have curl enabled)
2. there is no way (at the moment) to redirect back to the original site. For example, the central store might be setup on site A, and 2 or 3 specific products linked on site B. A customer clicks the buy button on a product in site B, and is redirected to the shopping cart on A. At which point the cart should present a link to return the customer to the calling page.

Usage of the new function will be as follows:

1. On the Yak->Settings, under the Advanced tab, set a remote server and path. For example:

http://myserver.com
/myblog

2. In a post, use the tag: [yak_get_remote_n] where n is the id of the post in the remote store. For example:

[yak_get_remote_9]

Which will embed the content of post #9.

The new functionality does point toward a necessity for affiliate functionality (as briefly mentioned here) — but that’s a much larger effort that may need to wait. The new tag is currently in the repository, and will appear in the next release of YAK.

This post is to capture (in one place) a number of features (and thoughts around those features) that have been suggested for future versions for YAK, both via email, and on the Suggestions page. It may also spark further discussion. Presented in no particular order:

  • Affiliates program - setup affiliates in YAK settings (select from registered users), then affiliates would be able to login to your WP admin panel and view their progress, perhaps setup keywords to manage a campaign? Not sure here. I favour a simple approach as much as possible, but it very much depends on whether a simple approach provides any value. This is probably one of those features that might have to wait until someone wants to fund the development, because it’s only a real user who’s going to come up with something that actually might be useful in the real world.
  • Better address configuration — which fields should be included, how they should be labelled (over and above the i18n labelling). Which leads onto…
  • Better WP integration — a registered user could enter their address, and this would be used when ordering. Which, as a by-product, should mean that a user could login and see their order details (i.e. order tracking).
  • Multiple shipping options — at the very least provide for a configurable number of shipping options. Better yet, provide hooks for alternative shipping engines.
  • Tax Calculation — calculating the Infernal Revenue Services’ cut of your sales isn’t something YAK does at all, at the moment, which has been a problem for some. At the very least, a simple tax calculation engine would allow you to specify a tax percentage for a country (have to add states, for the United States and Australia), but would this be enough? Feedback sort on this particular possibility.
  • Workflow — at the moment we have “Send Stock”, “Cancel Order” and “Reset”. Are those enough? I started an email discussion with a user about a year ago about workflow, but they never replied after an initial couple of messages.
  • Order filtering — the ability to specify date ranges, display today’s orders by default, etc (suggestions?)
  • Product filtering — at the very least, a pick list of the alphabet for filtering at the top
  • Export — csv(?) export of your orders, your customers, and perhaps your product list. The latter may not be necessary, if I come up with something reasonable in terms of an xml feed for products.
  • Wordpress MU compatibility — only if I find a step-by-step installation guide that’s any good…
  • Cart widget — display the current basket contents (summary) on the page.
  • More download options — one request has been to allow for a configurable email to be sent out (rather than a download link). I was also thinking about tokens for support activities (i.e. buy a support token), which lead me onto the idea of creating a semi-secure sub-page of the download product (in this case a “support product”) where customer and technician can discuss the job. Useful for me, and at least one other user I’ve talked to, but it’s a fairly limited domain, so not sure about adding it as a core feature.
  • Checkout navigation breadcrumbs (suggested by Chris). Fairly easy to add, so this will go up the priority list.
  • Related products — “other products you may be interested in” (again suggested by Chris). Displayed when a customer adds to their basket.
  • Additional gateways — one of authorise.net or PayPal Payments Pro integration. And fix Google Checkout so that we have end-to-end integration.
  • SKU — I added product code quite a while ago, intending to use it for SKU, but it doesn’t make sense in light of multiple product types (one product with multiple types will have multiple SKUs). Adding SKU support also means adding the facility to search by SKU with a suitably nice URL (obviously time to brush up those mod rewrite skillz).
  • Rewrite! Tidy up the codebase. Or start again with lessons learned from the past couple of years, and spend more time in the WP codebase to make sure YAK is consistent. This will happen once I win the lottery (considering I buy a lottery ticket about once every 1-3 years, calculate the probability for yourself ;-) )

And some additional stuff (not specifically related to development):

  • Add discussion forums and move all the comments into the forums. I tried to do this before, but probably could’ve done it better, so might be worth trying again. Having 450 comments in General discussion is getting rather unwieldy.
  • Site redesign — easier if WP properly supported multiple themes

I think that’s pretty much it. If there’s something I’ve missed that you think should be in this list, please leave a comment here. If anyone wants to fund development on one or more of these items, send me an email to discuss, otherwise you’ll have to wait until they trickle in over time.

I’ve been looking at providing a basic xml product feed through YAK (needed for some rather esoteric customer requirements) — at the experimental stage, rather than a feature that will actually make it into development or release. I cast around for some standardised XML formats, and hazy recollection (thanks TOGAF) popped ARTS into my head. ARTS is the Association for Retail Technology Standards (developed by the National Retail Federation — NRF’s byline is “The Voice of Retail Worldwide”. Not to be petty, but wouldn’t International Retail Federation be a better name if you’re talking global?) and they publish a bunch of schemas which I figured may be useful — particularly their inventory schema. Why come up with my own format, when I can use the work of someone else?

Unless, of course, the work of “someone else” amounts to a half-meg schema file.

Now, my spider senses start tingling if I come across a single schema file that’s over a few 100 kilobytes, but Netbeans gets it’s knickers in a right proper twist if you try to generate sample xml from this epic monstrosity. 289MB generated before I managed to kill the process.

And oh, what an xml. I don’t think separation of concerns was a primary, secondary or even tertiary thought for whoever sat down with tool in hand to design this particular ’standard’. If a simple type named ActionCommonDataTypeCodesEnumeration isn’t worrying enough, the fact that it contains terms such as Begin, Cancel, Complete, Create, Delete, Dispatch, Lookup, Initiate, Instruction, Information, PartialCancel, PartialComplete, Read, Request, Update, and so on, hurts the back of my brain.
Let’s not get started on PriceCommonData, UnitPriceCommonData, and the myriad other CommonDatas littered through the document. Ack. Aching brain.

Okay, yes, I’m not the target audience, and I haven’t paid the US$149 for the documentation, so I may be reading more into the schema than I probably should, but if I look at it through even slightly REST-tinted glasses, it frankly gives me the heebie-jeebies.

Suffice it to say that I will probably not be using ARTS’ inventory.xsd for my, much simpler, requirements. I may indeed roll my own, but happy to entertain suggestions if someone has a better idea.

…goes to Roy Fielding for the excellent:

That is RPC. It screams RPC. There is so much coupling on display that it should be given an X rating

I don’t like Excel much either. The lack of VBA macro support means it’s useless for the purpose I originally bought it for — teach me to not double-check the specs before I buy.

Worse yet, Word appears to no longer support Thai language — meaning it’s not fit-for-purpose for my wife either. Unfortunately, we left the Office 2003 disk in storage, back in NZ, so we can’t rollback to the version of Office that did support Thai language.

Exactly why is Office such a cash cow for Microsoft? Because of muppets like me, obviously.

Installing MySQLdb on a Mac is slightly more challenging than expected. It seems like it’s easy enough if you go down the dmg install route; however, I decided to save some time and install the s/w stack I needed using MAMP. Which really is a brilliant time-saver… but not when it comes time to get Python and MySQL talking to each other.

I had a number of problems, some of which are documented here, and starting with this thread here. However, the final clue came from this post. I’ve differed slightly from his solution, basically performing the following steps:

1. install MySQL using MacPorts.

2. copy the libmysqlclient_r dylibs from the mysql dir to the MAMP lib dir, with something like:

cp /opt/local/lib/mysql5/mysql/libmysqlclient_r*dylib /Applications/MAMP/Library/lib/mysql/

3. run the build for MySQLdb (python setup.py build). The final step fails, but you can re-run the GCC command to remove the wrong architecture (-arch) option. In my case, it unnecessarily added -arch ppc. So my final gcc exec is:

gcc -Wl,-F. -bundle -undefined dynamic_lookup -arch i386 build/temp.macosx-10.5-i386-2.5/_mysql.o -L/opt/local/lib -L/opt/local/lib/mysql5/mysql -L/opt/local/lib -L/opt/local/lib -lmysqlclient_r -lz -lm -lssl -lcrypto -o build/lib.macosx-10.5-i386-2.5/_mysql.so

4. create a dir in /Library/Python/2.5/site-packages called MySQLdb and copy the contents of build/lib.macosx-10.5-i386-2.5/ and build/lib.macosx-10.5-i386-2.5/MySQLdb into it.

With any luck you should now be able to connect to the MAMP install of MySQL through Python.

Well, not quite epic. But I certainly managed to make a mess of this last release.

If you’ve downloaded version 1.1.2 of YAK, please try again with 1.1.3. There was a slight problem with the promotion code, calculating percentage-based pricing discount when integrating with PayPal or Google Checkout.

One of the more frequently asked-for feature additions to YAK is support for multiple prices, for products with more than one type. For example, small, medium and large t-shirts should be able to support more than the one price. Well, at long last, version 1.1.2 now supports the concept of an “override price” — set against a specific category of product.

Also included in this release is the facility to add promotions (i.e. discount codes that run for a specific period) — a custom piece of development paid for by a YAK user (thanks Chris!) — Czech translation provided by Frank, and Spanish translation provided by Josep (thanks guys).

The full changelog can be found here: http://www.briggs.net.nz/hg/yak/raw-file/tip/release_notes_1.1.2.txt.

As usual YAK can be downloaded from the WordPress Extend site.

A few months ago, the author of a competing plugin (to my own rather more modest efforts), contacted me about a troll he was having trouble with. Said troll was posting negative messages about the competition on various forums, and his theory was that the guy is my supporter.

Somewhat irritating, was the fact he claimed to have found connections between us. Quite how he managed to find a connection I don’t know — given that there were/are none — but more galling was the subsequent request that I post messages to that effect, on all the forums where this muppet had been posting. Needless to say, I was somewhat less than agreeable, and I suspect that my refusal cemented whatever paranoid delusions of persecution he had conjured.

I only bring this up now, because YAK has suddenly become the target of that self-same troll. Or at least, I’m guessing it’s the same twit (given the similarity of name). This time ridiculously claiming that my plugin has somehow opened a gaping security hole in WordPress’s administration panel. Laughable.

I suggest that rather than YAK causing the problem, it’ll be the fact that this individual has a few too many brain-cells short of a functional cranium, and that “password” is rather too simple an administration password.
On the positive side, it does hopefully prove that the troll has nothing to do with me, and is obviously a sad git with far too much spare time on his hands.

UPDATE: just to be thorough, I’ve double-checked some of the access points in YAK where there might’ve been potential for a security hole, and I can’t see anything that might compromise WP’s security. So I return to my earlier description of the poster: a muppet.

I’ve just committed some minor updates to my Stomp client (stomp.py):

1. removed the ‘lower()’ on header keywords to support case-sensitive headers (patch submitted by Eugene S).

2. added the facility to wait until the socket is connected before issuing a “CONNECT”

3. removed the space between header and value (i.e. header: value becomes header:value) which fixes an incompatibility with RabbitMQ

4. added the missing connect headers (user/pass) to the “CONNECT” command (again fixes an incompatibility with Rabbit).

As usual changes are committed and you can get the latest version from my Mercurial repo here.