Jump to content
Gadgetto

SnipWire - Snipcart integration for ProcessWire

Recommended Posts

UPDATE 2019-11-15

In the last 3 weeks I (nearly) finished the complete order handling for store merchants (ProcessWire backend). This includes the following features:

  • search for orders
  • filter orders
  • extensive overview of all order details
  • download of invoices
  • resend invoices to customers
  • refund amounts to customers

... all right from within your ProcessWire backend!

That doesn't sound like much, but it was a good piece of work. 🙂

Here is a short clip to demonstrate the new features:

order_handling.thumb.gif.4dc4ced581d0f2c409d62613bb8f3358.gif

  • Like 16
  • Thanks 1

Share this post


Link to post
Share on other sites

Hi @Gadgetto,

Thank you for this great module, currently I'am using it for a test-case.

When I updated with your recent version I get the following error when I want to navigate to the dashboard / products page:

Fatal error: Uncaught ProcessWire\PageFinderSyntaxException: Field does not exist: snipcart_item_id in /Users/macbookweb014/Documents/BB/localhost/wetthrasport/wire/core/PageFinder.php:1272 Stack trace: #0

Can you help me fixing it? Do I need to create a snipcart_item_id field?

Thanks in advance!

Kind regards, 
Peejay

 

Share this post


Link to post
Share on other sites
4 hours ago, Peejay said:

When I updated with your recent version I get the following error when I want to navigate to the dashboard / products page:

Fatal error: Uncaught ProcessWire\PageFinderSyntaxException: Field does not exist: snipcart_item_id in /Users/macbookweb014/Documents/BB/localhost/wetthrasport/wire/core/PageFinder.php:1272 Stack trace: #0

Can you help me fixing it? Do I need to create a snipcart_item_id field?

Hi @Peejay,

did you run the Additional stepsInstall Snipcart products package in SnipWire module settings?

This step installs product templates, files, fields and some demo pages required to build a Snipcart product catalogue. This additional step is needed to prevent unintended deletion of your Snipcart products catalogue when main module is uninstalled.

In the current alpha version this isn't yet checked by SnipWire.

If you did already run the additional step with an earlier SnipWire version there will be fields missing which were added in a later version. So you will need to re-run this step. The missing resources(fields, templates, pages, ...) will then be installed. Existing ones won't be touched!

To re-run this step, you will need to edit/remove a key in database directly:

DB table: "modules" -> find entry with class "SnipWire" -> edit the "data" field and remove the Json key: "product_package":true (be sure to leave a valid Json string - you will need to also remove the corresponding comma :

{"api_key":"YOUR_LIVE_API_KEY","api_key_test":"ODQzZTc1MjktZGQxNy00YmUzLWFkMWYtZDE3MDQ2YTk1ODNjNjM2ODE3NTg5NzUyNDQxOTc0","api_key_secret":"YOUR_LIVE_API_KEY_SECRET","api_key_secret_test":"","snipcart_environment":"0","single_page_shop":"","single_page_shop_page":1,"credit_cards":["visa","mastercard","amex"],"currencies":["eur","usd"],"show_cart_automatically":1,"shipping_same_as_billing":1,"show_continue_shopping":1,"split_firstname_and_lastname":1,"snipcart_debug":1,"snipcart_css_path":"https:\/\/cdn.snipcart.com\/themes\/2.0\/base\/snipcart.min.css","snipcart_css_integrity":"","snipcart_js_path":"https:\/\/cdn.snipcart.com\/scripts\/2.0\/snipcart.js","snipcart_js_integrity":"","include_jquery":"","jquery_js_path":"https:\/\/code.jquery.com\/jquery-3.3.1.min.js","jquery_js_integrity":"sha256-FgpCb\/KJQlLNfOu91ta32o\/NMZxltwRo8QtmkMRdAu8=","excluded_templates":["promailer-email","promailer-subscribe"],"cart_image_width":65,"cart_image_height":65,"cart_image_quality":70,"cart_image_hidpi":1,"cart_image_hidpiQuality":50,"cart_image_cropping":1,"data_item_name_field":"title","uninstall":"","submit_save_module":"Submit","taxes_included":1,"webhooks_endpoint":"\/webhooks\/snipcart","include_snipcart_css":1,"taxes":"[{\"name\":\"20% VAT\",\"numberForInvoice\":\"\",\"rate\":\"0.20\",\"appliesOnShipping\":[]},{\"name\":\"10% VAT\",\"numberForInvoice\":\"\",\"rate\":\"0.10\",\"appliesOnShipping\":[]},{\"name\":\"10% VAT (Shipping)\",\"numberForInvoice\":\"\",\"rate\":\"0.10\",\"appliesOnShipping\":[\"1\"]}]","snipwire_debug":1,"data_item_categories_field":"snipcart_item_categories","product_package":true}

After the key is removed, visit the SnipCart module settings again and re-run the product package installer!

In the release version of SnipCart, this will be handled automatically. On each update it will check if there are new fields or other resources to be installed.

Hope this helps!

p.s. You could also completely uninstall the SnipCart module and then reinstall - this should also activate the product package installer link!

-- Martin

  • Like 3

Share this post


Link to post
Share on other sites

@Peejay,

great!

what would be interesting for me is: do you think that the performance in SnipWire dashboard/backend is OK or do I need to find another way to fetch Snipcart data?

— Martin

Share this post


Link to post
Share on other sites

@Gadgetto,

For now the performance is OK! I'm still in testing mode. In two weeks I put the site live and when I have some orders I let you know how the performance is!

Pj

Share this post


Link to post
Share on other sites
21 minutes ago, Peejay said:

@Gadgetto,

For now the performance is OK! I'm still in testing mode. In two weeks I put the site live and when I have some orders I let you know how the performance is!

Pj

Thanks for reporting back!

I just published a new version on GitHub which has some great performance improvements and a lot of other new features!

The orders list is now loaded in 1 - 1.5 seconds (instead of 4 seconds).
The dashboard is also affected by these changes and should load much faster now!

  • Like 3

Share this post


Link to post
Share on other sites

Hi Martin,

that looks very promising! Unfortunately I can't get the module to work properly. I'm using the last dev version of processire. I get the following error when I try to install the sample products:
Raw data option with CURL not supported for GET 
In /wire/core/WireHttp.php line 642

Then I get when saving a product:
Snipcart product with SKU [1032] could not be fetched. [500 Internal Server Error: ]

I tried it in different environments, but in MAMP I also get these errors.

Share this post


Link to post
Share on other sites
6 hours ago, Noboru said:

Hi Martin,

that looks very promising! Unfortunately I can't get the module to work properly. I'm using the last dev version of processire. I get the following error when I try to install the sample products:
Raw data option with CURL not supported for GET 
In /wire/core/WireHttp.php line 642

Then I get when saving a product:
Snipcart product with SKU [1032] could not be fetched. [500 Internal Server Error: ]

I tried it in different environments, but in MAMP I also get these errors.

Hi @Noboru

I have a clue what's causing this problem. I need a little time. I'll contact you when I have fixed that.

In the meantime you could comment out the following lines in file SnipWire.module.php (should be line 96-98)

$this->addHookAfter('Pages::saved', $this, 'publishSnipcartProduct');
$this->addHookAfter('Pages::unpublished', $this, 'unpublishSnipcartProduct');
$this->addHookAfter('Pages::trashed', $this, 'unpublishSnipcartProduct');

-- Martin

  • Like 1

Share this post


Link to post
Share on other sites

@Noboru,

I just tried to reproduce the problem but couldn't. I installed ProcessWire 3.0.147 on a fresh MAMP host and installed SnipCart on the naked system. Also installed the additional resources package from within SnipWire settings - and it worked like expected.

Could you please provide more infos regarding your setup? PHP version, CURL version, additional installed modules, ...?

Share this post


Link to post
Share on other sites

I have a general question regarding required PW version for my upcoming SnipWire module:

SnipWire is a huge module which touches big parts of the PW core API. As a sample - only the WireHttp class had at least 10 fixes and improvements since v 3.0.123 which are mandatory for SnipWire to work properly.

I'm planning to release the module with a minimum requirement of PW version around 3.0.148  (which should represent the coming master version). Do you think this is a good idea or should I stay at - let's say 3.0.123 and struggle with many workarounds to stay downwards compatible?

Share this post


Link to post
Share on other sites

I would say that this answers your question 🙂

13 minutes ago, Gadgetto said:

SnipWire is a huge module which touches big parts of the PW core API. As a sample - only the WireHttp class had at least 10 fixes and improvements since v 3.0.123 which are mandatory for SnipWire to work properly.

Don't make more work for yourself, both in coding and in support.

 

  • Like 1

Share this post


Link to post
Share on other sites
12 minutes ago, rick said:

 

Don't make more work for yourself, both in coding and in support.

Completely agree. The module will only profit from you enjoying working on it, so go easy on yourself and make use of available core features where necessary. Besides, ProcessWire is ridiculously easy to keep updated, so I don't feel like you're leaving anybody behind.

  • Like 1

Share this post


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

Completely agree. The module will only profit from you enjoying working on it, so go easy on yourself and make use of available core features where necessary. Besides, ProcessWire is ridiculously easy to keep updated, so I don't feel like you're leaving anybody behind.

Exactly, I am always on the latest dev version whenever I need to work on a site as it is so easy to update, and it is always stable in my eyes.

Share this post


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

I'm planning to release the module with a minimum requirement of PW version around 3.0.148

+1 🙂

Share this post


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

my upcoming SnipWire module

BTW, when can we expect that to happen? Sounds like sooner than the end of December maybe? Is it going to be the first production ready version?

Thanks for sharing all your hard work, and do not forget to ship it with a "Donation button".

  • Like 3

Share this post


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

@Noboru,

I just tried to reproduce the problem but couldn't. I installed ProcessWire 3.0.147 on a fresh MAMP host and installed SnipCart on the naked system. Also installed the additional resources package from within SnipWire settings - and it worked like expected.

Could you please provide more infos regarding your setup? PHP version, CURL version, additional installed modules, ...?

Hi @Gadgetto,

I'm using MAMP Pro 5.5.1 with PHP 7.3.8 (tried it with 7.1.31 with the same result), 
 

/Applications/MAMP/Library/bin/curl --version
curl 7.65.1 (x86_64-apple-darwin13.4.0) libcurl/7.65.1 OpenSSL/1.0.2o zlib/1.2.8 nghttp2/1.29.0
Release-Date: 2019-06-05
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS HTTP2 HTTPS-proxy IPv6 Largefile libz NTLM NTLM_WB SSL TLS-SRP UnixSockets

It's also an naked PW 3.0.147 without any other modules.

Its the same result like on my webhost (curl 7.19.7 , PHP 7.3.12).

More testing on webserver (because webhooks and full configuration):
If I set the price to a value without a comma everything works as expected (SnipWire log: Fetched Snipcart product with SKU [1116] / ID [xxx-xxx-xxx-xxx]. 

But if the product price is for example 11.50, I get Snipcart product with SKU [1116] could not be fetched. [500 Internal Server Error: ]

I've tried different settings for decimal separator in app.snipcart.com Regional Settings.

The Markup for the Add-to-cart-Button looks like this:

 

<button class="snipcart-add-item" title="Add to cart" data-item-name="Axolotl Juicer" data-item-id="1116" data-item-price="11,5" data-item-url="https://roland.zumpixel.de/shop/axolotl-juicer/" data-item-description="Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur." data-item-image="https://xxx.xx.de/site/assets/files/1116/beer3.65x65-hidpi.jpg" data-item-metadata="{&quot;id&quot;:1116,&quot;created&quot;:1576098063,&quot;modified&quot;:1576185868,&quot;published&quot;:1576098063,&quot;created_users_id&quot;:41,&quot;modified_users_id&quot;:41}" data-item-quantity="1" data-item-quantity-step="1" data-item-stackable="true" data-item-taxable="true" data-item-taxes="20% VAT" data-item-has-taxes-included="true" data-item-shippable="true">Add to cart</button>

 

Armin

Edited by Noboru
more details

Share this post


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

Hi @Gadgetto,

I'm using MAMP Pro 5.5.1 with PHP 7.3.8 (tried it with 7.1.31 with the same result), 
 


/Applications/MAMP/Library/bin/curl --version
curl 7.65.1 (x86_64-apple-darwin13.4.0) libcurl/7.65.1 OpenSSL/1.0.2o zlib/1.2.8 nghttp2/1.29.0
Release-Date: 2019-06-05
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS HTTP2 HTTPS-proxy IPv6 Largefile libz NTLM NTLM_WB SSL TLS-SRP UnixSockets

It's also an naked PW 3.0.147 without any other modules.

Its the same result like on my webhost (curl 7.19.7 , PHP 7.3.12).

More testing on webserver (because webhooks and full configuration):
If I set the price to a value without a comma everything works as expected (SnipWire log: Fetched Snipcart product with SKU [1116] / ID [xxx-xxx-xxx-xxx]. 

But if the product price is for example 11.50, I get Snipcart product with SKU [1116] could not be fetched. [500 Internal Server Error: ]

I've tried different settings for decimal separator in app.snipcart.com Regional Settings.

The Markup for the Add-to-cart-Button looks like this:

 


<button class="snipcart-add-item" title="Add to cart" data-item-name="Axolotl Juicer" data-item-id="1116" data-item-price="11,5" data-item-url="https://roland.zumpixel.de/shop/axolotl-juicer/" data-item-description="Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur." data-item-image="https://xxx.xx.de/site/assets/files/1116/beer3.65x65-hidpi.jpg" data-item-metadata="{&quot;id&quot;:1116,&quot;created&quot;:1576098063,&quot;modified&quot;:1576185868,&quot;published&quot;:1576098063,&quot;created_users_id&quot;:41,&quot;modified_users_id&quot;:41}" data-item-quantity="1" data-item-quantity-step="1" data-item-stackable="true" data-item-taxable="true" data-item-taxes="20% VAT" data-item-has-taxes-included="true" data-item-shippable="true">Add to cart</button>

 

Armin

Regarding the CURL error in WireHttp - could you please provide the exact steps until the error occurres (starting from module installation?

The other problem: The data-item-price property is definitely wrong. It should be 11.5 not 11,5. I’ll need to check the float sanitizer. What is your locale setting?

BTW, Its really great to get SnipWire tested - this helps me a lot! Thanks @Noboru

Share this post


Link to post
Share on other sites
3 hours ago, szabesz said:

BTW, when can we expect that to happen? Sounds like sooner than the end of December maybe? Is it going to be the first production ready version?

Thanks for sharing all your hard work, and do not forget to ship it with a "Donation button".

It’s hard to tell when the first release version will be ready. I’m currently struggling with the custom taxes provider which will allow a very flexible VAT handling for all countries worldwide. I’m in contact with the Snipcart team, because I’m having problems with shipping taxes ...

When the taxes provider is finished, the biggest part is done and I should be able to release a first beta.

And thanks for the hint with the donation button! 👍

  • Like 3

Share this post


Link to post
Share on other sites
11 hours ago, Noboru said:

...
The Markup for the Add-to-cart-Button looks like this:


<button class="snipcart-add-item" title="Add to cart" data-item-name="Axolotl Juicer" data-item-id="1116" data-item-price="11,5" data-item-url="https://roland.zumpixel.de/shop/axolotl-juicer/" data-item-description="Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur." data-item-image="https://xxx.xx.de/site/assets/files/1116/beer3.65x65-hidpi.jpg" data-item-metadata="{&quot;id&quot;:1116,&quot;created&quot;:1576098063,&quot;modified&quot;:1576185868,&quot;published&quot;:1576098063,&quot;created_users_id&quot;:41,&quot;modified_users_id&quot;:41}" data-item-quantity="1" data-item-quantity-step="1" data-item-stackable="true" data-item-taxable="true" data-item-taxes="20% VAT" data-item-has-taxes-included="true" data-item-shippable="true">Add to cart</button>

 

FYI - @Noboru and I am just trying to solve the problem via PN chat (in German language). After I have fixed this, I'll post back the infos here!

  • Like 2

Share this post


Link to post
Share on other sites

With the help of @Noboru I could fix some bugs in the "Extended Resources" installer and with float values in prices. Some rare problems could be fixed and the installer is more stable now.

A big problem is the integrated taxes-provider regarding shipping-.taxes. I'm in contact with the Snipcart team to make this as flexible as possible. This isn't easy as we have very different taxes system around the countries of the world.

  • Like 4

Share this post


Link to post
Share on other sites

@Gadgetto this module looks fantastic! I'm looking at using SnipCart to create an ecommerce site because it seems very user friendly (important for when I pass this site off) and it has support for some of the features I need.

One of those features is subscriptions. Do you have advice for setting up monthly subscriptions vs one-time purchases? I'm new to both your module and SnipCart and I didn't see anything obvious after the initial install and a bit of poking about in the admin but I do see it in the Module's page under Setup and references to subscriptions in the module files.

Am I overlooking something, or do I just need to add custom fields to the snipcart-product template (and output them in the markup) to correspond to the button attributes listed in https://docs.snipcart.com/v3/setup/products ?

Thanks!

Share this post


Link to post
Share on other sites
20 hours ago, creativejay said:

@Gadgetto this module looks fantastic! I'm looking at using SnipCart to create an ecommerce site because it seems very user friendly (important for when I pass this site off) and it has support for some of the features I need.

One of those features is subscriptions. Do you have advice for setting up monthly subscriptions vs one-time purchases? I'm new to both your module and SnipCart and I didn't see anything obvious after the initial install and a bit of poking about in the admin but I do see it in the Module's page under Setup and references to subscriptions in the module files.

Am I overlooking something, or do I just need to add custom fields to the snipcart-product template (and output them in the markup) to correspond to the button attributes listed in https://docs.snipcart.com/v3/setup/products ?

I'm glad you like SnipWire! 🙂

Important: SnipWire is not yet ready for production environments!

Subscriptions are on my backlog and will be definitely in the first release!

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 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 Robin S
      This module is inspired by and similar to the Template Stubs module. The author of that module has not been active in the PW community for several years now and parts of the code for that module didn't make sense to me, so I decided to create my own module. Auto Template Stubs has only been tested with PhpStorm because that is the IDE that I use.
      Auto Template Stubs
      Automatically creates stub files for templates when fields or fieldgroups are saved.
      Stub files are useful if you are using an IDE (e.g. PhpStorm) that provides code assistance - the stub files let the IDE know what fields exist in each template and what data type each field returns. Depending on your IDE's features you get benefits such as code completion for field names as you type, type inference, inspection, documentation, etc.
      Installation
      Install the Auto Template Stubs module.
      Configuration
      You can change the class name prefix setting in the module config if you like. It's good to use a class name prefix because it reduces the chance that the class name will clash with an existing class name.
      The directory path used to store the stub files is configurable.
      There is a checkbox to manually trigger the regeneration of all stub files if needed.
      Usage
      Add a line near the top of each of your template files to tell your IDE what stub class name to associate with the $page variable within the template file. For example, with the default class name prefix you would add the following line at the top of the home.php template file:
      /** @var tpl_home $page */ Now enjoy code completion, etc, in your IDE.

      Adding data types for non-core Fieldtype modules
      The module includes the data types returned by all the core Fieldtype modules. If you want to add data types returned by one or more non-core Fieldtype modules then you can hook the AutoTemplateStubs::getReturnTypes() method. For example, in /site/ready.php:
      // Add data types for some non-core Fieldtype modules $wire->addHookAfter('AutoTemplateStubs::getReturnTypes', function(HookEvent $event) { $extra_types = [ 'FieldtypeDecimal' => 'string', 'FieldtypeLeafletMapMarker' => 'LeafletMapMarker', 'FieldtypeRepeaterMatrix' => 'RepeaterMatrixPageArray', 'FieldtypeTable' => 'TableRows', ]; $event->return = $event->return + $extra_types; }); Credits
      Inspired by and much credit to the Template Stubs module by mindplay.dk.
       
      https://github.com/Toutouwai/AutoTemplateStubs
      https://modules.processwire.com/modules/auto-template-stubs/
    • By Mike Rockett
      Jumplinks for ProcessWire
      Release: 1.5.60
      Composer: rockett/jumplinks
      ⚠️ NOTICE: 1.5.60 is an important security patch-release for an XSS vulnerability discovered by @phlp. It's HIGHLY RECOMMENDED that all Jumplinks users update to the latest version as soon as possible.
      Jumplinks is an enhanced version of the original ProcessRedirects by Antti Peisa.
      The Process module manages your permanent and temporary redirects (we'll call these "jumplinks" from now on, unless in reference to redirects from another module), useful for when you're migrating over to ProcessWire from another system/platform. Each jumplink supports wildcards, shortening the time needed to create them.
      Unlike similar modules for other platforms, wildcards in Jumplinks are much easier to work with, as Regular Expressions are not fully exposed. Instead, parameters wrapped in curly braces are used - these are described in the documentation.
      Under Development: 2.0, to be powered by FastRoute
      As of version 1.5.0, Jumplinks requires at least ProcessWire 2.6.1 to run.
      View on GitLab
      Download via the Modules Directory
      Read the docs
      Features
      The most prominent features include:
      Basic jumplinks (from one fixed route to another) Parameter-based wildcards with "Smart" equivalents Mapping Collections (for converting ID-based routes to their named-equivalents without the need to create multiple jumplinks) Destination Selectors (for finding and redirecting to pages containing legacy location information) Timed Activation (activate and/or deactivate jumplinks at specific times) 404-Monitor (for creating jumplinks based on 404 hits) Additionally, the following features may come in handy:
      Stale jumplink management Legacy domain support for slow migrations An importer (from CSV or ProcessRedirects) Feedback & Feature Requests
      I’d love to know what you think of this module. Please provide some feedback on the module as a whole, or even regarding smaller things that make it whole. Also, please feel free to submit feature requests and their use-cases.
      Note: Features requested so far have been added to the to-do list, and will be added to 2.0, and not the current dev/master branches.
      Open Source

      Jumplinks is an open-source project, and is free to use. In fact, Jumplinks will always be open-source, and will always remain free to use. Forever. If you would like to support the development of Jumplinks, please consider making a small donation via PayPal.
      Enjoy! 🙂
    • By Robin S
      Add Image URLs
      Allows images/files to be added to Image/File fields by pasting URLs.

      Usage
      Install the Add Image URLs module.
      A "Paste URLs" button will be added to all image and file fields. Use the button to show a textarea where URLs may be pasted, one per line. Images/files are added when the page is saved.
       
      https://github.com/Toutouwai/AddImageUrls
      https://modules.processwire.com/modules/add-image-urls/
    • By gebeer
      Hello all,
      sharing my new module FieldtypeImageReference. It provides a configurable input field for choosing any type of image from selectable sources. Sources can be: 
      a predefined folder in site/templates/ and/or a  page (and optionally its children) and/or the page being edited and/or any page on the site CAUTION: this module is under development and not quite yet in a production-ready state. So please test it carefully.
      UPDATE: the new version v2.0.0 introduces a breaking change due to renaming the module. If you have an older version already installed, you need to uninstall it and install the latest master version.
      Module and full description can be found on github https://github.com/gebeer/FieldtypeImageReference
      Install from URL: https://github.com/gebeer/FieldtypeImageReference/archive/master.zip
      Read on for features and use cases.
      Features
      Images can be loaded from a folder inside site/templates/ or site/assets Images in that folder can be uploaded and deleted from within the inputfield Images can be loaded from other pages defined in the field settings Images can be organized into categories. Child pages of the main 'image source page' serve as categories mages can be loaded from any page on the site From the API side, images can be manipulated like native ProcessWire images (resizing, cropping etc.), even the images from a folder Image thumbnails are loaded into inputfield by ajax on demand Source images on other pages can be edited from within this field. Markup of SVG images can be rendered inline with `echo $image->svgcontent` Image names are fully searchable through the API $pages->find('fieldname.filename=xyz.png'); $pages->find('fieldname.filename%=xy.png'); Accidental image deletion is prevented. When you want to delete an image from one of the pages that hold your site-wide images, the module searches all pages that use that image. If any page contains a reference to the image you are trying to delete, deletion will be prevented. You will get an error message with links to help you edit those pages and remove references there before you can finally delete the image. This field type can be used with marcrura's Settings Factory module to store images on settings pages, which was not possible with other image field types When to use ?
      If you want to let editors choose an image from a set of images that is being used site-wide. Ideal for images that are being re-used across the site (e.g. icons, but not limited to that).
      Other than the native ProcessWire images field, the images here are not stored per page. Only references to images that live on other pages or inside a folder are stored. This has several advantages:
      one central place to organize images when images change, you only have to update them in one place. All references will be updated, too. (Provided the name of the image that has changed stays the same) Installation and setup instructions can be found on github.
      Here's how the input field looks like in the page editor:

      If you like to give it a try, I'm happy to hear your comments or suggestions for improvement. Install from URL: https://github.com/gebeer/FieldtypeImageReference/archive/master.zip
      Eventually this will go in the module directory, too. But it needs some more testing before I submit it. So I'd really appreciate your assistance.
      Thanks to all who contributed their feedback and suggestions which made this module what it is now.
       
×
×
  • Create New...