diff --git a/bootstrap.php b/bootstrap.php index 39ee3a36..419e83ae 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -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' ); diff --git a/build/index.asset.php b/build/index.asset.php index 19bb7aef..4530c6a3 100644 --- a/build/index.asset.php +++ b/build/index.asset.php @@ -1 +1 @@ - array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '8dc63d5192d88edd36a9'); + array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '594f7777cc5e8dc8db41'); diff --git a/composer.lock b/composer.lock index 13f2eba8..7b0a2d6b 100644 --- a/composer.lock +++ b/composer.lock @@ -345,16 +345,16 @@ }, { "name": "newfold-labs/wp-module-data", - "version": "2.5.3", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-data.git", - "reference": "6c0941bc9ac3d18820f924de8c4afe58bb421782" + "reference": "6af57da8765a4db2d89e7ee737726f797945de0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-data/zipball/6c0941bc9ac3d18820f924de8c4afe58bb421782", - "reference": "6c0941bc9ac3d18820f924de8c4afe58bb421782", + "url": "https://api.github.com/repos/newfold-labs/wp-module-data/zipball/6af57da8765a4db2d89e7ee737726f797945de0b", + "reference": "6af57da8765a4db2d89e7ee737726f797945de0b", "shasum": "" }, "require": { @@ -373,6 +373,7 @@ "kporras07/composer-symlinks": "^1.2", "lucatume/wp-browser": "^3", "newfold-labs/wp-php-standards": "^1.2", + "phpunit/phpcov": "^5.0", "wpackagist-plugin/woocommerce": "*" }, "type": "library", @@ -413,6 +414,16 @@ "create-symlinks": [ "Kporras07\\ComposerSymlinks\\ScriptHandler::createSymlinks" ], + "test": [ + "phpunit --bootstrap tests/phpunit/bootstrap.php", + "codecept run wpunit" + ], + "test-coverage": [ + "phpunit --bootstrap tests/phpunit/bootstrap.php --coverage-php tests/_output/unit.cov --coverage-text", + "codecept run wpunit --coverage wpunit.cov", + "phpcov merge --php tests/_output/merged.cov --html tests/_output/html tests/_output;", + "echo \"open tests/_output/html/index.html\" to view the report" + ], "post-install-cmd": [ "@create-symlinks" ], @@ -425,10 +436,67 @@ ], "description": "Newfold Data Module", "support": { - "source": "https://github.com/newfold-labs/wp-module-data/tree/2.5.3", + "source": "https://github.com/newfold-labs/wp-module-data/tree/2.6.0", "issues": "https://github.com/newfold-labs/wp-module-data/issues" }, - "time": "2024-06-19T17:34:08+00:00" + "time": "2024-07-16T23:30:45+00:00" + }, + { + "name": "newfold-labs/wp-module-features", + "version": "1.4.2", + "source": { + "type": "git", + "url": "https://github.com/newfold-labs/wp-module-features.git", + "reference": "0424ca66ed275371a372b139d1c2f81652181b01" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/newfold-labs/wp-module-features/zipball/0424ca66ed275371a372b139d1c2f81652181b01", + "reference": "0424ca66ed275371a372b139d1c2f81652181b01", + "shasum": "" + }, + "require": { + "wp-forge/wp-options": "^1.1.1" + }, + "require-dev": { + "newfold-labs/wp-php-standards": "^1.2.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "NewfoldLabs\\WP\\Module\\Features\\": "includes" + }, + "files": [ + "includes/functions.php" + ] + }, + "scripts": { + "fix": [ + "vendor/bin/phpcbf . --standard=phpcs.xml" + ], + "lint": [ + "vendor/bin/phpcs . --standard=phpcs.xml -s" + ] + }, + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "Micah Wood", + "homepage": "https://wpscholar.com" + }, + { + "name": "Evan Mullins", + "homepage": "https://evanmullins.com" + } + ], + "description": "A module for providing an interface for features.", + "support": { + "source": "https://github.com/newfold-labs/wp-module-features/tree/1.4.2", + "issues": "https://github.com/newfold-labs/wp-module-features/issues" + }, + "time": "2024-06-20T19:10:03+00:00" }, { "name": "newfold-labs/wp-module-install-checker", @@ -559,16 +627,16 @@ }, { "name": "newfold-labs/wp-module-onboarding-data", - "version": "1.1.13", + "version": "1.1.14", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-onboarding-data.git", - "reference": "dd6784cd136ac687a373e27f2f51999d93e97788" + "reference": "0b57747f6a67d8a9308b26c0434d196d023925d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-onboarding-data/zipball/dd6784cd136ac687a373e27f2f51999d93e97788", - "reference": "dd6784cd136ac687a373e27f2f51999d93e97788", + "url": "https://api.github.com/repos/newfold-labs/wp-module-onboarding-data/zipball/0b57747f6a67d8a9308b26c0434d196d023925d0", + "reference": "0b57747f6a67d8a9308b26c0434d196d023925d0", "shasum": "" }, "require": { @@ -578,7 +646,7 @@ "newfold-labs/wp-module-data": "^2.0", "newfold-labs/wp-module-install-checker": "^1.0", "newfold-labs/wp-module-installer": "^1.1", - "newfold-labs/wp-module-patterns": "^1.0", + "newfold-labs/wp-module-patterns": "^2.0", "newfold-labs/wp-module-performance": "^1.4", "newfold-labs/wp-module-survey": "^1.0", "wp-forge/wp-upgrade-handler": "^1.0" @@ -604,27 +672,31 @@ ], "description": "A non-toggleable module containing a standardized interface for interacting with Onboarding data.", "support": { - "source": "https://github.com/newfold-labs/wp-module-onboarding-data/tree/1.1.13", + "source": "https://github.com/newfold-labs/wp-module-onboarding-data/tree/1.1.14", "issues": "https://github.com/newfold-labs/wp-module-onboarding-data/issues" }, - "time": "2024-06-27T13:27:53+00:00" + "time": "2024-07-16T04:54:52+00:00" }, { "name": "newfold-labs/wp-module-patterns", - "version": "1.0.0", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-module-patterns.git", - "reference": "3f41c4cc25b27f1e488a9cc2ffd82f5bc953128a" + "reference": "383fccab930655790d149e17987ef450265b5c3b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-module-patterns/zipball/3f41c4cc25b27f1e488a9cc2ffd82f5bc953128a", - "reference": "3f41c4cc25b27f1e488a9cc2ffd82f5bc953128a", + "url": "https://api.github.com/repos/newfold-labs/wp-module-patterns/zipball/383fccab930655790d149e17987ef450265b5c3b", + "reference": "383fccab930655790d149e17987ef450265b5c3b", "shasum": "" }, + "require": { + "newfold-labs/wp-module-data": "^2.5.1", + "newfold-labs/wp-module-features": "^1.4" + }, "require-dev": { - "newfold-labs/wp-php-standards": "^1.2" + "newfold-labs/wp-php-standards": "^1.2.2" }, "type": "library", "autoload": { @@ -654,10 +726,10 @@ ], "description": "WordPress Cloud Patterns", "support": { - "source": "https://github.com/newfold-labs/wp-module-patterns/tree/1.0.0", + "source": "https://github.com/newfold-labs/wp-module-patterns/tree/2.1.0", "issues": "https://github.com/newfold-labs/wp-module-patterns/issues" }, - "time": "2024-05-01T20:37:14+00:00" + "time": "2024-06-26T15:45:31+00:00" }, { "name": "newfold-labs/wp-module-performance", @@ -1470,16 +1542,16 @@ }, { "name": "composer/semver", - "version": "3.4.0", + "version": "3.4.2", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" + "reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", - "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", + "url": "https://api.github.com/repos/composer/semver/zipball/c51258e759afdb17f1fd1fe83bc12baaef6309d6", + "reference": "c51258e759afdb17f1fd1fe83bc12baaef6309d6", "shasum": "" }, "require": { @@ -1531,7 +1603,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.4.0" + "source": "https://github.com/composer/semver/tree/3.4.2" }, "funding": [ { @@ -1547,7 +1619,7 @@ "type": "tidelift" } ], - "time": "2023-08-31T09:50:34+00:00" + "time": "2024-07-12T11:35:52+00:00" }, { "name": "composer/spdx-licenses", @@ -2053,16 +2125,16 @@ }, { "name": "mck89/peast", - "version": "v1.16.2", + "version": "v1.16.3", "source": { "type": "git", "url": "https://github.com/mck89/peast.git", - "reference": "2791b08ffcc1862fe18eef85675da3aa58c406fe" + "reference": "645ec21b650bc2aced18285c85f220d22afc1430" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mck89/peast/zipball/2791b08ffcc1862fe18eef85675da3aa58c406fe", - "reference": "2791b08ffcc1862fe18eef85675da3aa58c406fe", + "url": "https://api.github.com/repos/mck89/peast/zipball/645ec21b650bc2aced18285c85f220d22afc1430", + "reference": "645ec21b650bc2aced18285c85f220d22afc1430", "shasum": "" }, "require": { @@ -2075,7 +2147,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.16.2-dev" + "dev-master": "1.16.3-dev" } }, "autoload": { @@ -2096,9 +2168,9 @@ "description": "Peast is PHP library that generates AST for JavaScript code", "support": { "issues": "https://github.com/mck89/peast/issues", - "source": "https://github.com/mck89/peast/tree/v1.16.2" + "source": "https://github.com/mck89/peast/tree/v1.16.3" }, - "time": "2024-03-05T09:16:03+00:00" + "time": "2024-07-23T14:00:32+00:00" }, { "name": "nb/oxymel", @@ -2147,16 +2219,16 @@ }, { "name": "newfold-labs/wp-php-standards", - "version": "1.2.3", + "version": "1.2.4", "source": { "type": "git", "url": "https://github.com/newfold-labs/wp-php-standards.git", - "reference": "a486fb541e890ee87dc387eaea0644101e728464" + "reference": "7ef8833b93f8bcdf52c6006f3adb53972d0799a6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/newfold-labs/wp-php-standards/zipball/a486fb541e890ee87dc387eaea0644101e728464", - "reference": "a486fb541e890ee87dc387eaea0644101e728464", + "url": "https://api.github.com/repos/newfold-labs/wp-php-standards/zipball/7ef8833b93f8bcdf52c6006f3adb53972d0799a6", + "reference": "7ef8833b93f8bcdf52c6006f3adb53972d0799a6", "shasum": "" }, "require": { @@ -2177,10 +2249,10 @@ ], "description": "PHP Code Sniffer Standards for Newfold WordPress projects.", "support": { - "source": "https://github.com/newfold-labs/wp-php-standards/tree/1.2.3", + "source": "https://github.com/newfold-labs/wp-php-standards/tree/1.2.4", "issues": "https://github.com/newfold-labs/wp-php-standards/issues" }, - "time": "2024-04-22T20:09:45+00:00" + "time": "2024-07-22T23:16:21+00:00" }, { "name": "phpcompatibility/php-compatibility", @@ -2725,23 +2797,23 @@ }, { "name": "seld/jsonlint", - "version": "1.10.2", + "version": "1.11.0", "source": { "type": "git", "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "9bb7db07b5d66d90f6ebf542f09fc67d800e5259" + "reference": "1748aaf847fc731cfad7725aec413ee46f0cc3a2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/9bb7db07b5d66d90f6ebf542f09fc67d800e5259", - "reference": "9bb7db07b5d66d90f6ebf542f09fc67d800e5259", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/1748aaf847fc731cfad7725aec413ee46f0cc3a2", + "reference": "1748aaf847fc731cfad7725aec413ee46f0cc3a2", "shasum": "" }, "require": { "php": "^5.3 || ^7.0 || ^8.0" }, "require-dev": { - "phpstan/phpstan": "^1.5", + "phpstan/phpstan": "^1.11", "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^8.5.13" }, "bin": [ @@ -2773,7 +2845,7 @@ ], "support": { "issues": "https://github.com/Seldaek/jsonlint/issues", - "source": "https://github.com/Seldaek/jsonlint/tree/1.10.2" + "source": "https://github.com/Seldaek/jsonlint/tree/1.11.0" }, "funding": [ { @@ -2785,7 +2857,7 @@ "type": "tidelift" } ], - "time": "2024-02-07T12:57:50+00:00" + "time": "2024-07-11T14:55:45+00:00" }, { "name": "seld/phar-utils", @@ -2898,16 +2970,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.10.1", + "version": "3.10.2", "source": { "type": "git", "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", - "reference": "8f90f7a53ce271935282967f53d0894f8f1ff877" + "reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/8f90f7a53ce271935282967f53d0894f8f1ff877", - "reference": "8f90f7a53ce271935282967f53d0894f8f1ff877", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/86e5f5dd9a840c46810ebe5ff1885581c42a3017", + "reference": "86e5f5dd9a840c46810ebe5ff1885581c42a3017", "shasum": "" }, "require": { @@ -2974,7 +3046,7 @@ "type": "open_collective" } ], - "time": "2024-05-22T21:24:41+00:00" + "time": "2024-07-21T23:26:44+00:00" }, { "name": "symfony/console", @@ -4403,16 +4475,16 @@ }, { "name": "wp-cli/db-command", - "version": "v2.1.0", + "version": "v2.1.1", "source": { "type": "git", "url": "https://github.com/wp-cli/db-command.git", - "reference": "bf741ebc532f7d4673f4552d1b3589265205cf32" + "reference": "60ee5535e4b39e2d930894b7f435a2e488171c27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wp-cli/db-command/zipball/bf741ebc532f7d4673f4552d1b3589265205cf32", - "reference": "bf741ebc532f7d4673f4552d1b3589265205cf32", + "url": "https://api.github.com/repos/wp-cli/db-command/zipball/60ee5535e4b39e2d930894b7f435a2e488171c27", + "reference": "60ee5535e4b39e2d930894b7f435a2e488171c27", "shasum": "" }, "require": { @@ -4471,9 +4543,9 @@ "homepage": "https://github.com/wp-cli/db-command", "support": { "issues": "https://github.com/wp-cli/db-command/issues", - "source": "https://github.com/wp-cli/db-command/tree/v2.1.0" + "source": "https://github.com/wp-cli/db-command/tree/v2.1.1" }, - "time": "2024-04-27T03:11:44+00:00" + "time": "2024-07-10T17:31:56+00:00" }, { "name": "wp-cli/embed-command", diff --git a/package-lock.json b/package-lock.json index de52e1c1..f9e6a0cd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@newfold-labs/wp-module-ecommerce", - "version": "1.3.37", + "version": "1.3.38", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@newfold-labs/wp-module-ecommerce", - "version": "1.3.37", + "version": "1.3.38", "license": "GPL-2.0-or-later", "dependencies": { "@faizaanceg/pandora": "^1.1.1", diff --git a/package.json b/package.json index d23ce92d..18894ecd 100644 --- a/package.json +++ b/package.json @@ -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/", diff --git a/src/components/LoadingPanel.js b/src/components/LoadingPanel.js index 07289d88..bc1ffc0a 100644 --- a/src/components/LoadingPanel.js +++ b/src/components/LoadingPanel.js @@ -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") }

diff --git a/src/components/SalesChannel.js b/src/components/SalesChannel.js new file mode 100644 index 00000000..7867de3a --- /dev/null +++ b/src/components/SalesChannel.js @@ -0,0 +1,343 @@ +import { Button, Modal, Spinner } from "@newfold/ui-component-library"; +import { useEffect, useState } from "@wordpress/element"; +import { __ } from "@wordpress/i18n"; +import useSWR from "swr"; +import { createPluginInstallAction } from '../configs/actions'; +import { ecomdashPluginStatusParser } from "../configs/selectors"; +import { ReactComponent as Accounting } from "../icons/sales-channel/accounting.svg"; +import { ReactComponent as Amazon } from "../icons/sales-channel/amazon-icon.svg"; +import { ReactComponent as Barcodes } from "../icons/sales-channel/barcodes.svg"; +import { ReactComponent as CustomTemplates } from "../icons/sales-channel/custom-templates.svg"; +import { ReactComponent as EcomdashBulletPoint } from "../icons/sales-channel/ecomdash-bullet-point.svg"; +import { ReactComponent as Ecomdash } from "../icons/sales-channel/ecomdash.svg"; +import { ReactComponent as InventoryBrands } from "../icons/sales-channel/inventory-brands.svg"; +import { ReactComponent as Inventory } from "../icons/sales-channel/inventory-illustration.svg"; +import { ReactComponent as ListingPresets } from "../icons/sales-channel/listing-presets.svg"; +import { ReactComponent as OrdersTable } from "../icons/sales-channel/orders-table.svg"; +import { ReactComponent as PurchaseOrders } from "../icons/sales-channel/purchase-orders.svg"; +import { ReactComponent as ShippingLabels } from "../icons/sales-channel/shipping-labels.svg"; +import { ReactComponent as WarehouseFeeds } from "../icons/sales-channel/warehouse-feeds.svg"; +import { NewfoldRuntime } from "../sdk/NewfoldRuntime"; +import { PluginsSdk } from "../sdk/plugins"; +import { LoadingPanel } from "./LoadingPanel"; +import { Section } from "./Section"; + +let ecomdashParser = ecomdashPluginStatusParser("nfd_slug_ecomdash_wordpress_plugin"); + + +export function SalesChannel(props) { + + let ecomdashStatus = useSWR( + "nfd_slug_ecomdash_wordpress_plugin-status", + () => + PluginsSdk.queries + .status("woocommerce", "nfd_slug_ecomdash_wordpress_plugin") + .then(ecomdashParser), + { refreshInterval: 30 * 1000 } + ); + + const { wpModules } = props; + const [isOpen, setIsOpen] = useState(false); + const canAccessGlobalCTB = NewfoldRuntime.hasCapability("canAccessGlobalCTB"); + const hasYithExtended = NewfoldRuntime.hasCapability("hasYithExtended"); + const hasEcomdash = NewfoldRuntime.hasCapability("hasEcomdash") + const [ecomdashSetupStatus, setEcomdashSetupStatus] = useState("") + const [ecomdashLoading, setEcomdashLoading] = useState(false); + + + useEffect(() => { + (ecomdashStatus.data?.isInstalling && !ecomdashStatus.data.isInstalled) ? setIsOpen(true) : setIsOpen(false) + }, [ecomdashStatus.data?.isInstalling]) + + useEffect(() => { + let pluginConnectionStatus = async () => { + try { + setEcomdashLoading(true); + const response = await fetch("/wp-admin/admin.php?page=newfold-ecomdash-settings"); + const text = await response.text(); + const parser = new DOMParser(); + const doc = parser.parseFromString(text, 'text/html'); + const element = doc.querySelector('#disconnect-instance'); + setEcomdashSetupStatus(element === null); + setEcomdashLoading(false); + return element === null + } catch (error) { + setEcomdashLoading(false); + console.error('Error fetching HTML:', error); + } + } + if (ecomdashStatus?.data?.isInstalled) { + pluginConnectionStatus() + } + }, [ecomdashStatus?.data?.isInstalled]) + + return ( + + hasYithExtended && canAccessGlobalCTB && hasEcomdash && (ecomdashStatus?.data?.isInstalled || ecomdashStatus?.data?.isNeedToInstall || ecomdashStatus.data?.isInstalling) ? + <> + + + + +
+
+

+ {__("Sell your products everywhere, confidently, with Ecomdash.", "wp-module-ecommerce")} +

+

+ {__("With ecomdash, you can manage different sales channels all in one place.", "wp-module-ecommerce")} +
+ {__("Simply connect your business accounts from Amazon, Etsy or Walmart to", "wp-module-ecommerce")} +
+ {__("your ecomdash platform and easily manage products, customer orders and", "wp-module-ecommerce")} +
+ {__("more saving you valuable time.", "wp-module-ecommerce")} +

+ +
+ +
+ +
+
+
+

+ {__("Manage inventory across multiple platforms", "wp-module-ecommerce")} +

+ +
+
    +
  • + + + {__("Enjoy near real-time inventory updates for an unlimited number of", "wp-module-ecommerce")} +
    + {__("channels with our inventory management software.", "wp-module-ecommerce")} +
    +
  • +
  • + + + {__("Manage product levels across multiple warehouses ", "wp-module-ecommerce")} +
    + {__("without the fear of overselling.", "wp-module-ecommerce")} +
    +
  • +
  • + + + {__("Accurately sync kits, multipacks, and components without any", "wp-module-ecommerce")} +
    + {__("headaches.", "wp-module-ecommerce")} +
    +
  • +
+
+ +
+ + +
+

+ {__("Order Management and Reporting", "wp-module-ecommerce")} +

+

+ {__("With Ecomdash you can sit back and relax, knowing that all aspects of order fulfillment are under control. Easily track your top selling items, cost of goods sold, stale inventory and more with Ecomdash's extensive reporting tools.", "wp-module-ecommerce")} +

+ +
+ + + +
+

+ {__("Powerful Add-ons", "wp-module-ecommerce")} +

+

+ {__("Ecomdash contains a variety of powerful add-ons that will help you handle everything from creating barcodes and inventory templates, to managing warehouse feeds, Fulfillment By Amazon and even accounting.", "wp-module-ecommerce")} +

+
+ +
+

+ {__("Fullfillment By Amazon (FBA)", "wp-module-ecommerce")} +

+

+ {__("Auto-export non-Amazon orders to FBA. Import the tracking and pass it to the", "wp-module-ecommerce")} +
+ {__("originating sales channel, marking it as shipped.", "wp-module-ecommerce")} +

+
+
+ +
+
+
+
+ +

+ {__("Barcodes", "wp-module-ecommerce")} +

+
+
+ {__("Print barcodes for your products that can be", "wp-module-ecommerce")} +
+ {__("used for labeling and scanning your", "wp-module-ecommerce")} +
+ {__("products", "wp-module-ecommerce")} +
+
+
+
+ +

+ {__("Shipping Labels", "wp-module-ecommerce")} +

+
+
+ {__("Print shipping labels with a preferred carrier", "wp-module-ecommerce")} +
+ {__("right from your ecomdash account and save", "wp-module-ecommerce")} +
+ {__("on postage.", "wp-module-ecommerce")} +
+
+
+
+ +

+ {__("Listing Presets", "wp-module-ecommerce")} +

+
+
+ {__("Create listing presets to cut down most of", "wp-module-ecommerce")} +
+ {__("the manual data entry needed when creating", "wp-module-ecommerce")} +
+ {__("new listings.", "wp-module-ecommerce")} +
+
+
+
+ +

+ {__("Accounting", "wp-module-ecommerce")} +

+
+
+ {__("Seamlessly communicate your sales and", "wp-module-ecommerce")} +
+ {__("purchase order information directly to your", "wp-module-ecommerce")} +
+ {__("accounting software.", "wp-module-ecommerce")} +
+
+
+ +
+
+
+ +

+ {__("Custom Inventory Templates", "wp-module-ecommerce")} +

+
+
+ {__("Creating a custom file template allows you to", "wp-module-ecommerce")} +
+ {__("upload and/or export files with product data", "wp-module-ecommerce")} +
+ {__("for thousands of products at once.", "wp-module-ecommerce")} +
+
+
+
+ +

+ {__("Warehouse Feeds", "wp-module-ecommerce")} +

+
+
+ {__("Setup feeds to export your sales orders via", "wp-module-ecommerce")} +
+ {__("email or FTP sites to third parties such as", "wp-module-ecommerce")} +
+ {__("Dropshippers, Suppliers, or 3PL systems.", "wp-module-ecommerce")} +
+
+
+
+ +

+ {__("Purchase Orders", "wp-module-ecommerce")} +

+
+
+ {__("Quickly create new orders and have", "wp-module-ecommerce")} +
+ {__("inventory quantities adjusted and synced out", "wp-module-ecommerce")} +
+ {__("to listings as units are received.", "wp-module-ecommerce")} +
+
+
+ +
+
+
+ setIsOpen(false)} + className="wppbh-app-sidenav-mobile nfd-z-40" + initialFocus + > + +
+ +
+
+
+
+ + : null + ) +} \ No newline at end of file diff --git a/src/configs/selectors.js b/src/configs/selectors.js index b9cac476..24729b33 100644 --- a/src/configs/selectors.js +++ b/src/configs/selectors.js @@ -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); }; diff --git a/src/icons/sales-channel/accounting.svg b/src/icons/sales-channel/accounting.svg new file mode 100644 index 00000000..602c1fb3 --- /dev/null +++ b/src/icons/sales-channel/accounting.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/sales-channel/amazon-icon.svg b/src/icons/sales-channel/amazon-icon.svg new file mode 100644 index 00000000..424018e0 --- /dev/null +++ b/src/icons/sales-channel/amazon-icon.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/sales-channel/barcodes.svg b/src/icons/sales-channel/barcodes.svg new file mode 100644 index 00000000..6e32eae1 --- /dev/null +++ b/src/icons/sales-channel/barcodes.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/sales-channel/custom-templates.svg b/src/icons/sales-channel/custom-templates.svg new file mode 100644 index 00000000..16f1c346 --- /dev/null +++ b/src/icons/sales-channel/custom-templates.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/sales-channel/ecomdash-bullet-point.svg b/src/icons/sales-channel/ecomdash-bullet-point.svg new file mode 100644 index 00000000..c593400f --- /dev/null +++ b/src/icons/sales-channel/ecomdash-bullet-point.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/icons/sales-channel/ecomdash.svg b/src/icons/sales-channel/ecomdash.svg new file mode 100644 index 00000000..2831080f --- /dev/null +++ b/src/icons/sales-channel/ecomdash.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/sales-channel/inventory-brands.svg b/src/icons/sales-channel/inventory-brands.svg new file mode 100644 index 00000000..2fd07f16 --- /dev/null +++ b/src/icons/sales-channel/inventory-brands.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/icons/sales-channel/inventory-illustration.svg b/src/icons/sales-channel/inventory-illustration.svg new file mode 100644 index 00000000..7dc8f94a --- /dev/null +++ b/src/icons/sales-channel/inventory-illustration.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/sales-channel/listing-presets.svg b/src/icons/sales-channel/listing-presets.svg new file mode 100644 index 00000000..fed07138 --- /dev/null +++ b/src/icons/sales-channel/listing-presets.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/sales-channel/orders-table.svg b/src/icons/sales-channel/orders-table.svg new file mode 100644 index 00000000..16528cce --- /dev/null +++ b/src/icons/sales-channel/orders-table.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/sales-channel/purchase-orders.svg b/src/icons/sales-channel/purchase-orders.svg new file mode 100644 index 00000000..740802e9 --- /dev/null +++ b/src/icons/sales-channel/purchase-orders.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/sales-channel/shipping-labels.svg b/src/icons/sales-channel/shipping-labels.svg new file mode 100644 index 00000000..c0a947cb --- /dev/null +++ b/src/icons/sales-channel/shipping-labels.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/sales-channel/warehouse-feeds.svg b/src/icons/sales-channel/warehouse-feeds.svg new file mode 100644 index 00000000..c75436ad --- /dev/null +++ b/src/icons/sales-channel/warehouse-feeds.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/index.js b/src/index.js index ff110b2b..b6d8985c 100644 --- a/src/index.js +++ b/src/index.js @@ -11,6 +11,7 @@ import { PluginsSdk } from "./sdk/plugins"; import { AllPayments } from "./components/AllPayments"; import domReady from "@wordpress/dom-ready"; import { AnalyticsSdk } from "./sdk/analytics"; +import { SalesChannel } from "./components/SalesChannel"; const fetcher = (path) => apiFetch({ url: NewfoldRuntime.createApiUrl(path) }); @@ -23,6 +24,7 @@ const pages = [ { key: "/store/products", Page: Products }, { key: "/store/details", Page: StoreDetails }, { key: "/store/sales_discounts", Page: WonderCart }, + { key: "/store/sales_channel", Page: SalesChannel }, { key: "/store/payments", Page: AllPayments }, ];