Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E-commerce Platforms and Integrations #155

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

bohdan-vorona
Copy link
Contributor

1/ Old logic related to Shopify was deleted (DB tables, a separate Yii instance, code, docker, etc.)


2/ E-commerce Platforms.

Access: Only admin.

Adding: I suppose adding must be implemented via code (migrations) since it will be "system" objects in the future. I added Shopify as the first mock e-commerce platform.

Actions:

  • View
  • Update
  • Make Active/Inactive

Fields:

  • Platform Name
  • Status (Active/Inactive)
  • Meta Data (JSON) -- Any specific data we potentially need for a specific Platform.

Explanations:

  • If we make a Platform inactive, all Integrations (orders) are paused.
  • Users unable to Connect the Platform (I hide Action buttons if a Platform is inactive).

3/ E-commerce Integrations. Depends on E-commerce Platforms.

Access: All users.

Actions:

  • Connect a specific E-commerce platform
  • Pause
  • Resume
  • Disconnect

Explanations:

  • If a specific Platform is inactive, I show it but it's unavailable for Connection.
  • At the moment {Connect/Disconnect/Pause/Resume} are implemented as mock actions since we're going to implement each e-commerce platform separately.
  • A specific user will see all E-commerce Platforms and will be able to Connect the one(s) he/she needs. Each Platform will have a separate logic for connection. Actually, this is why we decided to create this initial task.
  • In continue to ^^, a User can have from 0 to {ALL_PLATFROMS} Integrations.

E-commerce Platforms:

ep-1

`

ep-2

`

ep-3

E-commerce Integrations:

int-1

`

int-2

`

int-3

@bohdan-vorona bohdan-vorona added the enhancement New feature or request label Feb 23, 2023
@bohdan-vorona bohdan-vorona linked an issue Feb 23, 2023 that may be closed by this pull request
use common\models\EcommercePlatform;

/**
* Class m230221_134343_add_shopify_mock_ecommerce_platfort
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Class m230221_134343_add_shopify_mock_ecommerce_platfort
* Class m230221_134343_add_shopify_mock_ecommerce_platform

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samdark thanks)

Comment on lines 16 to 18
$ecommercePlatform = new EcommercePlatform();
$ecommercePlatform->name = EcommercePlatform::SHOPIFY_PLATFORM_NAME;
$ecommercePlatform->save();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd avoid using model in migration. Model may change and migration won't apply anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally agree. Changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

E-commerce Integrations [FEATURE]
2 participants