Skip to content

Commit

Permalink
Merge pull request #335 from newfold-labs/PRESS0-1480
Browse files Browse the repository at this point in the history
Add Sales channel page to promote Ecomdash plugin adoption
  • Loading branch information
aratidgr8 authored Jul 24, 2024
2 parents 6de1a4b + eea7d33 commit 961774e
Show file tree
Hide file tree
Showing 22 changed files with 622 additions and 63 deletions.
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

0 comments on commit 961774e

Please sign in to comment.