Shopify/Squarespace/Sellfy etc. are much cheaper and lower risk, at least to start with. From experience PCI compliance and tax rules are pains you do not want to deal with.
I’d only ever recommend custom coding if you have some extremely specific requirements. Even WooCommerce on Wordpress would be a better starting point.
If you want to tinker, you could build a store using a static site generator like Jekyll combined with a Google Docs spreadsheet to manage the inventory and something like Snipcart [0] for e-commerce functionality (I’m working on a site that does this).