The roads I take...
KaiRo's weBlog
| Displaying recent entries in English and tagged with "Shop". Back to all recent entries |
July 11th, 2023
Integrating Magento 2 Shop With FreeFinance and Custom Merchandise Management
In the last few months, I have been building up a new business called Trade Post 47. While we envision it as a little space station in orbit of a nice planet, to most people it will be a science fiction merchandise trading company, with an online shop and booths at events like local Comic-Cons in Central Europe, especially in Austria. If you want to learn more, we have put up a complete page about us on our shop website.
To manage our products, which we get from different vendors (sometimes the same product via different vendors) as well as plan and manage our orders, I built an internal, custom merchandise management in my own PHP framework or CMS CBSM (which is also used for this blog, for example). I did this mostly out of convenience as I have and maintain this system anyhow and I needed some database tables with fitting UI for managing our merchandise, vendors, and more (even conventions we may want to run booths at).
OTOH, the public shop is (as you may notice when looking at the website) an installation of Magento 2 (i.e. the open-source version of what is nowadays called "Adobe Commerce"). We decided to run that system because we are partnering closely with MCO Shop, which is a local ham radio and electronics shop, and they already had this software running previously on the servers we share and know how to work with it, run the upgrades, and maintain it. After all, when building a new business, as in so many areas of life, it always helps if you can share some resources and knowledge with others. First, I adapted the Magento theme to make it look more "space-like", mostly importantly, having a dark instead of light background. Once that worked well enough, I still had to get those products that we actually ordered from my custom management system into this Magento shop. Initially, I did this via creating a big CSV file and importing that into the shop, but it was clear that we needed a more fine-grained solution in the long run that can add and update entries individually.
Additionally, when we run booths on our "away missions" to events/conventions (or whenever we otherwise sell anything in person), Austrian law requires us to use a cash register system that follows strict rules and passes a certification so that the government can be sure we pay taxes for everything we sell. For that we decided to use a solution integrated into our bookkeeping system, which runs online as a web service as well, a specialized Austrian solution called FreeFinance. And of course, the cash register needs a full list of products and prices as well, which we also initially solved with a CSV creation and import in anticipation of a more fine-grained solution after our first big appearance at Austria Comic-Con in early June.
As icing on the cake, we also wanted to generate nicely styled invoice documents in FreeFinance for all online shop orders that weren't paid via the cash register, and in the future, we'll want to make the online shop automatically aware of merchandise sold at events so they are removed from available stock for online purchases.
To achieve that, I looked into the APIs that both Magento and FreeFinance provide, accessing them from the custom internal system that I have full access to and that is required for providing the merchandise data anyhow. I found that the FreeFinance API is relatively simple, well-documented and does authentication via OAuth2, which I already had some knowledge of (and code to access it) from other projects, including some code already in the CBSM system for facilitating its own logins. That said, Magento is a different beast: its product catalog feature set is way more complex, and so is its API. Also, there is no well-structured collective documentation that would explain what various things mean or what is preferably done in what way (often there are multiple paths to the same result), it's a lot of turning on developer mode so that a Swagger/OpenAPI UI is available on your installation and then trying around there and searching the web for what could work how and what value could mean what. In addition, authentication is done via OAuth1, which is more complicated than its successor, and which I didn't have any pre-existing code for, though I could build on some code from their tutorial. Also, as we're running Magento ourselves on the server side, I could more easily try around things than with FreeFinance, which is a hosted service and I needed to request access credentials from their team. But FreeFinance gave us access to a testing system, whereas for Magento, for various reasons, we only have a live system and no staging/testing environment, so we can't "play around" very much when testing.
I wrote quite a bit of code for all those cases, the simplest part was and is surely updating the cash register with our products, the only slight complication there is adding categories if needed. For adding products to the shop, I needed to respect all kinds of things, like creating and managing configurable products, adding values to some attributes, uploading images, managing categories, and more. And the curious structure of the Magento API, which requires way more detailed action than the CSV import route, did at times make this even more complicated - but it works now and I can just add or change a product in the merch management and at the latest on the next day, both the shop and the cash register have updated to those changes (I can trigger the sync jobs earlier if required). For creating the invoice documents, I could base some things on a make.com "blueprint" provided by FreeFinance, but for one thing, we don't want to use a paid third-party service if we can automate this ourselves, and for the other, we have some restrictions and specialties of our own there (like only generating invoices for orders actually paid via the web shop payment integration and not in person via the cash register). I did run into some curiosities there, like the Magento order API result containing several pieces of data multiple times, or us initially using a document layout template that didn't allow for different products having different VAT rates (which we require) - but that's working now as well. The reverse part about getting cash register purchases into the online shop is still on my plate, but I now have a good plan for how to do that, and some time until our next big "away mission" where this will be important to have.
All in all, this has been a quite interesting experience, and I'm sure now that I am comfortable with working with those systems and APIs, I will do more with them in the long run - and our Trade Post 47 hopefully will still grow as well and therefore have additional requirements in the future. If you are a developer and have questions about some details, feel free to contact me - and if you are running such systems yourself and need a developer who can adapt them in a similar fashion, I'm happy to offer those services as a contractor!
To manage our products, which we get from different vendors (sometimes the same product via different vendors) as well as plan and manage our orders, I built an internal, custom merchandise management in my own PHP framework or CMS CBSM (which is also used for this blog, for example). I did this mostly out of convenience as I have and maintain this system anyhow and I needed some database tables with fitting UI for managing our merchandise, vendors, and more (even conventions we may want to run booths at).
OTOH, the public shop is (as you may notice when looking at the website) an installation of Magento 2 (i.e. the open-source version of what is nowadays called "Adobe Commerce"). We decided to run that system because we are partnering closely with MCO Shop, which is a local ham radio and electronics shop, and they already had this software running previously on the servers we share and know how to work with it, run the upgrades, and maintain it. After all, when building a new business, as in so many areas of life, it always helps if you can share some resources and knowledge with others. First, I adapted the Magento theme to make it look more "space-like", mostly importantly, having a dark instead of light background. Once that worked well enough, I still had to get those products that we actually ordered from my custom management system into this Magento shop. Initially, I did this via creating a big CSV file and importing that into the shop, but it was clear that we needed a more fine-grained solution in the long run that can add and update entries individually.
Additionally, when we run booths on our "away missions" to events/conventions (or whenever we otherwise sell anything in person), Austrian law requires us to use a cash register system that follows strict rules and passes a certification so that the government can be sure we pay taxes for everything we sell. For that we decided to use a solution integrated into our bookkeeping system, which runs online as a web service as well, a specialized Austrian solution called FreeFinance. And of course, the cash register needs a full list of products and prices as well, which we also initially solved with a CSV creation and import in anticipation of a more fine-grained solution after our first big appearance at Austria Comic-Con in early June.
As icing on the cake, we also wanted to generate nicely styled invoice documents in FreeFinance for all online shop orders that weren't paid via the cash register, and in the future, we'll want to make the online shop automatically aware of merchandise sold at events so they are removed from available stock for online purchases.
To achieve that, I looked into the APIs that both Magento and FreeFinance provide, accessing them from the custom internal system that I have full access to and that is required for providing the merchandise data anyhow. I found that the FreeFinance API is relatively simple, well-documented and does authentication via OAuth2, which I already had some knowledge of (and code to access it) from other projects, including some code already in the CBSM system for facilitating its own logins. That said, Magento is a different beast: its product catalog feature set is way more complex, and so is its API. Also, there is no well-structured collective documentation that would explain what various things mean or what is preferably done in what way (often there are multiple paths to the same result), it's a lot of turning on developer mode so that a Swagger/OpenAPI UI is available on your installation and then trying around there and searching the web for what could work how and what value could mean what. In addition, authentication is done via OAuth1, which is more complicated than its successor, and which I didn't have any pre-existing code for, though I could build on some code from their tutorial. Also, as we're running Magento ourselves on the server side, I could more easily try around things than with FreeFinance, which is a hosted service and I needed to request access credentials from their team. But FreeFinance gave us access to a testing system, whereas for Magento, for various reasons, we only have a live system and no staging/testing environment, so we can't "play around" very much when testing.
I wrote quite a bit of code for all those cases, the simplest part was and is surely updating the cash register with our products, the only slight complication there is adding categories if needed. For adding products to the shop, I needed to respect all kinds of things, like creating and managing configurable products, adding values to some attributes, uploading images, managing categories, and more. And the curious structure of the Magento API, which requires way more detailed action than the CSV import route, did at times make this even more complicated - but it works now and I can just add or change a product in the merch management and at the latest on the next day, both the shop and the cash register have updated to those changes (I can trigger the sync jobs earlier if required). For creating the invoice documents, I could base some things on a make.com "blueprint" provided by FreeFinance, but for one thing, we don't want to use a paid third-party service if we can automate this ourselves, and for the other, we have some restrictions and specialties of our own there (like only generating invoices for orders actually paid via the web shop payment integration and not in person via the cash register). I did run into some curiosities there, like the Magento order API result containing several pieces of data multiple times, or us initially using a document layout template that didn't allow for different products having different VAT rates (which we require) - but that's working now as well. The reverse part about getting cash register purchases into the online shop is still on my plate, but I now have a good plan for how to do that, and some time until our next big "away mission" where this will be important to have.
All in all, this has been a quite interesting experience, and I'm sure now that I am comfortable with working with those systems and APIs, I will do more with them in the long run - and our Trade Post 47 hopefully will still grow as well and therefore have additional requirements in the future. If you are a developer and have questions about some details, feel free to contact me - and if you are running such systems yourself and need a developer who can adapt them in a similar fashion, I'm happy to offer those services as a contractor!
By KaiRo, at 03:51 | Tags: API, FreeFinance, Magento, merch, PHP, science fiction, Shop, Trade Post 47 | no comments | TrackBack: 0
July 4th, 2007
Updated SeaMonkey me®chandise!
But Yogurt, what is this place? What is it that you do here?
Merchandising!
(from: Spaceballs - The Movie)
I've just updated the SeaMonkey Merchandising Shop with designs that feature the ® instead of the ™ sign, as our trademark have been officially registered for a while now.
Following a popular request, I've changed the golf shirt to have the logo only at the front and an empty back - I also added the www.seamonkey-project.org URL to the front logo there though.
I hope to see many people out there spreading the word through this official SeaMonkey merchandise.
We offer "SeaMonkey - the T-shirt", "SeaMonkey - the mug", "SeaMonkey - the mousepad" and others; unfortunately we can't offer "SeaMonkey - the flame thrower" yet - the kids would love it
May the Schwartz be with you!
Merchandising!
(from: Spaceballs - The Movie)
I've just updated the SeaMonkey Merchandising Shop with designs that feature the ® instead of the ™ sign, as our trademark have been officially registered for a while now.
Following a popular request, I've changed the golf shirt to have the logo only at the front and an empty back - I also added the www.seamonkey-project.org URL to the front logo there though.
I hope to see many people out there spreading the word through this official SeaMonkey merchandise.
We offer "SeaMonkey - the T-shirt", "SeaMonkey - the mug", "SeaMonkey - the mousepad" and others; unfortunately we can't offer "SeaMonkey - the flame thrower" yet - the kids would love it
May the Schwartz be with you!
By KaiRo, at 19:41 | Tags: Mozilla, SeaMonkey, Shop | 2 comments | TrackBack: 1
May 12th, 2007
SeaMonkey Marketing Shop is open!
It has taken us a while, but now it's done:
At http://www.cafepress.com/SeaMonkeySuite we now have a SeaMonkey Marketing Shop where you can get T-shirts, even a mug, mouse pad, or trucker hat, all in a SeaMonkey design!
You can order items there now and spread the word about SeaMonkey visually everywhere you go, in your office or at the breakfast table.
Oh, and here are some pictures of items I bought myself there for testing the shop:
View photo gallery
Oh, and I had to remove the black T-shirt for now, the design I made is to little visible on that T-Shirt, I need to improve this first.
Edit: You can get a virtual black SeaMonkey T-shirt from my alter ego "KaiRo Soon" in SecondLife if you like
All items are priced with a markup to the original CafePress price. We will use this to potentially upgrade to a premium shop where we can offer e.g. multiple white T-shirts with different design or use a much more custom shop site design. If you are ordering so many items that we still have loads of money left there, we'll donate items from the shop to major SeaMonkey developers. So in any case, we won't directly profit from any money there, this shop is purely for SeaMonkey community marketing purposes, to enable you to spread the word more easily.
CafePress offers us several shipping options, including worldwide international shipping, so everyone should be able to get his SeaMonkey T-shirt delivered. If you're living outside the US, note their help about import duties and taxes though, as your country might charge additional money for importing those items.
If you have proposals for additional items we should provide there, please tell us, either here on my blog, in the SeaMonkey newsgroups, on IRC or via seamonkey-council@mozilla.org.
We hope to see lots of people wearing SeaMonkey T-shirts running around this summer, sipping coffee from a SeaMonkey mug in their office or at home...
At http://www.cafepress.com/SeaMonkeySuite we now have a SeaMonkey Marketing Shop where you can get T-shirts, even a mug, mouse pad, or trucker hat, all in a SeaMonkey design!
You can order items there now and spread the word about SeaMonkey visually everywhere you go, in your office or at the breakfast table.
Oh, and here are some pictures of items I bought myself there for testing the shop:
View photo gallery
Oh, and I had to remove the black T-shirt for now, the design I made is to little visible on that T-Shirt, I need to improve this first.
Edit: You can get a virtual black SeaMonkey T-shirt from my alter ego "KaiRo Soon" in SecondLife if you like
All items are priced with a markup to the original CafePress price. We will use this to potentially upgrade to a premium shop where we can offer e.g. multiple white T-shirts with different design or use a much more custom shop site design. If you are ordering so many items that we still have loads of money left there, we'll donate items from the shop to major SeaMonkey developers. So in any case, we won't directly profit from any money there, this shop is purely for SeaMonkey community marketing purposes, to enable you to spread the word more easily.
CafePress offers us several shipping options, including worldwide international shipping, so everyone should be able to get his SeaMonkey T-shirt delivered. If you're living outside the US, note their help about import duties and taxes though, as your country might charge additional money for importing those items.
If you have proposals for additional items we should provide there, please tell us, either here on my blog, in the SeaMonkey newsgroups, on IRC or via seamonkey-council@mozilla.org.
We hope to see lots of people wearing SeaMonkey T-shirts running around this summer, sipping coffee from a SeaMonkey mug in their office or at home...
By KaiRo, at 01:51 | Tags: Mozilla, SeaMonkey, Shop | 3 comments | TrackBack: 0