This summarizes the backport to Drupal 7 for the Commerce Square Connect module.

Implementing the SDK

Since Drupal 7 does not have built in Composer/autoloading support we must pick a solution. While there is Composer Manager, I think that'd cause too much overhead for implementation (great for personal/client projects, not contrib.) XAutoload is possible, and allows pushing a composer.json into the Libraries definition; however, it has pretty bad performance.

Here are my two thoughts:

  • Review registry_autoload and see if we can say "check for the SDK at sites/all/libraries/connect-php-sdk and register the lib as PSR-4
  • Use the bundled autoload.php added to the SDK (require('connect-php-sdk/autoload.php');), which we can point two via Libraries module.

I prefer the last option, as easiest.

Implementing the payment form

I have implemented Braintree's hosted fields in D7, which is the same as we have in Square. Review the JS and module code here: http://cgit.drupalcode.org/commerce_braintree/tree/modules/commerce_brai...

Customer API and Card on File

Review ease of implementing card on file via Customer API. Worth deferring as not in 8.x yet (because 8.x has no opt-in/out approach.)

Roadmap to the stable 7.x-1.0 release

Original summary

Is there any intention for this to be available for Drupal 7? I have a client using Drupal Commerce on 7.x who has limited funds for a redesign, and is considering moving to Square entirely. It would be awesome if this could be used to retain them as a Drupal store. Their main goal is to keep inventory in sync over two locations, with web sales.

Comments

slavojzizek created an issue. See original summary.

mglaman’s picture

Status: Active » Postponed

I can see. I know our original scope is Drupal Commerce 2.

rszrama’s picture

Agreed, I hope we can backport it once working, but I wouldn't expect that to happen (if developed by our team) until after DrupalCon Baltimore.

mglaman’s picture

Title: Drupal 7? » Backport to Drupal 7
Component: Miscellaneous » Code
Priority: Minor » Normal
Status: Postponed » Active

This is now on the table! I'll be working to document porting plans here.

  • mglaman committed 371bff1 on 7.x-1.x
    Issue #2863485: Backport to Drupal 7
    
    Initial empty branch.
    
mglaman’s picture

Issue summary: View changes
mglaman’s picture

Version: 8.x-1.x-dev » 7.x-1.x-dev
mglaman’s picture

Assigned: Unassigned » czigor

And assigned to czigor, as I know it'll be on his plate Monday :)

slavojzizek, we don't have initial plans for inventory sync. Just because it's still a v1 API which isn't over OAuth yet. But initial support could be patched in if you provide help writing it.

czigor’s picture

Issue summary: View changes

Adding roadmap.

mglaman’s picture

Assigned: czigor » Unassigned

The backport is nearly done. We just need to make sure it's up to Drupal 7 coding standards. For instance there is PHP 5.4 short array syntax being used, which breaks PHP 5.3

bojanz’s picture

Status: Active » Fixed

It's safe to close this, since an initial functional port exists (and the short array syntax thing has been fixed)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

jon pollard’s picture

Hi There, sorry if this is the wrong place to post, but I'm trying to find a Drupal Commerce system to track online and offline stock levels. The customer has stock in the shop but also selling on the web.

Square looks like this might be a possibility, but I can't see from the docs whether this is functional in the Drupal 7 version or not. It would be really great if it was functioning. It would also be a reason to upgrade to D8 if inventory control was in the D8 version.