samnabi / shopkit

Comprehensive commerce solution for Kirby CMS v2
https://shopkit.samnabi.com
Other
99 stars 15 forks source link

Possible to add shopkit to an existing Kirby site? #122

Open digiltd opened 7 years ago

digiltd commented 7 years ago

Hi, I am looking for a way to add simple event booking to my Kirby site. After realising that the shopkit setup process instructions assume you are creating a brand new site, I tried to extract the relevant folders into my existing site.

However I have now spotted that my existing includes for things like header and footer are being overwritten by the shopkit includes.

This is making installing the plugin very complicated. Is there an easier way for an existing Kirby site? It would be ideal if shopkit was available through the Kirby CLI as a plugin.

samnabi commented 7 years ago

Shopkit's features can't be bundled neatly into a plugin, unfortunately. The new registry has helped keep things somewhat modular, but there are still things like language translations and required content pages that have to live outside the plugin folder.

I know that it is difficult to integrate Shopkit with an existing site, not least because I use common snippets like header.php that can easily get overridden.

That's why it's best not to think of Shopkit as a plugin, but as a "Kit", much like Kirby's Starterkit, Langkit, and Plainkit.

I'll keep this issue open for discussion. With each new release, I hope I can make Shopkit more and more like a standalone plugin.

digiltd commented 7 years ago

Thanks for the reply. Unfortunately I can't really use it as a starter kit. I will keep an eye on the project though :)

Though hypothetically speaking if I did, how flexible would it be for a user to customise the shop using their own templates? It seems that most user editable files would get reverted if you updated the "kit" in the future?

samnabi commented 7 years ago

There is an assets/css/custom.css file that is meant for custom styles. That won't get undone by an upgrade.

Someone could also use their own templates, snippets, and controllers... if you put them under site/ they will override the ones included with Shopkit, but that would require some extensive testing after an upgrade to make sure nothing's broken.

ghost commented 7 years ago

but there are still things like language translations and required content pages that have to live outside the plugin folder.

Why not let the user decide those pages and translations?

I really wish this one would work as a plugin :+1:

btw when does v2.0 come out?

invasoria commented 7 years ago

Already out! https://github.com/samnabi/shopkit/releases/tag/v2.0

samnabi commented 7 years ago

Why not let the user decide those pages and translations?

Because that would require more set-up time on the user's part. Shopkit is supposed to be a ready-to-go solution, hence why it is a "kit" and not a plugin.

hemorej commented 7 years ago

In case anyone is interested, it is possible to integrate shopkit into an existing kirby install, just not as a regular plugin.

You can now access the shop like any content url that is part of your kirby setup. There's a few drawback to this compromise obviously, you now have two separate panels and any css/theme you have you now have to maintain in two places.

plagasul commented 6 years ago

@hemorej , when you say "You can now access the shop like any content url that is part of your kirby setup" you do NOT mean that you are able to use your main Kirby's installation internal php searching and routing functions to access this secondary installation is that right ? I mean, I cannot use $site->search in the main installation to access any page in the shopkit or the shopkit index, correct? I understand I always have to use the full URL or perhaps relative URL.

samnabi commented 6 years ago

@plagasul you're right, @hemorej's suggestion creates two completely separate Kirby websites. It might also create conflicts if you have two identically-named pages – one in shopkit,and one in your other kirby installation.

samnabi commented 6 years ago

Hey everyone. I've been thinking a lot about the future of Shopkit, and one stubbon issue that keeps coming up always brings me back to this Issue (first opened is February 2017 and still not solved!)

I want to make the next major version of Shopkit easily integrated into existing websites. so I've been thinking of converting all the components into Modules, to be used with the Modules Plugin.

Would think make your workflow easier? You would still need to convert existing templates to support modules – but there should be fewer code conflicts with your templates and snippets that way.

hemorej commented 6 years ago

That would be a great improvement. I know it's hard to make it completely separate (I tried) but a module would definitely be better.