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

Add Sales channel page to promote Ecomdash plugin adoption #335

Merged
merged 21 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '8dc63d5192d88edd36a9');
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '694f2cb4d10abd7be591');
2 changes: 1 addition & 1 deletion src/components/LoadingPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function LoadingPanel({ pluginName }) {
pluginName === 'ecomdash' ?
__("Activating ", "wp-module-ecommerce")+`${pluginName}`+__(" plugin...", "wp-module-ecommerce")
:
__("Activating the YITH ", "wp-module-ecommerce")+`${pluginName}`+__("plugin...", "wp-module-ecommerce")
__("Activating the YITH ", "wp-module-ecommerce")+`${pluginName}`+__(" plugin...", "wp-module-ecommerce")
}
</p>
<Spinner size="4" className="nfd-text-primary" />
Expand Down
325 changes: 325 additions & 0 deletions src/components/SalesChannel.js

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions src/configs/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ export const wcPluginStatusParser = (slug) => (data) => {
return { isInstalled, isInstalling, isQueueEmpty, isWCActive, pluginUrl };
};

export const ecomdashPluginStatusParser = (slug) => (data) => {
const isNeedToInstall = data?.details?.[slug].status === "need_to_install";
const isInstalled = data?.details?.[slug].status === "active";
const isQueueEmpty = data?.queue[0] ? data?.queue[0]?.length === 0 ? true : false : data?.queue?.length === 0;
const isInstalling = data?.queue?.includes(slug);
const isWCActive = data?.details?.woocommerce.status === "active";
const pluginUrl = data?.details?.[slug].url;
return { isNeedToInstall, isInstalled, isInstalling, isQueueEmpty, isWCActive, pluginUrl };
};

export const findUpsellWithName = (name) => (upsellOptions) => {
return upsellOptions?.find((option) => option.name === name);
};
Expand Down
9 changes: 9 additions & 0 deletions src/icons/sales-channel/accounting.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/icons/sales-channel/amazon-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/icons/sales-channel/barcodes.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading