No Hablo is a demo Shopify application that uses micropayments, metafields, and background jobs. It will translate each of your product descriptions to a new language.
This app is meant as a learning tool and not to be used in production. Mostly because it uses Google Translate for the translations and since I only speak English I can’t comment on the quality of Google Translate results.
As this app is meant as a learning tool for Shopify developers, here are a few points of interest:
- login_controller.rb:23
Here we create a Shop object local to this application when the user logs in for the first time.
- shop.rb:11
Read the comment for the gist.
- translation_controller:42 and payment_notification_controller
These two pieces together show how to handle the creation of a charge, subsequent redirection to the confirmation and updating of local data.
- translation.rb:8
This method is called by DJ in a background task. It illustrates how to initialize and de-initialize the API with the shop’s site string in a background task.
git clone git://github.com/jstorimer/no-hablo.git
cd no-hablo
sudo rake gems:install
rake db:migrate
Go to your Shopify Partners account and create a new application.
Stick the new Api Key and Secret into config/shopify.yml
./script/server