Jump to content

SnipWire - Snipcart integration for ProcessWire


Gadgetto

Recommended Posts

5 hours ago, Gadgetto said:

Important: SnipCart is not yet ready for production environments!

Just to be clear, SnipWire is not yet ready, correct? As long as I develop with SnipCart's code and don't rely on your module, I can safely plan to add SnipWire to the site after its stable release, correct? 

I'm just trying to plan ahead for that date. ?

Link to comment
Share on other sites

2 hours ago, creativejay said:

Just to be clear, SnipWire is not yet ready, correct?

Sorry, for sure I meant SnipWire (I edited my post)!

2 hours ago, creativejay said:

As long as I develop with SnipCart's code and don't rely on your module, I can safely plan to add SnipWire to the site after its stable release, correct? 

I don't see a reason why this shouldn't work. It probably would be the best, if you install and use the latest versions of SnipWire module and only use custom code where SnipWire isn't ready yet or is missing features you'd like to use.

As I don't have a documentation available yet, please don't hesitate to ask your questions here and I'll try to help.

If you find any problems/bugs or if you have suggestions for improvement while using SnipWire, it would be great if you could post back here or post an issue at GitHub so I could fix it.

  • Like 1
Link to comment
Share on other sites

Thanks!

Will SnipWire allow for multiple product templates?

Right now I have several products that are subscriptions, several that are short-term access, and others that are one-time purchases. These are all for services, with nothing to ship. They are each a different (non "snipcart-") template at the moment but if SnipWire would only allow one, I can go back in and build a lot of dependent fields based on checkboxes or select dropdowns.

Thanks for your pre-launch guidance on this!

Link to comment
Share on other sites

11 hours ago, creativejay said:

Will SnipWire allow for multiple product templates?

Right now I have several products that are subscriptions, several that are short-term access, and others that are one-time purchases. These are all for services, with nothing to ship. They are each a different (non "snipcart-") template at the moment but if SnipWire would only allow one, I can go back in and build a lot of dependent fields based on checkboxes or select dropdowns.

Not in the first release. But multiple product templates are definitely planned.

Link to comment
Share on other sites

UPDATE 2020-01-14

What's new - what has been added - what has changed:

  • I had to completely remove the DateRangePicker.js library because of quirks on mobile devices and accessibility problems. 
  • The dashboard date range picker has been completely rebuilt with default ProcessWire fields - and I think it looks great + its now fully working on mobile devices + its more accessible!
  • The orders detail panel is now also capable of changing order statuses and adding order comments (including customer notifications, tracking number and tracking url)
  • Finalized the discount editor: create, edit, delete, archive, unarchive Snipcart discounts
  • A lot of internal fixes and enhancements
  • One of the greatest features of the current version is the dashboard performance. I was able to increase the REST API execution speed by the factor of 2 - 2.5 times

What's next:

  • I'm still struggling with taxes handling. Especially the handling of shipping taxes is a complex thing and drives me crazy... DONE!
  • Finishing the remaining detail panels
  • Implementing Subscriptions 
  • Implementing Digital Products (probably not in the first release)
  • Implementing a more flexible product template handling (probably not in the first release) DONE!
  • And of course - release!

Here are some fresh screens:

Spoiler

1919382097_snipwire-dashboard.thumb.png.6a32ba002c2a6d6d4cfa6f6803afd6fe.pngsnipwire-edit-orderstatus.thumb.png.84a381fdd1479e5c3b92ac44fdbb6e73.pngsnipwire-add-discount.thumb.png.d79873b890168b9da59872425b1d258e.png

 

  • Like 3
Link to comment
Share on other sites

5 minutes ago, Gadgetto said:

UPDATE 2020-01-14

Thanks for the update! I am thinking of giving it a test drive in the near future, I just do not have the time right now.

One more thought regarding taxes: would it be possible to implement some basics here first and later on concentrating on something "ideal", so that at least those who do not need more than the "basics" can start relying on them. May be this idea does not make any sense, so I am just brainstorming here...

Link to comment
Share on other sites

16 minutes ago, szabesz said:

One more thought regarding taxes: would it be possible to implement some basics here first and later on concentrating on something "ideal", so that at least those who do not need more than the "basics" can start relying on them. May be this idea does not make any sense, so I am just brainstorming here...

The problem is, taxes handling needs to be bomb proof, otherwise the store merchant could get problems with the taxes authorities. Taxes is one of the last things which needs to be finished before the first release. I'm in contact with the Snipcart guys and I think this should be solved in short time.

  • Like 3
Link to comment
Share on other sites

23 hours ago, creativejay said:

Will SnipWire allow for multiple product templates?

I just implemented your feature request! ?

Multiple product-templates are now allowed! Just get latest version on GitHub!

823136240_Bildschirmfoto2020-01-14um19_47_55.thumb.png.bed577dc8a29c61f07aa841c26de4a0a.png

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

UPDATE 2020-01-19

I finally finished the integrated taxes provider - SnipWire now also handles shipping taxes correctly - and in a very flexible way which should cover pretty much all tax calculation methods/requirements worldwide!

The integrated SnipWire taxes provider is now even more flexible than Snipcart own integrated provider!

A store merchant can choose between the following shipping taxes calculation methods:

  1. No shipping taxes
  2. Apply a fixed tax rate:
    A fixed shipping tax rate from taxes configuration is used.
  3. Apply predominant tax rate:
    The shipping costs are allocated entirely to the economic good with the highest tax rate. So the highest tax rate from cart is used to calculate shipping taxes.
  4. Proportionally split and apply tax rates:
    The shipping service is divided as a secondary service and shares proportionally the fate of the respective main service. Part of the shipping service is thus subject to the normal tax rate, part to the reduced tax rate.

If you find any other constellations which cannot be covered by the present options, please drop me a line and I'll add it.

880392865_Bildschirmfoto2020-01-19um10_29_05.thumb.png.44d61b67f0f84283c27f84bd0ca05606.png

  • Like 3
  • Thanks 2
Link to comment
Share on other sites

1 hour ago, Gadgetto said:

The integrated SnipWire taxes provider is now even more flexible than Snipcart own integrated provider!

This looks amazing, thanks for your effort and your transparency in developing this module. Please make it very obvious how to donate or contribute to the project in whatever way is helpful ?

  • Like 3
Link to comment
Share on other sites

6 hours ago, d'Hinnisdaël said:

Please make it very obvious how to donate or contribute to the project in whatever way is helpful ?

Done! ? - donation button in GitHub repo, forum signature and initial SnipWire forum post. (I hope this is not against forum rules?)

  • Like 2
Link to comment
Share on other sites

2 hours ago, Gadgetto said:

I hope this is not against forum rules?

I think if you make it absolutely clear that the Donate button is for supporting the development of your Mozilla Public License 2.0 licensed module, then it is ok. Currently it is not quite clear that the "button" in your signature is for that thing only.

Anyways, as soon as I have time, I will test and donate.

Link to comment
Share on other sites

Hi @Gadgetto Thanks for your effort with this module and making it available to the PW community! I'm installing it right now to give it a try. I've noticed that the module configuration still refers to Snipcart v.2 when version 3 has been out for a few weeks now and looks stable enough. Among other things, the jQuery dependency is gone so I guess you could remove that option, and update the links to the Snipcart JS and CSS files.

 

 

Link to comment
Share on other sites

3 hours ago, jacmaes said:

Hi @Gadgetto Thanks for your effort with this module and making it available to the PW community! I'm installing it right now to give it a try. I've noticed that the module configuration still refers to Snipcart v.2 when version 3 has been out for a few weeks now and looks stable enough. Among other things, the jQuery dependency is gone so I guess you could remove that option, and update the links to the Snipcart JS and CSS files.

Compared with v2, Snipcart v3 is still not feature complete. Some parts are missing as far as I know. At the moment I don’t know exactly what’s still missing but as soon as v3 is complete, I’ll definitely implement this - or even make it configurable to switch between versions.

  • Like 2
Link to comment
Share on other sites

UPDATE 2020-01-19

This is a follow-up to my last post! The question was asked when v3 of the cart system will be implemented in SnipWire. 

The following features are still missing in Snipcart v3:

  • Digital goods
  • Google Analytics integration
  • Inventory management
  • Deferred payments
  • Multi-currency
  • Recurring subscriptions with Stripe
  • Authorize.net support

Some of the listed features are required by SnipWire as they are essential and would require a lot of code rewrites to exclude them. So SnipWire will be changed to use v3 of the cart system when the following features are available in Snipcart:

  • Inventory management
  • Deferred payments
  • Multi-currency
  • Like 5
Link to comment
Share on other sites

48 minutes ago, Gadgetto said:

Some of the listed features are required by SnipWire as they are essential and would require a lot of code rewrites to exclude them. So SnipWire will be changed to use v3 of the cart system when the following features are available in Snipcart:

  • Inventory management
  • Deferred payments
  • Multi-currency

Sounds reasonable. They kind of jumped the gun for marketing reasons there; not a fan of how it was rolled out. How does a production shop even work without analytics and inventory management?

You don't happen to be in contact with them regarding ETAs on those features? I found it hard to get reliable answers even though wish I could switch my sites to their Vue cart layouts and ditch jQuery once and for all ?

Link to comment
Share on other sites

On 1/21/2020 at 10:57 PM, d'Hinnisdaël said:

Sounds reasonable. They kind of jumped the gun for marketing reasons there; not a fan of how it was rolled out. How does a production shop even work without analytics and inventory management?

You don't happen to be in contact with them regarding ETAs on those features? I found it hard to get reliable answers even though wish I could switch my sites to their Vue cart layouts and ditch jQuery once and for all ?

This is the answer I got in their Slack developer channel:

Quote

We should be shipping the latest inventory management quirks (in-cart auto-updates of max. available quantities) by the end of this sprint:
Release v3.0.8 - end of 3/2/2020 → 14/2/2020 sprint
Multi-currency isn't strictly planned short term. We should be tackling it somewhere in March. Same thing goes for deferred payments.

 

  • Like 2
Link to comment
Share on other sites

Hi @Gadgetto
I need additional consent to the general business terms. For API version 2 this is documented here: https://docs.snipcart.com/v2/configuration/custom-fields

It works like this in a test in MarkupSnipWire:

 $jsResources[] = 
              '<script src="' . $this->snipwireConfig->snipcart_js_path . '"'
            . (!empty($this->snipwireConfig->snipcart_js_integrity) ? ' integrity="' . $this->snipwireConfig->snipcart_js_integrity . '"' : '')
            . ' data-api-key="' . $snipcartAPIKey . '"'
            . ' data-cart-custom1-name="By checking this box, I have read and agree to the <a href=\'https://www.processwire.com\' class=\'js-real-link\' target=\'_blank\'>Terms &amp; Conditions</a>"'
            . ' data-cart-custom1-options="true|false"'
            . ' data-cart-custom1-required="true"'
            . ' id="snipcart"'
            . '></script>';


Could such a custom field be accessible via the configuration? Or is there a better way?

Link to comment
Share on other sites

8 hours ago, Noboru said:

Hi @Gadgetto
I need additional consent to the general business terms. For API version 2 this is documented here: https://docs.snipcart.com/v2/configuration/custom-fields

It works like this in a test in MarkupSnipWire:


 $jsResources[] = 
              '<script src="' . $this->snipwireConfig->snipcart_js_path . '"'
            . (!empty($this->snipwireConfig->snipcart_js_integrity) ? ' integrity="' . $this->snipwireConfig->snipcart_js_integrity . '"' : '')
            . ' data-api-key="' . $snipcartAPIKey . '"'
            . ' data-cart-custom1-name="By checking this box, I have read and agree to the <a href=\'https://www.processwire.com\' class=\'js-real-link\' target=\'_blank\'>Terms &amp; Conditions</a>"'
            . ' data-cart-custom1-options="true|false"'
            . ' data-cart-custom1-required="true"'
            . ' id="snipcart"'
            . '></script>';


Could such a custom field be accessible via the configuration? Or is there a better way?

Custom product and order fields are in the works! I am just not sure yet how to make this feature configurable via module config.

  • Like 1
Link to comment
Share on other sites

Custom product fields

I think the best way to implement this is to let SnipWire auto-detect fields in product templates which names start with snipcart-item-custom{index} and if found add their output to markup. The admin simply needs to create those PW fields and add them to the desired product template.

Custom order fields

Implementing custom order fields will be a little bit more complex as we don't have a specific "order" template where we could attach a field. Processing a Snipcart order also won't trigger any PW page actions so where should we define a custom order field?

Any idea?

 

Link to comment
Share on other sites

7 minutes ago, Gadgetto said:

which names start with snipcart-item-custom{index}

What do you mean by saying "start with"? Is the example above a prefix or the complete fieldname?

10 minutes ago, Gadgetto said:

we don't have a specific "order" template

Why not? ? 

Link to comment
Share on other sites

17 minutes ago, Gadgetto said:

I think the best way to implement this is to let SnipWire auto-detect fields in product templates which names start with snipcart-item-custom{index} and if found add their output to markup. The admin simply needs to create those PW fields and add them to the desired product template.

I think there will be cases where custom fields will differ by product template, so the order might not be guaranteed and it's probably better to name them after their content (custom_field_size instead of custom_field_1). But how do you determine the option n° for Snipcart — if you move around the field in the template, should it keep its ID to keep order records consistent, or does that not matter as long as it's named properly?

18 minutes ago, Gadgetto said:

Implementing custom order fields will be a little bit more complex as we don't have a specific "order" template where we could attach a field. Processing a Snipcart order also won't trigger any PW page actions so where should we define a custom order field?

That's what I've done in the past: create an order template with fields that I map to custom options. Also good to have the consent text editable by site editors.

  • Like 2
Link to comment
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
×
×
  • Create New...