Shopkit commerce plugin

There must be something in my coffee.

Version 1.0.3 is here :coffee:

  • Bug fixes
    • Fixed login redirect on subfolder installs
    • Removed incorrect help text from Register page
  • Theme options
    • Choose custom colours (Shopkit adjusts brightness to ensure readability)
    • Background colour & image options, including blurred background
  • Panel improvements
    • Improved UI for selecting images
    • Numeric field validation within structure fields
    • Tabbed layout to organize site options and shop settings
  • Added Brand as a default product field (helps with Google rich data snippets)
  • Added hours of operation to the Contact page as a separate field
  • Added Related products to the Default template
  • Stylish photo slider for most templates
  • Updated admin navbar with new icons and Design button for theme options
  • Added currency code (e.g. USD) to Cart page for clarity
  • Set currency to $USD by default
  • Friendlier error page text
  • Sidebar sections are hidden if content is not populated (i.e. categories, contact info)

Download: https://github.com/samnabi/shopkit/releases/tag/v1.0.3

Hi Sam,

This looks like a great toolkit, I’m downloading it to play around with and style locally before deciding whether to use it live on an upcoming project.

I have a couple of suggestions that would certainly benefit my own use, and possibly other users too:

  1. Discount Codes
    The ability to add/remove promotional discount codes: set text eg. SS201610, set monetary discount eg. 10%, set from/to duration dates eg. 1 Mar 2016 to 1 May 2016. Applicable at multiple levels: site wide, category wide or product only. (Though this may be too complex and site wide may be the only/best feasible option.)

  2. Pay What You Want
    The ability to add a “pay what you want” input rather than a fixed price to a product, allowing the customer to choose their own price to pay. Basically a pay/donate input used in a different way. Again, possibly applied at multiple levels but probably best at product level only.

That’s it for now. It would be great to hear your response and any ideas you might have about my suggestions.

Thanks for your work on Shopkit, it looks very promising as a proper shop solution for Kirby.

Kind regards,
Marc.

I think @samnabi is releasing a new version of Shopkit very soon which includes the discount codes feature you’re talking about with the duration features you mentioned. :stuck_out_tongue_winking_eye: If you want to play with it, download Shopkit from the ‘dev’ branch on Github.

Hi @mp75, thanks for the suggestions! As @irvin mentioned, I have developed discount codes for the next release. There are discount codes that apply site-wide:

… and also individual sale prices for products that can (optionally) be triggered by a discount code.

So the discount codes and sale prices are loosely coupled, they can be used individually or together. I hope this covers your use cases!

As for pay what you want, that’s a great feature that I think makes sense along with digital downloads. I will add it to the roadmap, but this will probably not make it to the next release.

If you’ve been following the GitHub issue tracker, I’ve been marking a lot of features for version 1.1. I thought I would get v1.1 done sooner, but it looks like that will be a few months away.

In the meantime, I’ll make sure I release a new version 1.0.4, which includes discount codes, before the end of March!

1 Like

Thanks for your reply.

It looks like you read my mind there. The discount feature is just what I was thinking of, and good to see you agree the pay what you want feature could be useful too.

Look forward to that discount code release, cheers for the great work.

Excellent work, Sam! Really looking forward to developing with this and then getting a bunch of licenses from you :slightly_smiling:

1 Like

Hey Sam, i really like your plugin. I’m trying it on localhost. Could you tell me why it gets me an error after i click on the Pay Now button? Is it because of the sandbox mode for PayPal?

And another feature that would be very nice is the possibility to assign an order to a role. So that i can say Order XY is getting packed and shipped by Person XY.

Thanks for that so far. I’d really appreciate, if you could help me out here.

Tobi

and another thing that bothers me is that the tax is EXcluded from the price. Given that, the tax fee is getting added at the end. In Germany it’s normal, that the given prices on the shop are with tax INcluded. Is there any possibility to achieve this?

Greets Tobi

Hi Tobi, thanks for the feedback!

Cart redirect issue

Please see Issue 57 on GitHub to address your first problem. This is a bug that will be fixed in the next release, or you can apply a workaround yourself.

Assign an order to a role

I’ve decided to move away from using Kirby’s user roles in Shopkit – going forward, there will be only two roles (admin and customer). Additional roles (wholesaler) were originally being used to set discounts, but the next release will have a more robust system of discount codes instead.

Also in the next release is a simple email notification system that hopefully will meet your needs:

(Yes, my test shop sells socks)

Tax included vs excluded

This is a good point, I will include the option for tax included in a future release. This will affect multiple templates (wherever prices are displayed), so I have to see how complicated this will be to achieve.

Hey Sam, thanks for the quick answer. I’m going to try this tomorrow.

You see a quick solution for the tax issue? That would be quite necessary for my current needs. Any ideal in which template to focus to find a workaround?

Thanks so far
Tobi

Hi Sam,

1. Total NaN

I’ve got a problem with the cart: As long as I use the “free shipping” option, everything is fine. But when I have a Shipping method which is selected in the Shipping section of the cart, I get as total a NaN message. Can’t find the error.

2. Pay later? Other methods?

Is there a documentation, how other paying methods can be used? As an alternative for Paypal would be “pay later” interesting, as a way to receive an invoice and pay that. Just don’t get it working - the pay later option is not displayed like it should. And how do I get the adress etc. from the user?

Best,
Mario

I don’t know about the Shopkit plugin, but I had a similar issue with an ecommerce system – with me, it was because of a locale setting which led to a calculating issue (using comma instead of a dot as decimal separator). This issue could be solved by Shopkit directly (maybe it already does), however you can also solve this by yourself by setting the detailed locale value: locale | Kirby CMS (numeric and monetary)

Thank you for your tipp. But this doesn’t seem to be the problem. For example: The tax, based on the prices, are calculated correctly. It’s only the sum, where I get the NaN.

It’s only the sum, where I get the NaN.

The total sum of the order is calculated and displayed with JavaScript (so that the number changes as you select a new shipping option).

Are there any errors showing up in your JavaScript console?

Pay Later

I know I’m behind with documentation :cold_sweat:

For a sense of how multiple payment gateways work, please take a look at site/snippets/cart.process.get.php

You could extend this file to handle a different gateway.

For “pay later”, there is already an option for that, which you can control in the settings for the shop page.

Let me know if you have any more questions!

@ToGe88, I’ve listed the files that would be affected by a “tax included” flag here: https://github.com/samnabi/shopkit/issues/61

It doesn’t seem like a straightforward issue to solve, so some further discussion on the GitHub page may be helpful.

Hi, I had a couple of ideas/suggestions for the discount codes feature.

  1. The ability to track how many times a coupon has been used. This could be displayed in the discount table in the panel with the rest of the discount info.
  2. Using the same counter as the last feature, we could also add a limit to how many times a coupon can be used.
  3. Discount code urls with discount directory before the code so it won’t interfere with any new or existing content. Example: website.com/discount/2016WOOHO
  4. Centralize all discount codes. Instead of applying a separate coupon to an item in its panel page, we could instead have everything in the discount section that allows you to pick which items (maybe even categories) it applies to using the multi-select plugin. This would seem to me to be a bit more organized and easier to manage for the user. But this is just my 2 cents. The only problem is that there might be some performance issues if there’s too many products(?) and if that’s the case, then I rather have it the way it’s currently implemented.

Once again, thanks for the great work! I’m eagerly waiting on the new version of ShopKit! :smile:

1 Like

No there are no errors in the console.

The source of the shipping-option looks like that:

<option value="All::2,00">
All (2.00&nbsp;€)
</option>

May the comma in the value be the problem?

It looks like that:

Hey thanks for that, i’ll have a look into that. Maybe i get a workaround by not displaying the non-taxed price at all. And show the taxed price only…

Another question i have: i get errors for the search and the pdf invoice at the orders. What should i do with this to fix it?

Greetz Tobi

I’ve found the reason for the NaN:

The value for var shipping used in the js was as Number with Comma as separator. By replacing the commy by point, the calculation works. I have therefore added

        var shipping = shipping.replace(",",".");

to the cart.php.