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 all 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 bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use function NewfoldLabs\WP\ModuleLoader\register;

define( 'NFD_ECOMMERCE_MODULE_VERSION', '1.3.37' );
define( 'NFD_ECOMMERCE_MODULE_VERSION', '1.3.38' );

if ( function_exists( 'is_admin' ) && is_admin() ) {
$old_woocommerce_module_version = get_option( 'nfd_ecommerce_module_version' );
Expand Down
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' => '594f7777cc5e8dc8db41');
186 changes: 129 additions & 57 deletions composer.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@newfold-labs/wp-module-ecommerce",
"description": "Brand Agnostic eCommerce Experience",
"license": "GPL-2.0-or-later",
"version": "1.3.37",
"version": "1.3.38",
"main": "build/index.js",
"files": [
"build/",
Expand Down
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
343 changes: 343 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.
Loading
Loading