Shopkit commerce plugin


I was checking as this is not my server: 5.4.40


Then I think it is the call to empty that doesn’t work with versions. below 5.5. in this context. You should really no longer use PHP versions below 5.6 and ideally upgrade to 7.x.

In any case, since version 2.5.11, Kirby doesn’t support PHP versions below 5.6 anymore.


i use a very early version. and in the background i have to merge my old stuff n styles to the new version.

but now i want to get an quick solution to show on my front page /shop all products at all sort by date.
i tryed to copy the catagory code on my shop.php but thats not the solution.

can someone help me? :slight_smile:


@dersven: what version of shopkit are you using? Probably just a couple tweaks need to be made to the category.php code.


i think its the v1.0.3 :frowning:
my shop design and styles i have made are everywhere and not very well in one place collected. i have to do it new from sketch. but i dont have space time for it.
so i search for a tiny quick and dirty thing. --> i am an designer not an developer.

is there an idea…
how can i use the tag-template or the category-one to get an output of all products on the front without choosing a categorie?


Try this snippet, @dersven. It will create a list of all products that are visible.

  snippet('list.product', [
    'products' => page('shop')->index()->filterBy('template', 'product')->visible()


oh thanks.

is it possible to sort the products in the otherway round. the last products first?
how about ->sortBy // But my idea doesnt work.

snippet('list.product', [
    'products' => page('shop')->index()->filterBy('template', 'product')->sortBy('sort', 'asc')->first();->visible()


To get the last product first, you probably want ->sortBy('sort', 'desc').

->first() is probably not what you want, as that will only return one product.



now i am confused. i have take the old code into the shop.php

    <!-- Featured products -->
    // Rebuild the featured products list with actual page objects instead of URIs
    $index = $pages->index();
    foreach (page('shop')->featured()->toStructure() as $f) {
        $featuredProduct = $index->findByURI($f->product());
        if ($featuredProduct->isVisible()) {
            $featured[] = [
                'product' => $featuredProduct,
                'calculation' => $f->calculation()->value
<?php if(isset($featured) and count($featured)){ ?>
    <div id="featured-products">
        <?php snippet('list.featured', ['products' => $featured]) ?>
<?php } ?>

and now there is an error like:

 **Fatal error** : Call to a member function isVisible() on boolean in shop.php 



This code doesn’t seem to return a page object, but without knowing what is stored. in. $f->product() and your page structure…


The code you listed is not part of templates/shop.php. That file should look like this:

Are you trying to put this product list in the sidebar? That’s where the code you posted comes from.


thanks a lot for your plenty answers.

yes i have cleaned the markup for my own style. i dont have a sidebar, and my featured products are listed most of all my products. so i use the featured code snippet on my shop.php.

i have made a mistake. and now, if i would switch to the old files. this visible error appyed. and no shop item will displayed. :frowning_face:


Please post the full code of your shop.php template file. (or send it to me privately if there is sensitive information)


Oh no. I have to apologize samnabi. sorry!

While I changed the shop.php, the visibility of all products has also changed. I did not pay attention to that.
Now all products are visible again and it works just fine.
Thank you very much for your help.


I like the ShopKit setup and that it’s based on Kirby… new to Kirby and first post! :smile:

Anyways. Are there any plans of adding Stripe Billing support? I would like to use this for subscriptions and we use Stripe now. I have plans with multiple variants that fit really well into the shopkit layout with the exception of the checkout using stripecheckout. I’m not a very good PHP developer but I’m going to take a look and see how difficult it would be to add a stripebilling provider and a entry to the blueprint to mark the item as a subscription so it will automatically use the correct stripe checkout method… I don’t think it will be too difficult and others may like this feature?


@simplextech According to the readme, Stripe icheckout is included as payment gateway.


I’m not planning to add recurring payments as a Shopkit feature. It was on the roadmap for a while, but every time I tried to tackle that problem it turned out to be very difficult to do while remaining gateway-agnostic:

That said, please reply here or file an issue on GitHub if you run into issues with your integration, I’ll do my best to help.


@texnixe yes Stripe is supported as a payment gateway for “Charges” not “Billing”.

@samnabi, I’ll poke around and see what I can do. I modified SCK over the last few nights and it’s working well for me but I want to have a “cart” like system in place for devices and it would be nice for it to be a unified checkout feeling. I’ll see what I can do, I’m better on the back end than the front end with coding anyways.

For the life of me tonight I can’t get nested navbar menu items to display correctly!


v2.5 is here :hourglass_flowing_sand:

Now Shopkit and Kirby have the same major & minor version number…

Download it here:


  • Update Kirby and Panel to 2.5.12 (PHP 5.6+ now required)
  • Improve shadow & overlay display in IE (for category tiles)
  • Bug fixes
    • Fix errors in shipping calculations for products with custom shipping rules
    • Remember user’s selection for custom shipping options in the cart
    • Fix undefined $timestamp error when a downloadable product is not the first to be added to the cart
    • Fix hidden submit button on payment form when mailing address is hidden
    • Use Kirby download() function instead of manually setting headers for downloadable products
    • Fix false positive in appliesToCountry()


It’s great to hear that you took such an opportunity, brave and also … healthy!

I wonder, do you have any experience adding Shopkit to an existing Kirby installation? I know that the general rule of thumb is to begin with a fresh install but … just curious :slight_smile:

All the best,