{"id":16133,"date":"2026-02-15T12:17:05","date_gmt":"2026-02-15T12:17:05","guid":{"rendered":"https:\/\/brennigjones.com\/blog\/?p=16133"},"modified":"2026-02-15T12:17:06","modified_gmt":"2026-02-15T12:17:06","slug":"blogathon-15-26-stock","status":"publish","type":"post","link":"https:\/\/brennigjones.com\/blog\/?p=16133","title":{"rendered":"Blogathon 15\/26: Stock"},"content":{"rendered":"\n<p>I&#8217;ve been playing around with a bunch of custom CSS and some newly-created database fields because I had a really good night&#8217;s sleep last night (yay!) and my brain needed a fresh challenge this morning. And now, after a couple of hours of tinkering around people can see&#8230; Oh, hang on. You need some context.<\/p>\n\n\n\n<p>Most of the paperback sales for my books come from my website, not bookshops. That&#8217;s because I heavily discount the price whereas mainstream and independent book-sellers don&#8217;t.<\/p>\n\n\n\n<p>So what I&#8217;ve done this morning is build a stock management function into the online store so that users can see how many copies of a book I have in stock. Now, they might not want to know I&#8217;ve only got 2 copies of Tempest ready to fly out of the door, but they <em>may<\/em> want to know Storm is (currently) out of stock (I certainly do). The database presents these new pieces of information to anyone browsing the online store. It also sends me an email every time a copy is sold, reduces the stock count, and flags up I need to get additional copies in when the stock gets to zero. Yeah, I might shift that warning upwards to 1.<\/p>\n\n\n\n<p>But anyway, that&#8217;s what I&#8217;ve been doing this morning. Not too shabby, eh? WYD?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been playing around with a bunch of custom CSS and some newly-created database fields because I had a really good night&#8217;s sleep last night<\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-16133","post","type-post","status-publish","format-standard","hentry","category-stuff","two-columns"],"_links":{"self":[{"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/16133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=16133"}],"version-history":[{"count":1,"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/16133\/revisions"}],"predecessor-version":[{"id":16134,"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/16133\/revisions\/16134"}],"wp:attachment":[{"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=16133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=16133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=16133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}