diff --git a/assets/src/admin.scss b/assets/src/admin.scss index 5f9ca40e..5d2665ba 100644 --- a/assets/src/admin.scss +++ b/assets/src/admin.scss @@ -2060,7 +2060,7 @@ End Settings Sidebar position: relative; .pro-content-overlay { - width: 120%; + width: 110%; height: 150%; overflow: hidden; border-radius: 5px; diff --git a/assets/src/components/settings/Panels/PanelSettings/Fields/CheckboxGroup.js b/assets/src/components/settings/Panels/PanelSettings/Fields/CheckboxGroup.js index 2f3dd8c4..3ae8af27 100644 --- a/assets/src/components/settings/Panels/PanelSettings/Fields/CheckboxGroup.js +++ b/assets/src/components/settings/Panels/PanelSettings/Fields/CheckboxGroup.js @@ -77,6 +77,7 @@ const CheckboxGroup = ({ needUpgrade = false, showProIcon = true, showSingleCheckOverlay = true, + children, }) => { const handleChange = (option) => { if (isSingleMode) { @@ -91,7 +92,10 @@ const CheckboxGroup = ({ const noop = () => {}; return ( - +
{/* Handle switcher title. */} @@ -107,7 +111,11 @@ const CheckboxGroup = ({ {options.map((checkbox) => ( - + {children} - { needUpgrade && } + {needUpgrade && } ); }; diff --git a/includes/modules/direct-checkout/assets/src/components/General.js b/includes/modules/direct-checkout/assets/src/components/General.js index 7638d7b5..9a1bc29c 100644 --- a/includes/modules/direct-checkout/assets/src/components/General.js +++ b/includes/modules/direct-checkout/assets/src/components/General.js @@ -9,6 +9,9 @@ import ActionsHandler from "sales-booster/src/components/settings/Panels/PanelSe import { createDirectCheckoutForm } from "../helper"; function General({ onFormSave, upgradeTeaser }) { + const modulePageRedirect = () => { + window.location.href = "/wp-admin/admin.php?page=sgsb-modules"; + }; const { setCreateFromData } = useDispatch("sgsb_direct_checkout"); const { createDirectCheckoutFormData, getButtonLoading } = useSelect( (select) => ({ @@ -32,7 +35,20 @@ function General({ onFormSave, upgradeTeaser }) { const noop = () => {}; - const checkboxesOption = [ + const fancyTextStyle = { + color: "#3498db", + fontWeight: "bold", + textAlign: "center", + padding: "10px", + border: "1px solid #bdc3c7", + borderRadius: "4px", + }; + + const redTextStyle = { + color: "red", + }; + + const buttonLayoutOptions = [ { label: `"Add to cart" as "${createDirectCheckoutFormData.buy_now_button_label}"`, value: "cart-to-buy-now", @@ -64,14 +80,22 @@ function General({ onFormSave, upgradeTeaser }) { ]; // Define select options - const selectOptions = [ + const checkoutPageOptions = [ { - value: "legacy-checkout", label: __("Legacy Checkout", "storegrowth-sales-booster"), + value: "legacy-checkout", + tooltip: __( + "The Chekout will redirect to the default checkout page.", + "storegrowth-sales-booster" + ), }, { - value: "quick-cart-checkout", label: __("Quick Cart Checkout", "storegrowth-sales-booster"), + value: "quick-cart-checkout", + tooltip: __( + "The checkout will redirect to Qucik Cart module cart chekout page.", + "storegrowth-sales-booster" + ), needUpgrade: upgradeTeaser, disabled: isQuickCartActive, }, @@ -95,7 +119,7 @@ function General({ onFormSave, upgradeTeaser }) { /> - - + {isQuickCartActive && !upgradeTeaser && ( +
+

+ Please Activate the{" "} + Quick Cart Module to use the + Quick Cart Checkout{" "} + Redirection. +

+
+ +
+
)} - options={selectOptions} - /> +