{"id":624,"date":"2012-12-15T12:17:46","date_gmt":"2012-12-15T11:17:46","guid":{"rendered":"http:\/\/thoughtflow.dk\/?p=624"},"modified":"2018-11-04T11:09:38","modified_gmt":"2018-11-04T10:09:38","slug":"creating-a-shopify-plugin","status":"publish","type":"post","link":"https:\/\/davidlebech.com\/thoughtflow\/creating-a-shopify-plugin\/","title":{"rendered":"Creating a Shopify plugin"},"content":{"rendered":"<p><em>This post is about Antecons, a product recommendation engine, now part of <a href=\"https:\/\/conversio.com\/\">Conversio<\/a>. Antecons is no longer commercially available, but I have kept my developer diary on my website with permission.<\/em><\/p>\n<hr>\n<p>In the last post about Antecons, <a href=\"\/thoughtflow\/mapreduce-and-frequent-patterns\/\" title=\"Frequent patterns and MapReduce\">I wrote about frequent patterns and MapReduce<\/a>. Since then, this base functionality has been tweaked to work a little better but the main focus has been on creating the first plugin for Antecons: A Shopify app.<\/p>\n<p>I have previously mentioned that it is important to me that Antecons <em>can<\/em> be easy to set up. Although focusing on the API initially was a great way to get started, it has become clear after some thought that the reach is limited if the entire product is just an API from the beginning. So I have begun implementing a plugin (or an <em>app<\/em> as they call it) for Shopify. There are two reasons for choosing Shopify as the first integrated platform for Antecons:<\/p>\n<ol>\n<li>It is easy to get started with app development on Shopify and their API is quite extensive.<\/li>\n<li>Shopify was simply something I knew before-hand so I did not need to research other options too much.<\/li>\n<\/ol>\n<p>So far, it has been a good experience working with the Shopify API. Integrating with Python\/Google App Engine was very easy thanks to their open source <a href=\"https:\/\/github.com\/Shopify\/shopify_python_api\" title=\"Shopify Python API\">API bindings for python<\/a>.<\/p>\n<p>The Shopify app for Antecons is not finished yet or at least, I do not consider it in a state where I can release it. However, it is in state where it installs correctly and delivers recommendations to the webshop it is installed on. Instead of writing a lot about that, below are some screenshots that show the functionality. The suggestions by Antecons are the little &#8220;You might also like&#8221; products.<\/p>\n<figure id=\"attachment_733\" aria-describedby=\"caption-attachment-733\" style=\"width: 652px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/davidlebech.com\/thoughtflow\/wp-content\/uploads\/install_antecons.png\" alt=\"Antecons installation start\" width=\"652\" height=\"272\" class=\"size-full wp-image-733\" srcset=\"https:\/\/davidlebech.com\/thoughtflow\/wp-content\/uploads\/install_antecons.png 652w, https:\/\/davidlebech.com\/thoughtflow\/wp-content\/uploads\/install_antecons-150x63.png 150w, https:\/\/davidlebech.com\/thoughtflow\/wp-content\/uploads\/install_antecons-300x125.png 300w\" sizes=\"auto, (max-width: 652px) 100vw, 652px\" \/><figcaption id=\"caption-attachment-733\" class=\"wp-caption-text\">Antecons installation start<\/figcaption><\/figure>\n<figure id=\"attachment_730\" aria-describedby=\"caption-attachment-730\" style=\"width: 653px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.antecons.net\/wp-content\/uploads\/auth_antecons.png\" alt=\"Antecons app authentication\" width=\"653\" height=\"630\" class=\"size-full wp-image-730\" srcset=\"https:\/\/davidlebech.com\/thoughtflow\/wp-content\/uploads\/auth_antecons.png 653w, https:\/\/davidlebech.com\/thoughtflow\/wp-content\/uploads\/auth_antecons-150x145.png 150w, https:\/\/davidlebech.com\/thoughtflow\/wp-content\/uploads\/auth_antecons-300x289.png 300w\" sizes=\"auto, (max-width: 653px) 100vw, 653px\" \/><figcaption id=\"caption-attachment-730\" class=\"wp-caption-text\">Antecons app authentication<\/figcaption><\/figure>\n<figure id=\"attachment_734\" aria-describedby=\"caption-attachment-734\" style=\"width: 976px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/davidlebech.com\/thoughtflow\/wp-content\/uploads\/success_antecons.png\" alt=\"Antecons installed\" width=\"976\" height=\"183\" class=\"size-full wp-image-734\" srcset=\"https:\/\/davidlebech.com\/thoughtflow\/wp-content\/uploads\/success_antecons.png 976w, https:\/\/davidlebech.com\/thoughtflow\/wp-content\/uploads\/success_antecons-150x28.png 150w, https:\/\/davidlebech.com\/thoughtflow\/wp-content\/uploads\/success_antecons-300x56.png 300w, https:\/\/davidlebech.com\/thoughtflow\/wp-content\/uploads\/success_antecons-768x144.png 768w\" sizes=\"auto, (max-width: 976px) 100vw, 976px\" \/><figcaption id=\"caption-attachment-734\" class=\"wp-caption-text\">Antecons installed<\/figcaption><\/figure>\n<figure id=\"attachment_735\" aria-describedby=\"caption-attachment-735\" style=\"width: 513px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/davidlebech.com\/thoughtflow\/wp-content\/uploads\/suggestion1.png\" alt=\"Product page suggestion\" width=\"513\" height=\"449\" class=\"size-full wp-image-735\" srcset=\"https:\/\/davidlebech.com\/thoughtflow\/wp-content\/uploads\/suggestion1.png 513w, https:\/\/davidlebech.com\/thoughtflow\/wp-content\/uploads\/suggestion1-150x131.png 150w, https:\/\/davidlebech.com\/thoughtflow\/wp-content\/uploads\/suggestion1-300x263.png 300w\" sizes=\"auto, (max-width: 513px) 100vw, 513px\" \/><figcaption id=\"caption-attachment-735\" class=\"wp-caption-text\">Product page suggestion<\/figcaption><\/figure>\n<figure id=\"attachment_736\" aria-describedby=\"caption-attachment-736\" style=\"width: 378px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/davidlebech.com\/thoughtflow\/wp-content\/uploads\/suggestions2.png\" alt=\"Cart page suggestion\" width=\"378\" height=\"448\" class=\"size-full wp-image-736\" srcset=\"https:\/\/davidlebech.com\/thoughtflow\/wp-content\/uploads\/suggestions2.png 378w, https:\/\/davidlebech.com\/thoughtflow\/wp-content\/uploads\/suggestions2-127x150.png 127w, https:\/\/davidlebech.com\/thoughtflow\/wp-content\/uploads\/suggestions2-253x300.png 253w\" sizes=\"auto, (max-width: 378px) 100vw, 378px\" \/><figcaption id=\"caption-attachment-736\" class=\"wp-caption-text\">Cart page suggestion<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>This post is about Antecons, a product recommendation engine, now part of Conversio. Antecons is no longer commercially available, but I have kept my developer diary on my website with permission. In the last post about Antecons, I wrote about frequent patterns and MapReduce. Since then, this base functionality has been tweaked to work a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[69],"tags":[147,103,102,101],"class_list":["post-624","post","type-post","status-publish","format-standard","hentry","category-antecons","tag-antecons","tag-app","tag-plugin","tag-shopify"],"_links":{"self":[{"href":"https:\/\/davidlebech.com\/thoughtflow\/wp-json\/wp\/v2\/posts\/624","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/davidlebech.com\/thoughtflow\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/davidlebech.com\/thoughtflow\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/davidlebech.com\/thoughtflow\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/davidlebech.com\/thoughtflow\/wp-json\/wp\/v2\/comments?post=624"}],"version-history":[{"count":0,"href":"https:\/\/davidlebech.com\/thoughtflow\/wp-json\/wp\/v2\/posts\/624\/revisions"}],"wp:attachment":[{"href":"https:\/\/davidlebech.com\/thoughtflow\/wp-json\/wp\/v2\/media?parent=624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/davidlebech.com\/thoughtflow\/wp-json\/wp\/v2\/categories?post=624"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/davidlebech.com\/thoughtflow\/wp-json\/wp\/v2\/tags?post=624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}