Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
digiltd opened this issue Feb 13, 2017 · 11 comments
Open

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

digiltd opened this issue Feb 13, 2017 · 11 comments
Labels

Comments

@digiltd
Copy link

digiltd commented Feb 13, 2017

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
Copy link
Owner

samnabi commented Feb 13, 2017

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
Copy link
Author

digiltd commented Feb 13, 2017

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
Copy link
Owner

samnabi commented Feb 14, 2017

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
Copy link

ghost commented May 16, 2017

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 👍

btw when does v2.0 come out?

@invasoria
Copy link
Contributor

@samnabi
Copy link
Owner

samnabi commented May 19, 2017

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
Copy link

hemorej commented Jul 25, 2017

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

  • put shopkit in its own directory at the root of your kirby setup (eg not in /content or /plugins)
  • set the RewriteBase to /shopkit in the shopkit .htaccess

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
Copy link

@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
Copy link
Owner

samnabi commented Jul 25, 2018

@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
Copy link
Owner

samnabi commented Oct 3, 2018

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
Copy link

hemorej commented Oct 3, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants