Closed guidoferreyra closed 8 years ago
+1, please
+1
I'd like to get a better sense of how people are approaching themes for Shopkit. Part of the reason I used UIKit is because its CSS classes are namespaced, and unlikely to conflict with custom stylesheets.
With the new plugin registry in Kirby 2.3, I can put all of Shopkit's templates and snippets inside the plugins folder. Any templates or snippets you define in your own site/templates
or site/snippets
would overwrite the ones defined by Shopkit.
Does this give enough control?
I think what are you mentioning about the new plugin registry will help a lot! Also simple pages with less style, no sidebars etc could help too.
Yes, this makes it very modular and fun-to-work-with. This way we can make new Gateways as plugins instead of rewriting Shopkit (which is something I've had to do because of your previous gateway logic).
On the dev branch, I've just pushed a big commit that reorganizes how payment gateways are defined in Shopkit. This new approach removes all gateway settings from the Panel. So for example, the PayPal email address and sandbox flag will have to be changed by editing the file directly.
There's a new plugins/shopkit/gateways
folder. Within this folder, you can add a payment gateway which has the following structure:
gateways/
1-gatewayname/
config.php
process.php
callback.php
config.php
sets some options: label
is the only required one, and you can add anything else you need for your gateway logic.process.php
handles the data passed from the Cart
page. It should package up the transaction data and send it to the gateway.callback.php
handles the callback response from your gateway. This is a file that the gateway server talks to to confirm payment. The customer shouldn't have to navigate to this page.And you can number the folders to control their display order in the Cart
page, just like Kirby pages :)
Take a look: https://github.com/samnabi/shopkit/tree/dev/site/plugins/shopkit/gateways
Feedback welcome! This is still very rough but it represents a major structural shift in how Shopkit works. Hopefully this will be nice and future-proof, and an easier way to add new payment gateways.
Excellent Sam! I will take a look as soon as posible!
Great! I'll try to adjust my Conekta solution to this new structure today.
Hi @samnabi and everyone! I would love to implement shopkit in a website but I think the way is it structured now is very complicated...
I think the best way to make it works is having all files in a single folder inside plugins folder, like woocommerce for wordpress... I red in version 2.3 you can make it, but I don't understand if you already made it or not... please let me know if I have to modify every single theme file, config etc... or if you are planning to release a single plugin pack to place in plugin folder... Thank you! :wink:
Hi @mungle, the next version of Shopkit will have a much more streamlined structure, with config variables, themes, snippets, etc. All located within the plugins
folder.
Although the new Kirby extension registry simplifies things, there are still parts of Shopkit that live outside the plugins folder. CSS and images, essential content pages, language variables, and third-party fields are still scattered throughout the file structure.
This is why Shopkit will continue to be distributed as a kit, and not a standalone plugin. It will always be harder to integrate Shopkit into an existing site.
I think it might very helpful to have a version of Shopkit with only the required files to make Shopkit work without all the UIkit and this kind of stuff. I'm implementing it on my site, and I made a few modifications and I'm afraid that when I have to upgrade the version or something I need to make the modifications again.
Best regards.