Jump to content
Gadgetto

SnipWire - Snipcart integration for ProcessWire

Recommended Posts

SnipWire - Snipcart integration for ProcessWire

snipwire-logo.png.feda01eced6c5fdf0f113e7e7282ba6e.pngSnipcart is a powerful 3rd party, developer-first HTML/JavaScript shopping cart platform. SnipWire is the missing link between Snipcart and the content management framework ProcessWire.
With SnipWire, you can quickly turn any ProcessWire site into a Snipcart online shop. The SnipWire plugin helps you to get your store up and running in no time. Detailed knowledge of the Snipcart system is not required.

SnipWire is free and open source licensed under Mozilla Public License 2.0! A lot of work and effort has gone into development. It would be nice if you could donate an amount to support further development:

btn_donate_LG.gif.c8f4961c98cd4b5e8f81d517f5e68864.gif

Status update links (inside this thread) for SnipWire development

  • 2020-07-03 -- SnipWire 0.8.7 (beta) released! Fixes some small bugs and adds an indicator for TEST mode
  • 2020-04-06 -- SnipWire 0.8.6 (beta) released! Adds support for Snipcart subscriptions and also fixes some problems
  • 2020-03-21 -- SnipWire 0.8.5 (beta) released! Improves SnipWires webhooks interface and provides some other fixes and additions
  • 2020-03-03 -- SnipWire 0.8.4 (beta) released! Improves compatibility for Windows based Systems.
  • 2020-03-01 -- SnipWire 0.8.3 (beta) released! The installation and uninstallation process has been heavily revised.
  • 2020-02-08 -- SnipWire 0.8.2 (beta) released! Added a feature to change the cart and catalogue currency by GET, POST or SESSION param
  • 2020-02-03 -- SnipWire 0.8.1 (beta) released! All custom classes moved into their own namespaces.
  • 2020-02-01 -- SnipWire is now available via ProcessWire's module directory!
  • 2020-01-30 -- SnipWire 0.8.0 (beta) first public release! (module just submitted to the PW modules directory)
  • 2020-01-28 -- added Custom Order Fields feature (first SnipWire release version is near!)
  • 2020-01-21 -- Snipcart v3 - when will the new cart system be implemented?
  • 2020-01-19 -- integrated taxes provider finished (+ very flexible shipping taxes handling)
  • 2020-01-14 -- new date range picker, discount editor, order notifiactions, order statuses, and more ...
  • 2019-11-15 -- orders filter, order details, download + resend invoices, refunds
  • 2019-10-18 -- list filters, REST API improvements, new docs platform, and more ...
  • 2019-08-08 -- dashboard interface, currency selector, managing Orders, Customers and Products, Added a WireTabs, refinded caching behavior
  • 2019-06-15 -- taxes provider, shop templates update, multiCURL implementation, and more ...
  • 2019-06-02 -- FieldtypeSnipWireTaxSelector
  • 2019-05-25 -- SnipWire will be free and open source

Plugin Key Features

  • Fast and simple store setup
  • Full integration of the Snipcart dashboard into the ProcessWire backend (no need to leave the ProcessWire admin area)
  • Browse and manage orders, customers, discounts, abandoned carts, and more
  • Multi currency support
  • Custom order and cart fields
  • Process refunds and send customer notifications from within the ProcessWire backend
  • Process Abandoned Carts + sending messages to customers from within the ProcessWire backend
  • Complete Snipcart webhooks integration (all events are hookable via ProcessWire hooks)
  • Integrated taxes provider (which is more flexible then Snipcart own provider)

Useful Links

 

SnipWire-dashboard.thumb.png.a6344a9a024d6a39ef786a5705b332aa.png

 

---- INITIAL POST FROM 2019-05-25 ----

Spoiler

I wanted to let you know that I am currently working on a new ProcessWire module that fully integrates the Snipcart Shopping Cart System into ProcessWire. (this is a customer project, so I had to postpone the development of my other module GroupMailer).

The new module SnipWire offers full integration of the Snipcart Shopping Cart System into ProcessWire.

Here are some highlights:

  • simple setup with (optional) pre-installed templates, product fields, sample products (quasi a complete shop system to get started immediately)
  • store dashboard with all data from the snipcart system (no change to the snipcart dashboard itself required)
  • Integrated REST API for controlling and querying snipcart data
  • webhooks to trigger events from Snipcart (new order, new customer, etc.)
  • multi currency support
  • self-defined/configurable tax rates
  • etc.

Development is already well advanced and I plan to release the module in the next 2-3 months.
I'm not sure yet if this will be a "Pro" module or if it will be made available for free.

I would be grateful for suggestions and hints!

Please have a look at the screenshots to get an idea what I'm talking about (open spoiler):
(Please note: these screenshots are from an early development state of SnipWire. To see actual screens please have a look at later posts below!)

SnipWire_Settings.jpg

SnipWire_Dashboard1.jpg

Snipcart_Shop.jpg

Snipcart_Shop_Cart.jpg

 

  • Like 23
  • Thanks 4

Share this post


Link to post
Share on other sites

Hi @Gadgetto, this looks great!

I've played around with Snipcart and Foxycart quite a lot and then built my own solution (which was quite a pain as well 🤪 ). Snipcart definitely looked best IMHO but it is also quite expensive. But it may be worth that price if we have a good working module that integrates well and saves us lots of time during development.

20 hours ago, Gadgetto said:

I'm not sure yet if this will be a "Pro" module or if it will be made available for free. I would be grateful for suggestions and hints!

Well... free sounds great 🙂 No idea how much money one can make by selling a pro module to the community - I've never heard any numbers and there have been several discussions about that. So I'm not even sure if it makes sense at all to sell anything to the pw community. It's also more effort to setup some kind of selling process, api key verificaton etc. (well, maybe not for you now that you can use SnipWire for that 😄 ); I decided to release RockGrid free for example so that others can use it easily in their modules (didn't happen as far as I know), but I stated that extended support is not for free. But RockGrid is totally different. A shopping cart is of course much more mainstream and has a broader audience for sure. I could be a possible customer one day 😉 

 

  • Like 1

Share this post


Link to post
Share on other sites

This looks great! I've set up my fair share of Snipcart sites, but never bothered to abstract any of it into a module. So thanks for making this available in whichever form you're comfortable with, free or paid.

My Snipcart styles have usually been very tightly linked to the site stylesheets (shared SASS variables and mixins) and ended up in the global site stylesheet. Maybe the stylesheet URL input shouldn't be mandatory for sites that already have the Snipcart CSS embedded? Just a thought.

  • Like 2

Share this post


Link to post
Share on other sites
13 hours ago, d'Hinnisdaël said:

This looks great! I've set up my fair share of Snipcart sites, but never bothered to abstract any of it into a module. So thanks for making this available in whichever form you're comfortable with, free or paid.

My Snipcart styles have usually been very tightly linked to the site stylesheets (shared SASS variables and mixins) and ended up in the global site stylesheet. Maybe the stylesheet URL input shouldn't be mandatory for sites that already have the Snipcart CSS embedded? Just a thought.

Done! 🙂

1775980080_Bildschirmfoto2019-05-25um11_16_44.thumb.png.7519ed0e0449add26e92ca3fc9a355a8.png

  • Like 3

Share this post


Link to post
Share on other sites

UPDATE

OK, after I've faced that for and against again, I've decided to make the module freely available.

If you are interested, you can test the current state of development. I already put the module on GitHub. Please note that the software is not yet intended for use in a production system. (Alpha version). For example, the configuration and handling of the VAT rates are still missing. Also the dashboard is still incomplete. And many other things needs to be improved and implemented... 🙂

If you like, you can also submit feature requests and suggestions for improvement. I also accept pull requests.

https://github.com/gadgetto/SnipWire

  • Like 13

Share this post


Link to post
Share on other sites

ANOTHER UPDATE

SnipWires Taxes (VAT) configurator is ready!

I added a new custom Fieldtype FieldtypeSnipWireTaxSelector based on an idea of @BitPoet - thanks for that!

Also I created a full featured repeater for module config editor including drag&drop handling. Have a look at the animated GIF below. The taxes you configure here will be available as select option list in product page editor. The first tax in the configured list will be used a s the default tax in the custom field.

taxes-repeater.thumb.gif.75d243e965efeae179a1c794fe0564ba.gif

  • Like 9

Share this post


Link to post
Share on other sites
On 5/25/2019 at 10:35 AM, Gadgetto said:

OK, after I've faced that for and against again, I've decided to make the module freely available.

Thank you.

  • Like 4

Share this post


Link to post
Share on other sites

UPDATE 2019-06-15

The taxes repeater field in module config editor was updated:

  • changed to a grid view for more flexibility
  • added field validation
  • prepared the taxes-repeater field code to become a standalone flexible Inputfield module for general use (Array/JSON repeater input field which stores its values in a single text field)

The taxes handling is completed! SnipWire now acts as a full flexible taxes-provider for Snipcart (we use Webhooks for this). No configuration needed in Snipcart dashboard. SnipCart orders are now fully working (except shipping handling).

The sample shop templates got an update:

  • customer login/logout
  • customer dashboard link/button to view orders history and subscriptions
  • editing of customer profile

Other updates and fixes:

  • The SnipWire Dashboard was updated (Charts, Orders, Customers, ...) --> see screenshot below.
    The Dashboard fetches its data from Snipcart via CURL multi - the response time for a fresh load is now under 2 seconds
  • The Webhooks handler now supports all Snipcart events via hookable methods.
  • Snipwire now supports all major Admin themes (Uikit, Reno and Default)
  • All module classes/files are more structured (e.g. separate helper and service classes)
  • Under the hood many bugs are fixed and code is updated to prevent unexpected errors.
  • Added a crispy SVG logo for all SnipCart back-end pages 🙂

Screen-recording of updated taxes-repeater:

Taxes-Repeater-Update.thumb.gif.44ecf707f735f142c43a9df47e7a7980.gif

 

Screenshot of SnipWire Dashboard:

SnipWire-Dashboard.thumb.png.51584acdbcfdaaf95c6fac2f6fcccc0d.png

  • Like 11

Share this post


Link to post
Share on other sites

Looking great! Thx!

Nice to see apex charts in action. Did you build it as a module (or have thought about that) or is it implemented manually?

Share this post


Link to post
Share on other sites
8 hours ago, bernhard said:

Did you build it as a module (or have thought about that) or is it implemented manually?

Hi Bernhard,

currently integrated directly. But having this as module is a nice idea. The problem is, this thing has over 150 config parameters so packing it into a module will be quite a bit of work...

Share this post


Link to post
Share on other sites

You mean the config of the chart? Like type of chart, data, colors etc?

Of course it would not make sense to put all that into the module config. But it could make sense to have a fieldtype (or at least an inputfield) that can easily be added to a process module (or page edit screen) and that makes it easier and more streamlined to build those charts. In RockGrid (which also has lots of options) I use a PHP file to get the data (via RockFinder) and a JS file for the grid config.

I've started building a Chart module earlier this year, but did not release it: https://github.com/BernhardBaumrock/FieldtypeRockCharts Maybe you want to have a look and grab some ideas?

 

Share this post


Link to post
Share on other sites
23 minutes ago, bernhard said:

Of course it would not make sense to put all that into the module config. But it could make sense to have a fieldtype (or at least an inputfield) that can easily be added to a process module (or page edit screen) and that makes it easier and more streamlined to build those charts. In RockGrid (which also has lots of options) I use a PHP file to get the data (via RockFinder) and a JS file for the grid config.

I've started building a Chart module earlier this year, but did not release it: https://github.com/BernhardBaumrock/FieldtypeRockCharts Maybe you want to have a look and grab some ideas?

 

I'll first need to release SnipWire and in the phase of fine-tuning I would like to move some of the functionality into separate modules. A chart module could be such a candidate. I'm gonna check out your module and see how you were thinking of implementing that. Thanks for your hint!

The first separate module will be a fully configurable array/json repeater Inputfield which stores its values in a single text field. 

  • Like 1

Share this post


Link to post
Share on other sites

UPDATE 2019-08-08

The module has made hug steps forward and we are nearing a first beta release version. So for those of you who are interested, I wanted to let you know what happened in the meantime 🙂

  • The dashboard interface was refined.
  • Currency selector for switching dashboard currency (based on your currency fields)
  • Added dashboard sections for managing Orders, Customers and Products
  • Added a WireTabs interface to easily switch between the different dashboard sections.
  • Orders, Customers and Product-details are opened and edited in ProcessWire Panels
  • Added further properties to SnipCart product anchors like: categories, product dimensions, weight, and so on.
  • Added field selector to SnipWire settings for choosing the desired field (FieldtypePage) to be used for categories handling.
  • Refinded caching behavior. *)

*) the proper caching of SnipCart data fetched through their REST API is giving me headaches. I'm still not sure what to cache and how long. For example, think of retrieving the list of purchase orders and creating a pagination. Every single page has to be cached. What if new orders are added when flipping backwards? Then the page numbers could get out of hand. (this only as an example).

As SnipCart has relativ slow API response times (about 1.8-2.5 seconds for a request), I'm even thinking about developing a separate background job runner which continuously fetches data from SnipCart and caches it locally. Our SnipWire module could then only use locally stored data only.

What needs to be done:

  • As SnipCart has a totally broken presentation of multi currency values in it's dashboard (for example: they simply sum up order values in different currencies!) I need to calculate performance values manually. And this will be a huge job as the data comes from different REST API calls...
  • Orders, Customers and Products detail editors (order status update, setting the order tracking number, add metadata information, creating notifications on the specified orders, ...)
  • Order refunds handling through the SnipWire dashboard
  • Integration of external shipping providers
  • Integration of external taxes providers
  • Subscription handling through the SnipWire dashboard
  • Discount creation and handling through the SnipWire dashboard
  • Documentation, documentation, documentation!
  • and much more ...

Here are some fresh screens:

Spoiler

1-SnipWire-Dashboard.thumb.png.69ff1a7167f554302a321584289c0907.png

2-SniWire-Orders.thumb.png.6d3d9b11d0b5999e0906299d8e2374ab.png

3-SnipWire-Customers.thumb.png.65fcb3c61a51a98c2f07525640823c55.png

4-SnipWire-Products.thumb.png.4bb91757649570fe38e6c77b407c94a8.png

5-SnipWire-Settings.thumb.png.7a26e5422ffad6620b4f038a860b7dc9.png

6-SnipWire-Dashboard-daterangepicker.thumb.png.a3984e5c48da8e430391d545d3b10992.png

 

 

 

  • Like 10

Share this post


Link to post
Share on other sites

Very nice — I'm really impressed about how this is coming along. I particularly like how you manage to pack as many features into it while successfully staying within ProcessWire's visual language.

I wish I had a little more time on my hands to try it out in depth and give useful feedback.

Quote

As SnipCart has relativ slow API response times (about 1.8-2.5 seconds for a request), I'm even thinking about developing a separate background job runner which continuously fetches data from SnipCart and caches it locally. Our SnipWire module could then only use locally stored data only.

That sounds like a logical next step to me: using LazyCron to auto-fetch certain data. While it will increase complexity in the short term, it will probably make your job a lot easier in the long run and make for a better experience using the module.

  • Like 1

Share this post


Link to post
Share on other sites
5 minutes ago, d'Hinnisdaël said:

Very nice — I'm really impressed about how this is coming along. I particularly like how you manage to pack as many features into it while successfully staying within ProcessWire's visual language.

Thank your for the kind words! 🙂

6 minutes ago, d'Hinnisdaël said:

That sounds like a logical next step to me: using LazyCron to auto-fetch certain data. While it will increase complexity in the short term, it will probably make your job a lot easier in the long run and make for a better experience using the module.

I don't know if this will make it into the first release version but it seems to be a necessary step.

LazyCron, on the other hand, does not seem to be well suited. This would cause delays for website visitors. I was thinking more of a separate worker process, or multiple parallel processes, running asynchronously and externally triggered by a cron job or by Javascript runner. I have already implemented something like this for a newsletter module for MODX.

  • Like 3

Share this post


Link to post
Share on other sites
1 hour ago, Gadgetto said:

LazyCron, on the other hand, does not seem to be well suited. This would cause delays for website visitors.

Doesn't LazyCron hook into ProcessPageView::finished to avoid this exact problem? What I've done in the past to avoid long-running requests is to merely use LazyCron to trigger the time-intensive action via curl or wget, making it asynchronous.

Share this post


Link to post
Share on other sites
12 hours ago, d'Hinnisdaël said:

Doesn't LazyCron hook into ProcessPageView::finished to avoid this exact problem? What I've done in the past to avoid long-running requests is to merely use LazyCron to trigger the time-intensive action via curl or wget, making it asynchronous.

To my best knowledge it is still same request and visitor has to wait before actual content is ready to be served. Lazycron is (in my opinion) usable for very quick cleanup type of things only. Much better to use actual cron or other background process to do that kind of stuff.

SnipWire looks fantastic! Great that PW will have multiple e-commerce options available!

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, apeisa said:

To my best knowledge it is still same request and visitor has to wait before actual content is ready to be served. Lazycron is (in my opinion) usable for very quick cleanup type of things only. Much better to use actual cron or other background process to do that kind of stuff.

You are right, it's a single process. Hooking into any method will still be in the same process and the visitor will need to consume the request time. I'll need to "launch" a new (background) process which will do the heavy lifting.

  • Like 1

Share this post


Link to post
Share on other sites
On 5/15/2019 at 7:47 PM, Gadgetto said:

Status update links (inside this thread) for SnipWire development will be always posted here:

2019-08-08
2019-06-15
2019-06-02
2019-05-25

If you are interested, you can test the current state of development:

https://github.com/gadgetto/SnipWire

Please note that the software is not yet intended for use in a production system (alpha version).
If you like, you can also submit feature requests and suggestions for improvement. I also accept pull requests.

---- INITIAL POST FROM 2019-05-25 ----

I wanted to let you know that I am currently working on a new ProcessWire module that fully integrates the Snipcart Shopping Cart System into ProcessWire. (this is a customer project, so I had to postpone the development of my other module GroupMailer).

The new module SnipWire offers full integration of the Snipcart Shopping Cart System into ProcessWire.

Here are some highlights:

  • simple setup with (optional) pre-installed templates, product fields, sample products (quasi a complete shop system to get started immediately)
  • store dashboard with all data from the snipcart system (no change to the snipcart dashboard itself required)
  • Integrated REST API for controlling and querying snipcart data
  • webhooks to trigger events from Snipcart (new order, new customer, etc.)
  • multi currency support
  • self-defined/configurable tax rates
  • etc.

Development is already well advanced and I plan to release the module in the next 2-3 months.
I'm not sure yet if this will be a "Pro" module or if it will be made available for free.

I would be grateful for suggestions and hints!

(please have a look at the screenshots to get an idea what I'm talking about)

 

SnipWire_Settings.jpg

SnipWire_Dashboard1.jpg

Snipcart_Shop.jpg

Snipcart_Shop_Cart.jpg

This is really amazing work you have done. Congrats and keep it up 

Share this post


Link to post
Share on other sites

UPDATE 2019-10-18

Some time has passed since the last update. But don't worry I've been working on it!

A good back of time devoured the development of our new documentation platform.

The new docs website can be found here:
https://docs.bitego.com (of course it runs under ProcessWire)

Most contents of existing projects are already imported. And I just started with the documentation for SnipWire.

Of course development on SnipWire itself has been continued as well:

  • the stability of the REST queries and their processing has been significantly improved
  • the filter (search) functions for the list views (orders, customers, products) have been implemented.
  • native ProcessWire pagination for list views has been implemented
  • more snipcart fields have been added to the product definition
  • several bugs have been fixed

169252132_Bildschirmfoto2019-10-18um21_48_35.thumb.png.367c614a4cf4ca657312e5c8e0bc99e0.png

Next steps:

  • finishing detail-views for Customers, Products and Orders
  • development of a parallel process that continuously fetches data from Snipcart and makes it available as a local cache. (this should significantly minimize the waiting time for REST queries)
  • implementation of Abandoned Carts Handling
  • implementation of Refunds Handling

Thats it for now! I also hope some of you will find the time and testing the current status. I would be very grateful for your feedback.

  • Like 9

Share this post


Link to post
Share on other sites

What I forgot to tell:

Snipcart recently became even more interesting in terms of cost!

Snipcart removed the Pro Pack bundle (70 USD/month) from their pricing. All Pro features will be available on Standard plan:

  • Abandoned carts recovery
  • Real-time shipping estimates
  • Inventory management
  • Custom email templates
  • TaxCloud & TaxJar integrations
  • Like 7

Share this post


Link to post
Share on other sites
12 hours ago, Gadgetto said:

Snipcart removed the Pro Pack bundle (70 USD/month) from their pricing. All Pro features will be available on Standard plan

Looks like they went back to their previous pricing model without a premium plan. This will make it a lot easier to suggest Snipcart in the future — paying 70$ a month for custom email templates was really limiting the number of customers that were a good fit for it.

Share this post


Link to post
Share on other sites

@Gadgetto Snipwire looks awesome. Many many thanks. I will give it a test run. May I ask you two questions.

- with snipcart/snipwire is it easily posible to calculate price reductions before checkout. let's say you buy two t-shirts and like to reduce the second shirt by 10%?

- I've seen the dashboard has links for bills. Are those in PDF Format and in case can one customize the PDF template?

Much Kudos again! Great working and sharing!

Share this post


Link to post
Share on other sites

Thanks for the kind words!

1 hour ago, toni said:

- with snipcart/snipwire is it easily posible to calculate price reductions before checkout. let's say you buy two t-shirts and like to reduce the second shirt by 10%?

Snipcart has a lot of different discount features! Here is a cut out from my process module which should show what's possible:

$this->discountsTypes = array(
    'FixedAmount' => $this->_('Fixed amount deducted from order total'),
    'Rate' => $this->_('Percentage rebate on order total'),
    'AlternatePrice' => $this->_('Discount price provided by alternate price list'),
    'Shipping' => $this->_('Discount on shipping'),
    'FixedAmountOnItems' => $this->_('Fixed amount deducted on specified products'),
    'RateOnItems' => $this->_('Rate deducted on specified products'),
    'FixedAmountOnCategory' => $this->_('Fixed amount deducted on items of specified categories'),
    'RateOnCategory' => $this->_('Rate deducted on products of specified categories'),
    'GetFreeItems' => $this->_('Free products when customer buys specified quantity of product'),
    'AmountOnSubscription' => $this->_('Fixed amount on subscription'),
    'RateOnSubscription' => $this->_('Rate on subscription'),
);
$this->discountsTriggers = array(
    'Code' => $this->_('Enter discount code'),
    'Product' => $this->_('Specific product added'),
    'Total' => $this->_('Order reaches specific amount'),
    'QuantityOfAProduct' => $this->_('Product added a number of times'),
    'CartContainsOnlySpecifiedProducts' => $this->_('Cart only contains specified products'),
    'CartContainsSomeSpecifiedProducts' => $this->_('Cart contains some of specified products'),
    'CartContainsAtLeastAllSpecifiedProducts' => $this->_('Cart contains at least all specified products'),
);
1 hour ago, toni said:

- I've seen the dashboard has links for bills. Are those in PDF Format and in case can one customize the PDF template?

Yes, invoices can be downloaded in PDF format and the layout is customizable via the Snipcart dashboard!

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By d'Hinnisdaël
      Happy new year, everybody 🥬
      I've been sitting on this Dashboard module I made for a client and finally came around to cleaning it up and releasing it to the wider public. This is how it looks.
      ProcessWire Dashboard

      If anyone is interested in trying this out, please go ahead! I'd love to get some feedback on it. If this proves useful and survives some real-world testing, I'll add this to the module directory.
      Download
      You can find the latest release on Github.
      Documentation
      Check out the documentation to get started. This is where you'll find information about included panel types and configuration options.
      Custom Panels
      My goal was to make it really simple to create custom panels. The easiest way to do that is to use the panel type template and have it render a file in your templates folder. This might be enough for 80% of all use cases. For anything more complex (FormBuilder submissions? Comments? Live chat?), you can add new panel types by creating modules that extend the DashboardPanel base class. Check out the documentation on custom panels or take a look at the HelloWorld panel to get started. I'm happy to merge any user-created modules into the main repo if they might be useful to more than a few people.
       Disclaimer
      This is a pre-release version. Please treat it as such — don't install it on production sites. Just making sure 🍇
      Roadmap
      These are the things I'm looking to implement myself at some point. The wishlist is a lot longer, but those are the 80/20 items that I probably won't regret spending time on.
      Improve documentation & add examples ⚙️ Panel types Google Analytics ⚙️ Add new page  🔥 Drafts 🔥 At a glance / Page counter 404s  Layout options Render multiple tabs per panel panel groups with heading and spacing between ✅ panel wrappers as grid item (e.g. stacked notices) ✅ Admin themes support AdminThemeReno and AdminThemeDefault ✅ Shortcuts panel add a table layout with icon, title & summary ✅ Chart panel add default styles for common chart types ✅ load chart data from JS file (currently passed as PHP array) Collection panel support image columns ✅ add buttons: view all & add new ✅
    • By Pip
      Hi everyone!
      I'm trying out the Login/Register module for my site. Noted that the module assigns the newly registered user to login-register role. 
      Once you modify the login-register role's permissions, particularly adding page-edit, the new member role will be set to guest. 
      Thing is I'd like to grant my new users the power to create their own pages. Any advice? 
      Thanks. 
    • By Sten
      Hello
      Till now I hacked something with the twig template but it works no more with new PW versions so I look forward to create a module. I am working on a site in multiple languages : French, English, Italian, German, Spanish, Portuguese, Hebrew, Russian. The new posts are entered in any language with a field for language. Till now, I got twig files to get the translations with constants defined for each part of the pages.
      So I'd like to create a module to include theses files added according to the url /fr/en/...
      Have you some observations to do before I begin about the direction to take ?
      Thank you
    • By ukyo
      Mystique Module for ProcessWire CMS/CMF
      Github repo : https://github.com/trk/Mystique
      Mystique module allow you to create dynamic fields and store dynamic fields data on database by using a config file.
      Requirements
      ProcessWire 3.0 or newer PHP 7.0 or newer FieldtypeMystique InputfieldMystique Installation
      Install the module from the modules directory:
      Via Composer:
      composer require trk/mystique Via git clone:
      cd your-processwire-project-folder/ cd site/modules/ git clone https://github.com/trk/Mystique.git Module in live reaction with your Mystique config file
      This mean if you remove a field from your config file, field will be removed from edit screen. As you see on youtube video.
      Using Mystique with your module or use different configs path, autoload need to be true for modules
      Default configs path is site/templates/configs/, and your config file name need to start with Mystique. and need to end with .php extension.
      Adding custom path not supporting anymore !
      // Add your custom path inside your module class`init` function, didn't tested outside public function init() { $path = __DIR__ . DIRECTORY_SEPARATOR . 'configs' . DIRECTORY_SEPARATOR; Mystique::add($path); } Mystique module will search site/modules/**/configs/Mystique.*.php and site/templates/Mystique.*.php paths for Mystique config files.
      All config files need to return a PHP ARRAY like examples.
      Usage almost same with ProcessWire Inputfield Api, only difference is set and showIf usage like on example.
      <?php namespace ProcessWire; /** * Resource : testing-mystique */ return [ 'title' => __('Testing Mystique'), 'fields' => [ 'text_field' => [ 'label' => __('You can use short named types'), 'description' => __('In file showIf working like example'), 'notes' => __('Also you can use $input->set() method'), 'type' => 'text', 'showIf' => [ 'another_text' => "=''" ], 'set' => [ 'showCount' => InputfieldText::showCountChars, 'maxlength' => 255 ], 'attr' => [ 'attr-foo' => 'bar', 'attr-bar' => 'foo' ] ], 'another_text' => [ 'label' => __('Another text field (default type is text)') ] ] ]; Example:
      site/templates/configs/Mystique.seo-fields.php <?php namespace ProcessWire; /** * Resource : seo-fields */ return [ 'title' => __('Seo fields'), 'fields' => [ 'window_title' => [ 'label' => __('Window title'), 'type' => Mystique::TEXT, // or InputfieldText 'useLanguages' => true, 'attr' => [ 'placeholder' => __('Enter a window title') ] ], 'navigation_title' => [ 'label' => __('Navigation title'), 'type' => Mystique::TEXT, // or InputfieldText 'useLanguages' => true, 'showIf' => [ 'window_title' => "!=''" ], 'attr' => [ 'placeholder' => __('Enter a navigation title') ] ], 'description' => [ 'label' => __('Description for search engines'), 'type' => Mystique::TEXTAREA, 'useLanguages' => true ], 'page_tpye' => [ 'label' => __('Type'), 'type' => Mystique::SELECT, 'options' => [ 'basic' => __('Basic page'), 'gallery' => __('Gallery'), 'blog' => __('Blog') ] ], 'show_on_nav' => [ 'label' => __('Display this page on navigation'), 'type' => Mystique::CHECKBOX ] ] ]; Searching data on Mystique field is limited. Because, Mystique saving data to database in json format. When you make search for Mystique field, operator not important. Operator will be changed with %= operator.
      Search example
      $navigationPages = pages()->find('my_mystique_field.show_on_nav=1'); $navigationPages = pages()->find('my_mystique_field.page_tpye=gallery');
    • By Robin S
      This is a module I made as an experiment a while ago and never got around to releasing publicly. At the time it was prompted by discussions around using Repeater fields for "page builder" purposes, where the depth feature could possibly be used for elements that would be nested inside other elements. I thought it would be useful to enforce some depth rules and translate the depth data into a multi-dimensional array structure.
      I'm not using this module anywhere myself but maybe it's useful to somebody.
      Repeater Depth Helper
      This module does two things relating to Repeater fields that have the "Item depth" option enabled:
      It enforces some depth rules for Repeater fields on save. Those rules are:
      The first item must have a depth of zero. Each item depth must not be more than one greater than previous item depth. It provides a RepeaterPageArray::getDepthStructure helper method that returns a nested depth structure for a Repeater field value.
      Helper method
      The module adds a RepeaterPageArray::getDepthStructure method that returns a multi-dimensional array where the key is the page ID and the value is an array of nested "child" items, or null if there are no nested children.
      Example

      The module doesn't make any assumptions about how you might want to use the depth structure array, but here is a way you might use it to output a nested unordered list.
      // Output a nested unordered list from a depth structure array function outputNestedList($depth_structure, $repeater_items) { $out = "<ul>"; foreach($depth_structure as $page_id => $nested_children) { $out .= "<li>" . $repeater_items->get("id=$page_id")->title; // Go recursive if there are nested children if(is_array($nested_children)) $out .= outputNestedList($nested_children, $repeater_items); $out .= "</li>"; } $out .= "</ul>"; return $out; } $repeater_items = $page->my_repeater; $depth_structure = $repeater_items->getDepthStructure(); echo outputNestedList($depth_structure, $repeater_items);
       
      https://github.com/Toutouwai/RepeaterDepthHelper
      https://modules.processwire.com/modules/repeater-depth-helper/
×
×
  • Create New...