Commerce Plugin - interest?

That’s good info to know, @Wojtek_Traczyk . I’ve been learning a lot about international payments and shipping and taxes since starting this project, we want to make it as global-friendly as possible.

I’ve about 99% decided to make the project open source at this point, but we’ll sell premium extensions like various payment gateways. I would imagine that przelewy24 would end up as one of the paid extensions, I plan to only give PayPal and Stripe away for free.

Once we’ve locked down the Kart Payments API, you’d be free to develop the gateway extension yourself, if you’re interested. I’ll certainly help you out, and then you could make some money reselling the extension.

1 Like

Been browsing this thread a little and haven’t seen mentioning Kyle Bean’s little shop plugin. You guys know that? It was for Kirby 1 and although simplistic, it suited my last website really well.

1 Like

Yeah, Snipcart working very well with all NoSQL CMS. Already used with another CMS and working with new client for use with KirbyCMS.

I’m a little slow to the discussion here ~ ~
I’ve been meaning for some time to make a post on the forums about a project I recently finished:

HANDJOB Gallery // Store (Safe for work other than the title!)

I used Foxycart as the payment processor. After each transaction, you can have an XML feed sent back to a script - which in my case updates the inventory and creates a simple CSV file with the order information for that month. I also built an admin page which displays the CSV, has sortable overviews of recent sales & inventory.

It was super easy to implement and the Foxycart support was great when I wasn’t able to figure it out on my own. I can’t say how it compares to other e-commerce platforms - this is my first experience with one - but I can say that it’s similar to Kirby in how adaptable it is, and so the two work together very well.

So… is this project dead already?

LOL, no. But I have a 40/hour/week work schedule and little opportunity to develop a project that doesn’t provide immediate income. But as of next week I’m opening some time up in my week to dedicate to Kart. Stuff will start happening soon … but probably slowly.

I didn’t ment to be pushy, thanks for your answer :slight_smile:

Hey, I’d like to help out on this if you need another dev on this. I’ve got pretty much every day open to dev

Thanks for the note @tnViking. I’m going to actually start to do something with Kart in a few weeks, I’ll contact you when I’m ready to get some work done.

This just in: The new Perch Shop
From what I’ve read in this topic, the approach is similar. Not creating a whole shop with Kirby, but creating a bridge with commerce platforms.

@max brought moltin to my attention. Another strong option.

Edit: then I looked at what Perch Shop uses…

1 Like

As much as I don’t want to admit that the project is truly dead, I think I’m indeed going to have to put the Kart on permanent hiatus. I’ve just got too many other things going on right now to manage or contribute to the development, and it sounds like there are some great alternatives. Moltin and Perch look like the options I would personally pick.

There would still be some major advantages to having a shopping cart integrated directly with Kirby, so maybe soon I can get a client to pay for my hours while I work. :slight_smile: But for now, it’s sadly just not financially practical for me. I thank everyone for their input so far though, especially @distantnative and @BenSeitz, your insights have been incredible valuable.

I too have been looking for this code, which was published in the old forum, as I was thinking it could at least serve as a good starting point for a project I’ve been asked to do, which means implementing Paypal in some fashion. I’ve read Paypal documentation until my eyes seeped out of their sockets, leaving me with a feeling I know less and less the more I read (quite opposite my experience from implementing Stripe on another project).

For those that don’t remember, here is Kyle Beans shop: which is using Kirby (1?) and a simple Paypal cart. That is not a dummy site, so if you click through the purchase process you will actually purchase (some of Kyle Beans amazing) products.

Kyle’s solution involved a plugin and templates that worked together… I have the plugin file knocking around here:

But I can’t find the original templates unfortunately. I may or may not have some work-in-progress files of my own, but that code isn’t ready to share just yet…

1 Like

Since the post is no longer available online, I paste it here for reference, if anybody is interested, should be easy enough to update for Kirby 2:

Title: PayPal eCommerce store

When creating the new site for []( I needed to create an online shop using Kirby.

# Explanation
This cart system builds a form for PayPal to receive and take payment. It uses `PHP sessions` to store products in an array called 'cart'. Each item in the array takes the UID for the product as it's key, and quantity as it's value.

# Plugin cart.php
My solution was to create a plugin called _cart_:
	function get_cart() {
	    $cart = s::get('cart', array());
	    return $cart;
	function cart_logic($cart) {
	    if (isset($_REQUEST['action'])) {
	      $action = $_REQUEST['action'];
	      $id = $_REQUEST['id'];
	      switch ($action) {
	          case 'add':
	              if (isset($cart[$id])) {
	              } else {
	                  $cart[$id] = 1;
	          case 'update':
	              if (isset($_REQUEST['quantity'])) {
	                  $quantity = intval($_REQUEST['quantity']);
	                  if ($quantity < 1) {
	                  } else {
	                      $cart[$id] = $quantity;                
	          case 'delete':
	              if (isset($cart[$id])) {
	      s::set('cart', $cart);
	    if (count($cart) == 0) {
	    return $cart;
	function cart_count($cart) {
	    $count = 0;
	    foreach ($cart as $id => $quantity) {
	        $count += $quantity;
	    return $count;
	function cart_postage($total) {
	    switch ($total) {
	        case ($total < 10):
	            $postage = 2.5;
	        case ($total < 30):
	            $postage = 3.5;
	        case ($total < 75):
	            $postage = 5.5;
	        case ($total < 150):
	            $postage = 8;
	            $postage = 10;
	    return $postage;

You should update the cart_postage function to reflect your own shipping rates.


The plugin expects the following structure in content:

  • shop/shop.txt
  • shop/cart/cart.txt
  • shop/complete/complete.txt
  • shop/XX-product/product.txt

Within shop/cart/cart.txt, you should write the email used on PayPal to receive payments:


shop.php template

The shop template will list all products and allow people to add them to the cart.

	<?php $cart = get_cart(); ?>
    <?php $count = cart_count($cart); ?>
   	<!-- header here -->
    <?php if ($count > 0): ?>
        <p>You have <strong><?php echo $count ?> item<?php if ($count > 1) echo 's' ?></strong> in your cart.</p>
        <p><a href="<?php echo url('shop/cart') ?>">View your Cart and Pay</a></p>
    <?php endif ?>
    <?php $products = $page->children()->visible() ?>
    <?php foreach($products as $product): ?>
            <h2><?php echo kirbytext($product->title(), false) ?></h2>
            <?php echo kirbytext($product->text()) ?>
            <form method="post" action="<?php echo url('shop/cart') ?>">
                <input type="hidden" name="action" value="add">
                <input type="hidden" name="id" value="<?php echo $product->uid() ?>">
                <p>£<?php echo $product->price() ?> <button type="submit">Add to Cart</button></p>
    <?php endforeach ?>
    <?php if ($count > 0): ?>
        <p class="align-right"><a class="button" href="<?php echo url('shop/cart') ?>" data-icon-after=" &rarr;">View your Cart and Pay</a></p>
    <?php endif ?>
   	<!-- footer here -->

cart.php template

The cart template is used to show products in the cart, as well as to make changes to them.

	<?php $cart = cart_logic(get_cart()) ?>
	<?php $products = $page->siblings()->visible() ?>
   	<!-- header here -->
	<form method="post" action="">
		<input type="hidden" name="cmd" value="_cart">
		<input type="hidden" name="upload" value="1">
		<input type="hidden" name="business" value="<?php echo $page->email() ?>">
	    <input type="hidden" name="currency_code" value="GBP">
	    <?php $i=0; $count = 0; $total = 0; ?>
	    <?php foreach ($cart as $id => $quantity): ?>
	        <?php if ($product = $products->findByUID($id)): ?>
	            <?php $product = $product->first() ?>
	            <?php $i++; ?>
	            <?php $count += $quantity ?>
	                    <input type="hidden" name="item_name_<?php echo $i ?>" value="<?php echo $product->title() ?>" />
	                    <input type="hidden" name="amount_<?php echo $i ?>" value="<?php echo $product->price() ?>" />
	                    <?php echo kirbytext($product->title(), false) ?>
	                <td><input data-id="<?php echo $product->uid() ?>" data-quantity="<?php echo $quantity ?>" pattern="[0-9]*"  class="quantity" type="number" name="quantity_<?php echo $i ?>" min="1" value="<?php echo $quantity ?>"> <a href="<?php echo url('shop/cart') ?>?action=delete&amp;id=<?php echo $product->uid() ?>">Remove</a></td>
	                <?php $prodtotal = floatval($product->price()->value)*$quantity ?>
	                <td>£<?php printf('%0.2f', $prodtotal) ?></td>
	            <?php $total += $prodtotal ?>
	        <?php endif; ?>
	    <?php endforeach; ?>
	                <td colspan="2">Subtotal</td>
	                <td>£<?php printf('%0.2f', $total) ?></td>
	                <?php $postage = cart_postage($total) ?>
	                <td colspan="2" class="align-right">Postage</td>
	                <td>£<?php printf('%0.2f', $postage) ?></td>
	                <th colspan="2" class="align-right">Total</th>
	                <th>£<?php printf('%0.2f', $total+$postage) ?></th>
	    <p><button type="submit">Pay with PayPal</button></p>
	    <p>or <a href="<?php echo url('shop') ?>">continue shopping</a></p>
   	<!-- footer here -->

You can see this in action at


I’ve used this code for an older website. It doesn’t work perfectly, but that was mostly because I wasn’t that familiar with Kirby then:

We’ve expected about 10-20 products, but the client wanted way more products, categories, shoe sizes, sales, a “not available”-status, checking out with the same product in two sizes, article numbers and some other additional things. Overall I’m not very satisfied with the final product, but the plugin itself served me well.

I’m not a big fan of building eCommerce websites at all, after experience with Magento and xt:Commerce. But with the right plugin, Kirby is perfect for small shops in my opinion.

1 Like

Remplace (cart.php template):

<?php if ($product = $products->findByUID($id)): ?>


<?php if ($product = $products->find($id)): ?>

Work on Kirby 2.

Little demo



So we have a more or less working shop plugin for kirby here, right?

Somebody up for putting it up on github?

Hey Guys,
i actually started this topic today : Is there a need for a kirby-based Shop System? now i was pointed to your project. Seems like you folks did a great job. Is the most recent status of the project? @plaidpowered are you the owner of the repository?

edit: Just read that the development has been stopped. I will most likely set up an own solution and see this as an inspiration. Anyone that is willing to contribute is very welcome to join.

@Tapefabrik, you may want to follow this ShopKit project.