From 7894a59e8d44e11e0893ed63429750da00830101 Mon Sep 17 00:00:00 2001 From: aratidgr8 Date: Thu, 4 Jul 2024 15:36:06 +0530 Subject: [PATCH 01/20] Add all sales channel icons --- build/index.asset.php | 2 +- src/icons/sales-channel/accounting.svg | 9 ++++++ src/icons/sales-channel/amazon-icon.svg | 9 ++++++ src/icons/sales-channel/barcodes.svg | 9 ++++++ src/icons/sales-channel/custom-templates.svg | 9 ++++++ .../sales-channel/ecomdash-bullet-point.svg | 4 +++ src/icons/sales-channel/ecomdash.svg | 9 ++++++ src/icons/sales-channel/inventory-brands.svg | 29 +++++++++++++++++++ .../sales-channel/inventory-illustration.svg | 9 ++++++ src/icons/sales-channel/listing-presets.svg | 9 ++++++ src/icons/sales-channel/orders-table.svg | 9 ++++++ src/icons/sales-channel/purchase-orders.svg | 9 ++++++ src/icons/sales-channel/shipping-labels.svg | 9 ++++++ src/icons/sales-channel/warehouse-feeds.svg | 9 ++++++ 14 files changed, 133 insertions(+), 1 deletion(-) create mode 100644 src/icons/sales-channel/accounting.svg create mode 100644 src/icons/sales-channel/amazon-icon.svg create mode 100644 src/icons/sales-channel/barcodes.svg create mode 100644 src/icons/sales-channel/custom-templates.svg create mode 100644 src/icons/sales-channel/ecomdash-bullet-point.svg create mode 100644 src/icons/sales-channel/ecomdash.svg create mode 100644 src/icons/sales-channel/inventory-brands.svg create mode 100644 src/icons/sales-channel/inventory-illustration.svg create mode 100644 src/icons/sales-channel/listing-presets.svg create mode 100644 src/icons/sales-channel/orders-table.svg create mode 100644 src/icons/sales-channel/purchase-orders.svg create mode 100644 src/icons/sales-channel/shipping-labels.svg create mode 100644 src/icons/sales-channel/warehouse-feeds.svg diff --git a/build/index.asset.php b/build/index.asset.php index 2d040723..2e33ccae 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' => 'fcffdffca026344a7b49'); + array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => 'a563da2b1bfb5d2681c8'); 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 @@ + + + + + + + + + From d04b093b51eaf915b117acc9064341dbb867c495 Mon Sep 17 00:00:00 2001 From: aratidgr8 Date: Thu, 4 Jul 2024 19:10:45 +0530 Subject: [PATCH 02/20] Sales Channel page on Ecommerce --- build/index.asset.php | 2 +- src/components/SalesChannel.js | 103 +++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 src/components/SalesChannel.js diff --git a/build/index.asset.php b/build/index.asset.php index 2e33ccae..bbc6d1f2 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' => 'a563da2b1bfb5d2681c8'); + array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => 'c3a616c4847e881fb99a'); diff --git a/src/components/SalesChannel.js b/src/components/SalesChannel.js new file mode 100644 index 00000000..6fc38b35 --- /dev/null +++ b/src/components/SalesChannel.js @@ -0,0 +1,103 @@ +import { __ } from "@wordpress/i18n"; +import { Button } from "@newfold/ui-component-library"; +import { Section } from "./Section"; +import { ReactComponent as Ecomdash } from "../icons/sales-channel/ecomdash"; +import { ReactComponent as Inventory } from "../icons/sales-channel/inventory-illustration"; +import { ReactComponent as InventoryBrands } from "../icons/sales-channel/inventory-brands"; +import { ReactComponent as OrdersTable } from "../icons/sales-channel/orders-table"; +import { ReactComponent as Amazon } from "../icons/sales-channel/amazon-icon"; +import { ReactComponent as Barcodes } from "../icons/sales-channel/barcodes"; +import { ReactComponent as CustomTemplates } from "../icons/sales-channel/custom-templates"; +import { ReactComponent as ShippingLabels } from "../icons/sales-channel/shipping-labels"; +import { ReactComponent as WarehouseFeeds } from "../icons/sales-channel/warehouse-feeds"; +import { ReactComponent as ListingPresets } from "../icons/sales-channel/listing-presets"; +import { ReactComponent as PurchaseOrders } from "../icons/sales-channel/purchase-orders"; +import { ReactComponent as Accounting } from "../icons/sales-channel/accounting"; + +export function SalesChannel(){ + return( + <> + + + +
+

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

+

{__("With ecomdash, you can manage different sales channels all in one place. Simply connect your business accounts from Amazon, Etsy or Walmart to your ecomdash platform and easily manage products, customer orders and 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 channels with our inventory management software.", "wp-module-ecommerce")}
  • +
  • {__("Manage product levels across multiple warehouses without the fear of overselling.", "wp-module-ecommerce")}
  • +
  • {__("Accurately sync kits, multipacks, and components without any 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 originating sales channel, marking it as shipped.", "wp-module-ecommerce")}

+
+
    +
  • + + {__("Barcodes", "wp-module-ecommerce")} + {__("Print barcodes for your products that can be used for labeling and scanning your products", "wp-module-ecommerce")} +
  • +
  • + + {__("Custom Inventory Templates", "wp-module-ecommerce")} + {__("Creating a custom file template allows you to upload and/or export files with product data for thousands of products at once.", "wp-module-ecommerce")} +
  • +
  • + + {__("Shipping Labels", "wp-module-ecommerce")} + {__("Print shipping labels with a preferred carrier right from your ecomdash account and save on postage.", "wp-module-ecommerce")} +
  • + +
  • + + {__("Warehouse Feeds", "wp-module-ecommerce")} + {__("Setup feeds to export your sales orders via email or FTP sites to third parties such as Dropshippers, Suppliers, or 3PL systems.", "wp-module-ecommerce")} +
  • +
  • + + {__("Listing Presets", "wp-module-ecommerce")} + {__("Create listing presets to cut down most of the manual data entry needed when creating new listings. ", "wp-module-ecommerce")} +
  • +
  • + + {__("Purchase Orders", "wp-module-ecommerce")} + {__("Quickly create new orders and have inventory quantities adjusted and synced out to listings as units are received.", "wp-module-ecommerce")} +
  • +
  • + + {__("Accounting", "wp-module-ecommerce")} + {__("Seamlessly communicate your sales and purchase order information directly to your accounting software.", "wp-module-ecommerce")} +
  • +
+
+ +
+
+ + ) +} \ No newline at end of file From bf3600188c6678fac03709cf71638770a69b123a Mon Sep 17 00:00:00 2001 From: aratidgr8 Date: Thu, 4 Jul 2024 20:24:40 +0530 Subject: [PATCH 03/20] Added Sales Channel Route --- build/index.asset.php | 2 +- src/components/SalesChannel.js | 24 ++++++++++++------------ src/index.js | 2 ++ 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/build/index.asset.php b/build/index.asset.php index bbc6d1f2..7eec2e8e 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' => 'c3a616c4847e881fb99a'); + array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => 'b76def620c4f4b215274'); diff --git a/src/components/SalesChannel.js b/src/components/SalesChannel.js index 6fc38b35..0293e00b 100644 --- a/src/components/SalesChannel.js +++ b/src/components/SalesChannel.js @@ -1,18 +1,18 @@ import { __ } from "@wordpress/i18n"; import { Button } from "@newfold/ui-component-library"; import { Section } from "./Section"; -import { ReactComponent as Ecomdash } from "../icons/sales-channel/ecomdash"; -import { ReactComponent as Inventory } from "../icons/sales-channel/inventory-illustration"; -import { ReactComponent as InventoryBrands } from "../icons/sales-channel/inventory-brands"; -import { ReactComponent as OrdersTable } from "../icons/sales-channel/orders-table"; -import { ReactComponent as Amazon } from "../icons/sales-channel/amazon-icon"; -import { ReactComponent as Barcodes } from "../icons/sales-channel/barcodes"; -import { ReactComponent as CustomTemplates } from "../icons/sales-channel/custom-templates"; -import { ReactComponent as ShippingLabels } from "../icons/sales-channel/shipping-labels"; -import { ReactComponent as WarehouseFeeds } from "../icons/sales-channel/warehouse-feeds"; -import { ReactComponent as ListingPresets } from "../icons/sales-channel/listing-presets"; -import { ReactComponent as PurchaseOrders } from "../icons/sales-channel/purchase-orders"; -import { ReactComponent as Accounting } from "../icons/sales-channel/accounting"; +import { ReactComponent as Ecomdash } from "../icons/sales-channel/ecomdash.svg"; +import { ReactComponent as Inventory } from "../icons/sales-channel/inventory-illustration.svg"; +import { ReactComponent as InventoryBrands } from "../icons/sales-channel/inventory-brands.svg"; +import { ReactComponent as OrdersTable } from "../icons/sales-channel/orders-table.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 ShippingLabels } from "../icons/sales-channel/shipping-labels.svg"; +import { ReactComponent as WarehouseFeeds } from "../icons/sales-channel/warehouse-feeds.svg"; +import { ReactComponent as ListingPresets } from "../icons/sales-channel/listing-presets.svg"; +import { ReactComponent as PurchaseOrders } from "../icons/sales-channel/purchase-orders.svg"; +import { ReactComponent as Accounting } from "../icons/sales-channel/accounting.svg"; export function SalesChannel(){ return( 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 }, ]; From 3d5927d2f6f51529809c8bc649974298ec028205 Mon Sep 17 00:00:00 2001 From: aratidgr8 Date: Thu, 4 Jul 2024 21:24:21 +0530 Subject: [PATCH 04/20] Sales Channel Introduction section --- build/index.asset.php | 2 +- src/components/SalesChannel.js | 34 +++++++++++++++++++++++++--------- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/build/index.asset.php b/build/index.asset.php index 7eec2e8e..b8d7a632 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' => 'b76def620c4f4b215274'); + array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => 'aa0fe30c0142a58cedfd'); diff --git a/src/components/SalesChannel.js b/src/components/SalesChannel.js index 0293e00b..bad007ba 100644 --- a/src/components/SalesChannel.js +++ b/src/components/SalesChannel.js @@ -20,15 +20,31 @@ export function SalesChannel(){ -
-

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

-

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

- - +

+ {__("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")}​ +

+ +
+
From 4e036181c6f034ab7178f827f4e5238860fb8026 Mon Sep 17 00:00:00 2001 From: aratidgr8 Date: Thu, 4 Jul 2024 21:28:19 +0530 Subject: [PATCH 05/20] Sales Channel Introduction section --- build/index.asset.php | 2 +- src/components/SalesChannel.js | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build/index.asset.php b/build/index.asset.php index b8d7a632..bf4f2bdb 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' => 'aa0fe30c0142a58cedfd'); + array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '472fb80228c8d08bce35'); diff --git a/src/components/SalesChannel.js b/src/components/SalesChannel.js index bad007ba..c36f6030 100644 --- a/src/components/SalesChannel.js +++ b/src/components/SalesChannel.js @@ -20,11 +20,12 @@ export function SalesChannel(){ -

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

-
+ +
+

+ {__("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")}

From 065dae7c428645a114296e3fb880070174bc49dc Mon Sep 17 00:00:00 2001 From: aratidgr8 Date: Fri, 5 Jul 2024 16:51:19 +0530 Subject: [PATCH 06/20] Manage Inventory section on Sales Channel page --- build/index.asset.php | 2 +- src/components/SalesChannel.js | 58 ++++++++++++++++++++++++---------- 2 files changed, 43 insertions(+), 17 deletions(-) diff --git a/build/index.asset.php b/build/index.asset.php index bf4f2bdb..405386a4 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' => '472fb80228c8d08bce35'); + array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => 'b3c4a5735aea8754209f'); diff --git a/src/components/SalesChannel.js b/src/components/SalesChannel.js index c36f6030..16b4eebf 100644 --- a/src/components/SalesChannel.js +++ b/src/components/SalesChannel.js @@ -13,6 +13,7 @@ import { ReactComponent as WarehouseFeeds } from "../icons/sales-channel/warehou import { ReactComponent as ListingPresets } from "../icons/sales-channel/listing-presets.svg"; import { ReactComponent as PurchaseOrders } from "../icons/sales-channel/purchase-orders.svg"; import { ReactComponent as Accounting } from "../icons/sales-channel/accounting.svg"; +import { ReactComponent as EcomdashBulletPoint} from "../icons/sales-channel/ecomdash-bullet-point.svg"; export function SalesChannel(){ return( @@ -26,16 +27,13 @@ export function SalesChannel(){

{__("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 channels with our inventory management software.", "wp-module-ecommerce")}
  • -
  • {__("Manage product levels across multiple warehouses without the fear of overselling.", "wp-module-ecommerce")}
  • -
  • {__("Accurately sync kits, multipacks, and components without any headaches.", "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")} +
    + {__("number of channels with our inventory management software.", "wp-module-ecommerce")} +
    +
  • +
  • + + + {__("Manage product levels across multiple warehouses without the fear of overselling.", "wp-module-ecommerce")} +
    + {__("without the fear of overselling.", "wp-module-ecommerce")} +
    +
  • +
  • + + + {__("Accurately sync kits, multipacks, and components without any headaches.", "wp-module-ecommerce")} +
    + {__("headaches.", "wp-module-ecommerce")} +
    +
  • +
+
+
+

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

From 3052b2c9fe0b1e2f8f3e62fe3525bc875979015f Mon Sep 17 00:00:00 2001 From: aratidgr8 Date: Fri, 5 Jul 2024 21:08:28 +0530 Subject: [PATCH 07/20] Order Management section - Sales Channel page --- build/index.asset.php | 2 +- src/components/SalesChannel.js | 44 +++++++++++++++++++--------------- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/build/index.asset.php b/build/index.asset.php index 405386a4..6c0fd429 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' => 'b3c4a5735aea8754209f'); + array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '1f3fb8fe6e609473b771'); diff --git a/src/components/SalesChannel.js b/src/components/SalesChannel.js index 16b4eebf..5d0f8b00 100644 --- a/src/components/SalesChannel.js +++ b/src/components/SalesChannel.js @@ -1,19 +1,19 @@ -import { __ } from "@wordpress/i18n"; import { Button } from "@newfold/ui-component-library"; -import { Section } from "./Section"; -import { ReactComponent as Ecomdash } from "../icons/sales-channel/ecomdash.svg"; -import { ReactComponent as Inventory } from "../icons/sales-channel/inventory-illustration.svg"; -import { ReactComponent as InventoryBrands } from "../icons/sales-channel/inventory-brands.svg"; -import { ReactComponent as OrdersTable } from "../icons/sales-channel/orders-table.svg"; +import { __ } from "@wordpress/i18n"; +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 ShippingLabels } from "../icons/sales-channel/shipping-labels.svg"; -import { ReactComponent as WarehouseFeeds } from "../icons/sales-channel/warehouse-feeds.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 Accounting } from "../icons/sales-channel/accounting.svg"; -import { ReactComponent as EcomdashBulletPoint} from "../icons/sales-channel/ecomdash-bullet-point.svg"; +import { ReactComponent as ShippingLabels } from "../icons/sales-channel/shipping-labels.svg"; +import { ReactComponent as WarehouseFeeds } from "../icons/sales-channel/warehouse-feeds.svg"; +import { Section } from "./Section"; export function SalesChannel(){ return( @@ -27,7 +27,7 @@ export function SalesChannel(){

{__("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")} @@ -57,7 +57,7 @@ export function SalesChannel(){

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

{__("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")}

- +
+

+ {__("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", "wp-module-ecommerce")} +
+ {__("items, cost of goods sold, stale inventory and more with Ecomdash's extensive reporting tools.", "wp-module-ecommerce")} +

+
From 9e57009aeea8618a282ce2c938524a3d3fd15ae2 Mon Sep 17 00:00:00 2001 From: aratidgr8 Date: Mon, 8 Jul 2024 21:46:37 +0530 Subject: [PATCH 08/20] Powerful addons section on sales channel page --- build/index.asset.php | 2 +- src/components/SalesChannel.js | 186 +++++++++++++++++++++++++-------- 2 files changed, 142 insertions(+), 46 deletions(-) diff --git a/build/index.asset.php b/build/index.asset.php index 6c0fd429..a154ebd2 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' => '1f3fb8fe6e609473b771'); + array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => 'ee3794c867c71127943b'); diff --git a/src/components/SalesChannel.js b/src/components/SalesChannel.js index 5d0f8b00..46bb32a2 100644 --- a/src/components/SalesChannel.js +++ b/src/components/SalesChannel.js @@ -81,7 +81,7 @@ export function SalesChannel(){
- +
@@ -97,52 +97,148 @@ export function SalesChannel(){
-
-

{__("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 originating sales channel, marking it as shipped.", "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", "wp-module-ecommerce")} +
+ {__("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 labedivng and scanning your", "wp-module-ecommerce")} +
+ {__("products", "wp-module-ecommerce")} +
+
+
+
+ +

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

+
+
+ {__("Print shipping labels with a preferred carrier right from your ecomdash account and save on postage.", "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 the manual data entry needed when creating new listings. ", "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")} +
+
+
+
-
    -
  • - - {__("Barcodes", "wp-module-ecommerce")} - {__("Print barcodes for your products that can be used for labeling and scanning your products", "wp-module-ecommerce")} -
  • -
  • - - {__("Custom Inventory Templates", "wp-module-ecommerce")} - {__("Creating a custom file template allows you to upload and/or export files with product data for thousands of products at once.", "wp-module-ecommerce")} -
  • -
  • - - {__("Shipping Labels", "wp-module-ecommerce")} - {__("Print shipping labels with a preferred carrier right from your ecomdash account and save on postage.", "wp-module-ecommerce")} -
  • -
  • - - {__("Warehouse Feeds", "wp-module-ecommerce")} - {__("Setup feeds to export your sales orders via email or FTP sites to third parties such as Dropshippers, Suppliers, or 3PL systems.", "wp-module-ecommerce")} -
  • -
  • - - {__("Listing Presets", "wp-module-ecommerce")} - {__("Create listing presets to cut down most of the manual data entry needed when creating new listings. ", "wp-module-ecommerce")} -
  • -
  • - - {__("Purchase Orders", "wp-module-ecommerce")} - {__("Quickly create new orders and have inventory quantities adjusted and synced out to listings as units are received.", "wp-module-ecommerce")} -
  • -
  • - - {__("Accounting", "wp-module-ecommerce")} - {__("Seamlessly communicate your sales and purchase order information directly to your accounting software.", "wp-module-ecommerce")} -
  • -
+
From 1b3d664437223466f72129508309d5536ee2bfe4 Mon Sep 17 00:00:00 2001 From: aratidgr8 Date: Tue, 9 Jul 2024 14:32:24 +0530 Subject: [PATCH 09/20] Responsive formatting for Sales Channel Page --- build/index.asset.php | 2 +- src/components/SalesChannel.js | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/build/index.asset.php b/build/index.asset.php index a154ebd2..07e65a12 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' => 'ee3794c867c71127943b'); + array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => 'a770cf5f78bd81efb5a2'); diff --git a/src/components/SalesChannel.js b/src/components/SalesChannel.js index 46bb32a2..3cb490ae 100644 --- a/src/components/SalesChannel.js +++ b/src/components/SalesChannel.js @@ -90,10 +90,13 @@ export function SalesChannel(){ {__("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")} +

+ {/*

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

+

*/}
@@ -104,10 +107,13 @@ export function SalesChannel(){ {__("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")} +

+ {/*

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

+

*/}
From c77cd9b74ccae13f1c0bda59bf4f718e32b1bbf2 Mon Sep 17 00:00:00 2001 From: aratidgr8 Date: Thu, 11 Jul 2024 21:55:24 +0530 Subject: [PATCH 10/20] Fetch Ecomdash status --- build/index.asset.php | 2 +- src/components/SalesChannel.js | 35 +++++++++++++++++++++++++++++----- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/build/index.asset.php b/build/index.asset.php index 07e65a12..bcd415c7 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' => 'a770cf5f78bd81efb5a2'); + array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '2efef9d141f6285fbfaa'); diff --git a/src/components/SalesChannel.js b/src/components/SalesChannel.js index 3cb490ae..90ef0438 100644 --- a/src/components/SalesChannel.js +++ b/src/components/SalesChannel.js @@ -14,8 +14,33 @@ import { ReactComponent as PurchaseOrders } from "../icons/sales-channel/purchas import { ReactComponent as ShippingLabels } from "../icons/sales-channel/shipping-labels.svg"; import { ReactComponent as WarehouseFeeds } from "../icons/sales-channel/warehouse-feeds.svg"; import { Section } from "./Section"; +import { useEffect, useState } from "@wordpress/element"; +import apiFetch from "@wordpress/api-fetch"; +import { NewfoldRuntime } from "../sdk/NewfoldRuntime"; + export function SalesChannel(){ + + const [ecomdashStatus, setEcomdashStatus] = useState(""); + + const apiUrl = NewfoldRuntime.createApiUrl("/newfold-ecommerce/v1/plugins/status", { + plugins: "nfd_slug_ecomdash_wordpress_plugin", + }) + + useEffect(() => { + const fecthApi = async () => { + const data = await apiFetch({ + url: apiUrl, + }); + setEcomdashStatus(data?.details?.nfd_slug_ecomdash_wordpress_plugin?.status); + } + fecthApi() + }, []); + + console.log("ecomDashStatus", ecomdashStatus) + + let showInstallButton = ecomdashStatus === "need_to_install" ? true : false; + return( <> @@ -37,11 +62,11 @@ export function SalesChannel(){ {__("more saving you valuable time.", "wp-module-ecommerce")}​

+ id={showInstallButton ? "install-ecomdash" : "manage-ecomdash"} + variant="primary" + > + {showInstallButton ? __("Get Started Now", "wp-module-ecommerce") : __("Go to Ecomdash", "wp-module-ecommerce")} +
From 5ccaef8d0771fb1d6040b4c5d5f34c83d15a63c5 Mon Sep 17 00:00:00 2001 From: aratidgr8 Date: Mon, 15 Jul 2024 19:09:32 +0530 Subject: [PATCH 11/20] Install and activate Ecomdash plugin on Sales Channel page --- build/index.asset.php | 2 +- src/components/LoadingPanel.js | 2 +- src/components/SalesChannel.js | 116 ++++++++++++++++----------- src/components/useInstallEcomdash.js | 38 +++++++++ src/configs/selectors.js | 10 +++ 5 files changed, 120 insertions(+), 48 deletions(-) create mode 100644 src/components/useInstallEcomdash.js diff --git a/build/index.asset.php b/build/index.asset.php index bcd415c7..a6f1dd73 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' => '2efef9d141f6285fbfaa'); + array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '40b3f3a630c03b873aa1'); 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 index 90ef0438..ff84744b 100644 --- a/src/components/SalesChannel.js +++ b/src/components/SalesChannel.js @@ -1,5 +1,8 @@ -import { Button } from "@newfold/ui-component-library"; +import { Button, Modal } from "@newfold/ui-component-library"; +import { useEffect, useState } from "@wordpress/element"; import { __ } from "@wordpress/i18n"; +import useSWR from "swr"; +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"; @@ -13,35 +16,47 @@ import { ReactComponent as OrdersTable } from "../icons/sales-channel/orders-tab 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 { Section } from "./Section"; -import { useEffect, useState } from "@wordpress/element"; -import apiFetch from "@wordpress/api-fetch"; import { NewfoldRuntime } from "../sdk/NewfoldRuntime"; +import { PluginsSdk } from "../sdk/plugins"; +import { LoadingPanel } from "./LoadingPanel"; +import { Section } from "./Section"; +import { useInstallEcomdash } from "./useInstallEcomdash"; +let ecomdashParser = ecomdashPluginStatusParser("nfd_slug_ecomdash_wordpress_plugin"); -export function SalesChannel(){ - - const [ecomdashStatus, setEcomdashStatus] = useState(""); - - const apiUrl = NewfoldRuntime.createApiUrl("/newfold-ecommerce/v1/plugins/status", { - plugins: "nfd_slug_ecomdash_wordpress_plugin", - }) - - useEffect(() => { - const fecthApi = async () => { - const data = await apiFetch({ - url: apiUrl, - }); - setEcomdashStatus(data?.details?.nfd_slug_ecomdash_wordpress_plugin?.status); - } - fecthApi() - }, []); - - console.log("ecomDashStatus", ecomdashStatus) - let showInstallButton = ecomdashStatus === "need_to_install" ? true : false; +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 isEcommerce = NewfoldRuntime.hasCapability("isEcommerce"); + const hasEcomdash = NewfoldRuntime.hasCapability("hasEcomdash") + + let [installEcomdash, isInstalling] = useInstallEcomdash({ wpModules }); + let showInProgress = isInstalling || ecomdashStatus.data?.isInstalling; + + useEffect(() => { + (ecomdashStatus.data?.isInstalling && !ecomdashStatus.data.isInstalled) ? setIsOpen(true) : setIsOpen(false) + }, [ecomdashStatus.data?.isInstalling]) + + useEffect(() => { + isInstalling ? setIsOpen(true) : setIsOpen(false) + }, [isInstalling]) + return( + + hasYithExtended && canAccessGlobalCTB && hasEcomdash && (ecomdashStatus?.data?.isInstalled || ecomdashStatus?.data?.isNeedToInstall) ? <> @@ -62,11 +77,22 @@ export function SalesChannel(){ {__("more saving you valuable time.", "wp-module-ecommerce")}​

+ className="nfd-button nfd-button--primary" + variant="primary" + type="button" + as={canAccessGlobalCTB && !hasYithExtended && !hasEcomdash ? "a" : "button"} + data-ctb-id={ + canAccessGlobalCTB && hasYithExtended && !hasEcomdash + ? "3edcf593-dbbe-4994-b5c0-a6718bb819c4" + : null + } + href={ (canAccessGlobalCTB && !hasYithExtended && ecomdashStatus.data.isInstalled && ecomdashStatus.data.pluginUrl) || '' } + isLoading={showInProgress} + onClick={hasEcomdash && ecomdashStatus.data.isNeedToInstall ? installEcomdash : null} + id={ecomdashStatus.data.isInstalled ? "manage-ecomdash" : "install-ecomdash" } + > + {ecomdashStatus.data.isInstalled ? __("Go to Ecomdash", "wp-module-ecommerce") : __("Get Started Now", "wp-module-ecommerce") } +
@@ -117,11 +143,6 @@ export function SalesChannel(){

{__("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")}

- {/*

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

*/}
@@ -133,13 +154,7 @@ export function SalesChannel(){

{__("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")} -

- {/*

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

*/} - +

@@ -155,7 +170,6 @@ export function SalesChannel(){
-
@@ -267,13 +281,23 @@ export function SalesChannel(){
-
- - +
-
+ setIsOpen(false)} + className="wppbh-app-sidenav-mobile nfd-z-40" + initialFocus + > + +
+ +
+
+
+ : null ) } \ No newline at end of file diff --git a/src/components/useInstallEcomdash.js b/src/components/useInstallEcomdash.js new file mode 100644 index 00000000..8850c371 --- /dev/null +++ b/src/components/useInstallEcomdash.js @@ -0,0 +1,38 @@ +import { __ } from "@wordpress/i18n"; +import useSWRMutation from "swr/mutation"; +import { PluginsSdk } from "../sdk/plugins"; +import { RuntimeSdk } from "../sdk/runtime"; +import { sleep } from "../sdk/sleep"; + +/** @todo Can be made generic as useInstallPlugin */ + +export function useInstallEcomdash({ wpModules }) { + let { notify } = wpModules; + let installEcomdash = useSWRMutation("install-nfd_slug_ecomdash_wordpress_plugin", async () => { + let response = await PluginsSdk.actions.installSync("nfd_slug_ecomdash_wordpress_plugin"); + if (response !== "failed") { + notify.push("nfd_slug_ecomdash_wordpress_plugin-install-status", { + title: "Installed successfully", + variant: "success", + }); + await sleep(1000); + window.location.href = "admin.php?page=bluehost#/store/sales_channel" + window.location.reload(); + } else { + notify.push("nfd_slug_ecomdash_wordpress_plugin-install-status", { + title: "Failed to install", + description: ( + + {__("Please try again, or ", "wp-module-ecommerce")} + + {__("contact support", "wp-module-ecommerce")} + + + ), + variant: "error", + }); + } + }); + let isInstalling = installEcomdash.isMutating; + return [installEcomdash.trigger, isInstalling]; +} 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); }; From be64009811bbf4570d7a1f8c247a4d233b930cba Mon Sep 17 00:00:00 2001 From: aratidgr8 Date: Mon, 15 Jul 2024 22:12:46 +0530 Subject: [PATCH 12/20] Install & Installed states logic added to Sales Channel --- build/index.asset.php | 2 +- src/components/SalesChannel.js | 21 ++++++++++----- src/components/useInstallEcomdash.js | 38 ---------------------------- 3 files changed, 15 insertions(+), 46 deletions(-) delete mode 100644 src/components/useInstallEcomdash.js diff --git a/build/index.asset.php b/build/index.asset.php index a6f1dd73..1e728054 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' => '40b3f3a630c03b873aa1'); + array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '8e4f220e2b534aecfbed'); diff --git a/src/components/SalesChannel.js b/src/components/SalesChannel.js index ff84744b..1eea03a3 100644 --- a/src/components/SalesChannel.js +++ b/src/components/SalesChannel.js @@ -2,6 +2,7 @@ import { Button, Modal } 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"; @@ -20,7 +21,6 @@ import { NewfoldRuntime } from "../sdk/NewfoldRuntime"; import { PluginsSdk } from "../sdk/plugins"; import { LoadingPanel } from "./LoadingPanel"; import { Section } from "./Section"; -import { useInstallEcomdash } from "./useInstallEcomdash"; let ecomdashParser = ecomdashPluginStatusParser("nfd_slug_ecomdash_wordpress_plugin"); @@ -38,12 +38,12 @@ export function SalesChannel(props){ const {wpModules} = props; const [isOpen, setIsOpen] = useState(false); + const [isInstalling, setInstalling] = useState(ecomdashStatus.isInstalling); const canAccessGlobalCTB = NewfoldRuntime.hasCapability("canAccessGlobalCTB"); const hasYithExtended = NewfoldRuntime.hasCapability("hasYithExtended"); const isEcommerce = NewfoldRuntime.hasCapability("isEcommerce"); const hasEcomdash = NewfoldRuntime.hasCapability("hasEcomdash") - - let [installEcomdash, isInstalling] = useInstallEcomdash({ wpModules }); + let showInProgress = isInstalling || ecomdashStatus.data?.isInstalling; useEffect(() => { @@ -80,15 +80,22 @@ export function SalesChannel(props){ className="nfd-button nfd-button--primary" variant="primary" type="button" - as={canAccessGlobalCTB && !hasYithExtended && !hasEcomdash ? "a" : "button"} + as={canAccessGlobalCTB ? + hasEcomdash ? ecomdashStatus.data.isInstalled ? "a" : "button" : "button" + : "" + } data-ctb-id={ - canAccessGlobalCTB && hasYithExtended && !hasEcomdash + canAccessGlobalCTB && !hasEcomdash ? "3edcf593-dbbe-4994-b5c0-a6718bb819c4" : null } - href={ (canAccessGlobalCTB && !hasYithExtended && ecomdashStatus.data.isInstalled && ecomdashStatus.data.pluginUrl) || '' } + href={ (canAccessGlobalCTB && hasYithExtended && ecomdashStatus.data.isInstalled && ecomdashStatus.data.pluginUrl) || '' } isLoading={showInProgress} - onClick={hasEcomdash && ecomdashStatus.data.isNeedToInstall ? installEcomdash : null} + onClick={hasEcomdash && ecomdashStatus.data.isNeedToInstall ? createPluginInstallAction( + 'nfd_slug_ecomdash_wordpress_plugin', + 16, + wpModules + ) : null} id={ecomdashStatus.data.isInstalled ? "manage-ecomdash" : "install-ecomdash" } > {ecomdashStatus.data.isInstalled ? __("Go to Ecomdash", "wp-module-ecommerce") : __("Get Started Now", "wp-module-ecommerce") } diff --git a/src/components/useInstallEcomdash.js b/src/components/useInstallEcomdash.js deleted file mode 100644 index 8850c371..00000000 --- a/src/components/useInstallEcomdash.js +++ /dev/null @@ -1,38 +0,0 @@ -import { __ } from "@wordpress/i18n"; -import useSWRMutation from "swr/mutation"; -import { PluginsSdk } from "../sdk/plugins"; -import { RuntimeSdk } from "../sdk/runtime"; -import { sleep } from "../sdk/sleep"; - -/** @todo Can be made generic as useInstallPlugin */ - -export function useInstallEcomdash({ wpModules }) { - let { notify } = wpModules; - let installEcomdash = useSWRMutation("install-nfd_slug_ecomdash_wordpress_plugin", async () => { - let response = await PluginsSdk.actions.installSync("nfd_slug_ecomdash_wordpress_plugin"); - if (response !== "failed") { - notify.push("nfd_slug_ecomdash_wordpress_plugin-install-status", { - title: "Installed successfully", - variant: "success", - }); - await sleep(1000); - window.location.href = "admin.php?page=bluehost#/store/sales_channel" - window.location.reload(); - } else { - notify.push("nfd_slug_ecomdash_wordpress_plugin-install-status", { - title: "Failed to install", - description: ( - - {__("Please try again, or ", "wp-module-ecommerce")} - - {__("contact support", "wp-module-ecommerce")} - - - ), - variant: "error", - }); - } - }); - let isInstalling = installEcomdash.isMutating; - return [installEcomdash.trigger, isInstalling]; -} From 3b3f8c1089d7a4ece639b30e9b9c7b7919936cd3 Mon Sep 17 00:00:00 2001 From: aratidgr8 Date: Tue, 16 Jul 2024 15:34:52 +0530 Subject: [PATCH 13/20] Final refactor --- build/index.asset.php | 2 +- src/components/SalesChannel.js | 51 +++++++++++++++++++++------------- 2 files changed, 32 insertions(+), 21 deletions(-) diff --git a/build/index.asset.php b/build/index.asset.php index 1e728054..06e6dcdf 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' => '8e4f220e2b534aecfbed'); + array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => 'a77a0b0c179ee5f63890'); diff --git a/src/components/SalesChannel.js b/src/components/SalesChannel.js index 1eea03a3..ad6b7b8d 100644 --- a/src/components/SalesChannel.js +++ b/src/components/SalesChannel.js @@ -21,7 +21,7 @@ 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"); @@ -36,27 +36,40 @@ export function SalesChannel(props){ { refreshInterval: 30 * 1000 } ); - const {wpModules} = props; + const {wpModules} = props; const [isOpen, setIsOpen] = useState(false); - const [isInstalling, setInstalling] = useState(ecomdashStatus.isInstalling); const canAccessGlobalCTB = NewfoldRuntime.hasCapability("canAccessGlobalCTB"); const hasYithExtended = NewfoldRuntime.hasCapability("hasYithExtended"); - const isEcommerce = NewfoldRuntime.hasCapability("isEcommerce"); const hasEcomdash = NewfoldRuntime.hasCapability("hasEcomdash") + const [ecomdashSetupStatus, setEcomdashSetupStatus] = useState("") - let showInProgress = isInstalling || ecomdashStatus.data?.isInstalling; useEffect(() => { (ecomdashStatus.data?.isInstalling && !ecomdashStatus.data.isInstalled) ? setIsOpen(true) : setIsOpen(false) }, [ecomdashStatus.data?.isInstalling]) useEffect(() => { - isInstalling ? setIsOpen(true) : setIsOpen(false) - }, [isInstalling]) - + let pluginConnectionStatus = async () => { + try { + 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); + return element === null + } catch (error) { + console.error('Error fetching HTML:', error); + } + } + if(ecomdashStatus?.data?.isInstalled){ + pluginConnectionStatus() + } + }, [ecomdashStatus?.data?.isInstalled]) + return( - hasYithExtended && canAccessGlobalCTB && hasEcomdash && (ecomdashStatus?.data?.isInstalled || ecomdashStatus?.data?.isNeedToInstall) ? + hasYithExtended && canAccessGlobalCTB && hasEcomdash && (ecomdashStatus?.data?.isInstalled || ecomdashStatus?.data?.isNeedToInstall || ecomdashStatus.data?.isInstalling) ? <> @@ -79,26 +92,24 @@ export function SalesChannel(props){ @@ -139,7 +150,7 @@ export function SalesChannel(props){ - + From 4b7a8484c2a078e05c1c813802f0d2e3bb66616c Mon Sep 17 00:00:00 2001 From: aratidgr8 Date: Tue, 16 Jul 2024 15:36:16 +0530 Subject: [PATCH 14/20] Removed not required class --- build/index.asset.php | 2 +- src/components/SalesChannel.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/index.asset.php b/build/index.asset.php index 06e6dcdf..b569473a 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' => 'a77a0b0c179ee5f63890'); + array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '9c697528a8c9967a22f4'); diff --git a/src/components/SalesChannel.js b/src/components/SalesChannel.js index ad6b7b8d..85f6669a 100644 --- a/src/components/SalesChannel.js +++ b/src/components/SalesChannel.js @@ -150,7 +150,7 @@ export function SalesChannel(props){ - + From cbfb34d0d96b3ab1bf41357b39b4b37da4d13633 Mon Sep 17 00:00:00 2001 From: aratidgr8 Date: Tue, 16 Jul 2024 17:49:17 +0530 Subject: [PATCH 15/20] Code review comments resolved --- build/index.asset.php | 2 +- src/components/SalesChannel.js | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/build/index.asset.php b/build/index.asset.php index b569473a..e11cd25f 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' => '9c697528a8c9967a22f4'); + array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '694f2cb4d10abd7be591'); diff --git a/src/components/SalesChannel.js b/src/components/SalesChannel.js index 85f6669a..2c8389c7 100644 --- a/src/components/SalesChannel.js +++ b/src/components/SalesChannel.js @@ -93,23 +93,27 @@ export function SalesChannel(props){ className="nfd-button nfd-button--primary" variant="primary" type="button" - as={ canAccessGlobalCTB ? hasEcomdash ? ecomdashStatus.data.isInstalled ? "a" : "button" : "button" : null } + as={ canAccessGlobalCTB ? ( hasEcomdash ? ( ecomdashStatus.data.isInstalled ? "a" : "button" ) : "button" ) : null } data-ctb-id={ canAccessGlobalCTB && hasYithExtended && !hasEcomdash ? "3edcf593-dbbe-4994-b5c0-a6718bb819c4" : null } - href= { (ecomdashStatus.data.isInstalled && ecomdashSetupStatus && ecomdashStatus?.data?.pluginUrl) || (ecomdashStatus.data.isInstalled && !ecomdashSetupStatus && "https://app.svc.ecomdash.com/ecom/dashboard") } + href= { + (ecomdashStatus.data.isInstalled && ecomdashSetupStatus && ecomdashStatus?.data?.pluginUrl) + || + (ecomdashStatus.data.isInstalled && !ecomdashSetupStatus && "https://app.svc.ecomdash.com/ecom/dashboard") + } target="_blank" isLoading={ecomdashStatus.data?.isInstalling} onClick={hasEcomdash && ecomdashStatus.data.isNeedToInstall ? createPluginInstallAction( 'nfd_slug_ecomdash_wordpress_plugin', 16, wpModules - ) : null} + ) : null} id={ecomdashStatus.data.isInstalled ? "manage-ecomdash" : "install-ecomdash" } > - {ecomdashStatus.data.isInstalled ? ecomdashSetupStatus ? __("Get Started Now", "wp-module-ecommerce") : __("Go to Ecomdash", "wp-module-ecommerce") : __("Get Started Now", "wp-module-ecommerce") } + {ecomdashStatus.data.isInstalled ? ( ecomdashSetupStatus ? __("Get Started Now", "wp-module-ecommerce") : __("Go to Ecomdash", "wp-module-ecommerce") ) : __("Install Now", "wp-module-ecommerce") } @@ -143,7 +147,7 @@ export function SalesChannel(props){
  • - {__("Accurately sync kits, multipacks, and components without any headaches.", "wp-module-ecommerce")} + {__("Accurately sync kits, multipacks, and components without any", "wp-module-ecommerce")}
    {__("headaches.", "wp-module-ecommerce")}
    @@ -199,7 +203,7 @@ export function SalesChannel(props){
    {__("Print barcodes for your products that can be", "wp-module-ecommerce")}
    - {__("used for labedivng and scanning your", "wp-module-ecommerce")} + {__("used for labeling and scanning your", "wp-module-ecommerce")}
    {__("products", "wp-module-ecommerce")}
    @@ -212,7 +216,7 @@ export function SalesChannel(props){
    - {__("Print shipping labels with a preferred carrier right from your ecomdash account and save on postage.", "wp-module-ecommerce")} + {__("Print shipping labels with a preferred carrier", "wp-module-ecommerce")}
    {__("right from your ecomdash account and save", "wp-module-ecommerce")}
    @@ -227,7 +231,7 @@ export function SalesChannel(props){
    - {__("Create listing presets to cut down most of the manual data entry needed when creating new listings. ", "wp-module-ecommerce")} + {__("Create listing presets to cut down most of", "wp-module-ecommerce")}
    {__("the manual data entry needed when creating", "wp-module-ecommerce")}
    From 2ffc11cfb919710e4d8dc931fd6e49f285ac633d Mon Sep 17 00:00:00 2001 From: manikantakailasa Date: Thu, 18 Jul 2024 16:01:17 +0530 Subject: [PATCH 16/20] fix PRESS0-1791 --- src/components/SalesChannel.js | 508 ++++++++++++++++----------------- 1 file changed, 254 insertions(+), 254 deletions(-) diff --git a/src/components/SalesChannel.js b/src/components/SalesChannel.js index 2c8389c7..742cc538 100644 --- a/src/components/SalesChannel.js +++ b/src/components/SalesChannel.js @@ -21,305 +21,305 @@ 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){ - +export function SalesChannel(props) { + let ecomdashStatus = useSWR( "nfd_slug_ecomdash_wordpress_plugin-status", () => - PluginsSdk.queries - .status("woocommerce", "nfd_slug_ecomdash_wordpress_plugin") - .then(ecomdashParser), + 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 {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("") - - - useEffect(() => { - (ecomdashStatus.data?.isInstalling && !ecomdashStatus.data.isInstalled) ? setIsOpen(true) : setIsOpen(false) - }, [ecomdashStatus.data?.isInstalling]) - - useEffect(() => { + useEffect(() => { + (ecomdashStatus.data?.isInstalling && !ecomdashStatus.data.isInstalled) ? setIsOpen(true) : setIsOpen(false) + }, [ecomdashStatus.data?.isInstalling]) + + useEffect(() => { let pluginConnectionStatus = async () => { try { - 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); - return element === null + 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); + return element === null } catch (error) { - console.error('Error fetching HTML:', error); + console.error('Error fetching HTML:', error); } - } - if(ecomdashStatus?.data?.isInstalled){ + } + if (ecomdashStatus?.data?.isInstalled) { pluginConnectionStatus() - } - }, [ecomdashStatus?.data?.isInstalled]) - - return( + } + }, [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")}​ -

    - -
    - -
    + ) : null} + id={ecomdashStatus.data.isInstalled ? "manage-ecomdash" : "install-ecomdash"} + > + {ecomdashStatus.data.isInstalled ? (ecomdashSetupStatus ? __("Get Started Now", "wp-module-ecommerce") : __("Go to Ecomdash", "wp-module-ecommerce")) : __("Install Now", "wp-module-ecommerce")} + +

    + +
    -
    -
    -
    -

    - {__("Manage inventory across multiple platforms", "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")} +
      +
    • +
    -
      -
    • - - - {__("Enjoy near real-time inventory updates for an unlimited number of", "wp-module-ecommerce")} -
      - {__("number of channels with our inventory management software.", "wp-module-ecommerce")} -
      -
    • -
    • - - - {__("Manage product levels across multiple warehouses without the fear of overselling.", "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")} -

    - -
    +
    +

    + {__("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")} +
    +

    + {__("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")}
    - {__("on postage.", "wp-module-ecommerce")} -

    + {__("originating sales channel, marking it as shipped.", "wp-module-ecommerce")} +

    -
    -
    - -

    - {__("Listing Presets", "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")} +
    -
    - {__("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")} +
    +
    + +

    + {__("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")} +
    -
    -
    -
    - -

    - {__("Accounting", "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")} +
    -
    - {__("Seamlessly communicate your sales and", "wp-module-ecommerce")} -
    - {__("purchase order information directly to your", "wp-module-ecommerce")} -
    - {__("accounting software.", "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")} +
    +
    +
    + +

    + {__("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")} -

    +
    +
    + +

    + {__("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")} +
    -
    - {__("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")} +
    +
    + +

    + {__("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 + + setIsOpen(false)} + className="wppbh-app-sidenav-mobile nfd-z-40" + initialFocus + > + +
    + +
    +
    +
    + + + : null ) } \ No newline at end of file From 72db436da0dd705f50931000310ea72ed581b25d Mon Sep 17 00:00:00 2001 From: manikantakailasa Date: Fri, 19 Jul 2024 16:55:24 +0530 Subject: [PATCH 17/20] spinner added for PRESS0-1792 --- build/index.asset.php | 2 +- src/components/SalesChannel.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/build/index.asset.php b/build/index.asset.php index e11cd25f..36b5bed4 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' => '694f2cb4d10abd7be591'); + array('lodash', 'moment', 'react', 'react-dom', 'wp-api-fetch', 'wp-data', 'wp-date', 'wp-dom-ready', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '13b8ef685af62f69e2dd'); diff --git a/src/components/SalesChannel.js b/src/components/SalesChannel.js index 742cc538..668e7fd9 100644 --- a/src/components/SalesChannel.js +++ b/src/components/SalesChannel.js @@ -1,4 +1,4 @@ -import { Button, Modal } from "@newfold/ui-component-library"; +import { Button, Modal, Spinner } from "@newfold/ui-component-library"; import { useEffect, useState } from "@wordpress/element"; import { __ } from "@wordpress/i18n"; import useSWR from "swr"; @@ -42,6 +42,7 @@ export function SalesChannel(props) { const hasYithExtended = NewfoldRuntime.hasCapability("hasYithExtended"); const hasEcomdash = NewfoldRuntime.hasCapability("hasEcomdash") const [ecomdashSetupStatus, setEcomdashSetupStatus] = useState("") + const [ecomdashLoading, setEcomdashLoading] = useState(false); useEffect(() => { @@ -51,14 +52,17 @@ export function SalesChannel(props) { 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); } } @@ -113,7 +117,7 @@ export function SalesChannel(props) { ) : null} id={ecomdashStatus.data.isInstalled ? "manage-ecomdash" : "install-ecomdash"} > - {ecomdashStatus.data.isInstalled ? (ecomdashSetupStatus ? __("Get Started Now", "wp-module-ecommerce") : __("Go to Ecomdash", "wp-module-ecommerce")) : __("Install Now", "wp-module-ecommerce")} + {ecomdashStatus.data.isInstalled ? (ecomdashLoading ? <> __("Loading...", "wp-module-ecommerce") : ecomdashSetupStatus ? __("Get Started Now", "wp-module-ecommerce") : __("Go to Ecomdash", "wp-module-ecommerce")) : __("Install Now", "wp-module-ecommerce")}
    From 879582c9365886dbdac4557dd436ec26447f616b Mon Sep 17 00:00:00 2001 From: manikantakailasa Date: Fri, 19 Jul 2024 17:02:15 +0530 Subject: [PATCH 18/20] fix translations --- src/components/SalesChannel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SalesChannel.js b/src/components/SalesChannel.js index 668e7fd9..1f389e94 100644 --- a/src/components/SalesChannel.js +++ b/src/components/SalesChannel.js @@ -117,7 +117,7 @@ export function SalesChannel(props) { ) : null} id={ecomdashStatus.data.isInstalled ? "manage-ecomdash" : "install-ecomdash"} > - {ecomdashStatus.data.isInstalled ? (ecomdashLoading ? <> __("Loading...", "wp-module-ecommerce") : ecomdashSetupStatus ? __("Get Started Now", "wp-module-ecommerce") : __("Go to Ecomdash", "wp-module-ecommerce")) : __("Install Now", "wp-module-ecommerce")} + {ecomdashStatus.data.isInstalled ? (ecomdashLoading ? <> {__("Loading...", "wp-module-ecommerce")} : ecomdashSetupStatus ? __("Get Started Now", "wp-module-ecommerce") : __("Go to Ecomdash", "wp-module-ecommerce")) : __("Install Now", "wp-module-ecommerce")}
    From 4fdcc05c47f274b5fd13e9d0d38f5d4ec9a2f42b Mon Sep 17 00:00:00 2001 From: manikantakailasa Date: Fri, 19 Jul 2024 19:05:50 +0530 Subject: [PATCH 19/20] fix font --- src/components/SalesChannel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/SalesChannel.js b/src/components/SalesChannel.js index 1f389e94..28e3c6e8 100644 --- a/src/components/SalesChannel.js +++ b/src/components/SalesChannel.js @@ -84,7 +84,7 @@ export function SalesChannel(props) {

    {__("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")} From eea7d33f473f52ad263674a080d1e16f048705dd Mon Sep 17 00:00:00 2001 From: aratidgr8 Date: Wed, 24 Jul 2024 15:58:46 +0530 Subject: [PATCH 20/20] Code review fixes & version bump changes --- bootstrap.php | 2 +- build/index.asset.php | 2 +- composer.lock | 186 +++++++++++++++++++++++---------- package-lock.json | 4 +- package.json | 2 +- src/components/SalesChannel.js | 16 ++- 6 files changed, 149 insertions(+), 63 deletions(-) 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 36b5bed4..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' => '13b8ef685af62f69e2dd'); + 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/SalesChannel.js b/src/components/SalesChannel.js index 28e3c6e8..7867de3a 100644 --- a/src/components/SalesChannel.js +++ b/src/components/SalesChannel.js @@ -117,7 +117,21 @@ export function SalesChannel(props) { ) : null} id={ecomdashStatus.data.isInstalled ? "manage-ecomdash" : "install-ecomdash"} > - {ecomdashStatus.data.isInstalled ? (ecomdashLoading ? <> {__("Loading...", "wp-module-ecommerce")} : ecomdashSetupStatus ? __("Get Started Now", "wp-module-ecommerce") : __("Go to Ecomdash", "wp-module-ecommerce")) : __("Install Now", "wp-module-ecommerce")} + { + ecomdashStatus.data.isInstalled ? + ( + ecomdashLoading ? + <> {__("Installing...", "wp-module-ecommerce")} + : + ( + ecomdashSetupStatus ? + __("Get Started Now", "wp-module-ecommerce") + : + __("Go to Ecomdash", "wp-module-ecommerce")) + ) + : + __("Install Now", "wp-module-ecommerce") + }