diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e5e9d2b5..eca18c75 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,4 +23,4 @@ jobs: SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} SVN_USERNAME: ${{ secrets.SVN_USERNAME }} SLUG: storegrowth-sales-booster - VERSION: 1.1.3 + VERSION: 1.24.4 diff --git a/.gitignore b/.gitignore index 4bd1cbf5..e7ebaa0f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,6 @@ node_modules vendor .idea lerna-debug.log +package-lock.json assets/build/ Includes/Modules/*/assets/build/ diff --git a/Includes/Modules/CountdownTimer/CountdownTimerModule.php b/Includes/Modules/CountdownTimer/CountdownTimerModule.php index a9b85aa8..7c0dc776 100644 --- a/Includes/Modules/CountdownTimer/CountdownTimerModule.php +++ b/Includes/Modules/CountdownTimer/CountdownTimerModule.php @@ -55,7 +55,7 @@ public function get_banner() { * @return string */ public function get_name() { - return 'Sales Countdown'; + return 'Countdown Timer'; } /** diff --git a/Includes/Modules/CountdownTimer/Includes/CommonHooks.php b/Includes/Modules/CountdownTimer/Includes/CommonHooks.php index e8a37a43..93f0eaa2 100644 --- a/Includes/Modules/CountdownTimer/Includes/CommonHooks.php +++ b/Includes/Modules/CountdownTimer/Includes/CommonHooks.php @@ -57,7 +57,7 @@ public function woocommerce_product_data_tabs( $tabs ) { if ( ! $this->is_external_product() ) { // Adds the new tab. $tabs['countdown_timer_tab'] = array( - 'label' => __( 'Sales Countdown', 'storegrowth-sales-booster' ), + 'label' => __( 'Countdown Timer', 'storegrowth-sales-booster' ), 'target' => 'sgsb-countdown-timer-tab', ); } diff --git a/Includes/Modules/CountdownTimer/assets/scripts/wpbs-style.css b/Includes/Modules/CountdownTimer/assets/scripts/wpbs-style.css index 17cddcb0..e1bf36c0 100644 --- a/Includes/Modules/CountdownTimer/assets/scripts/wpbs-style.css +++ b/Includes/Modules/CountdownTimer/assets/scripts/wpbs-style.css @@ -152,11 +152,13 @@ width: fit-content; } +.sgsb-countdown-timer-heading.ct-layout-2.default { + background: linear-gradient(90deg, #32DBBE 0%, #008DFF 100%) text; + -webkit-text-fill-color: transparent; +} + .sgsb-countdown-timer-heading.ct-layout-2 { -background: linear-gradient(90deg, #32DBBE 0%, #008DFF 100%); -webkit-background-clip: text; --webkit-text-fill-color: transparent; -font-family: "Merienda" !important; } /* layout2 styles end */ diff --git a/Includes/Modules/CountdownTimer/assets/src/components/DesignTab.js b/Includes/Modules/CountdownTimer/assets/src/components/DesignTab.js index 934571a6..f20c47ea 100644 --- a/Includes/Modules/CountdownTimer/assets/src/components/DesignTab.js +++ b/Includes/Modules/CountdownTimer/assets/src/components/DesignTab.js @@ -8,6 +8,8 @@ import ActionsHandler from "sales-booster/src/components/settings/Panels/PanelSe import "../styles/countdown-timer.css"; import Templates from "./Templates"; +import SelectBox from "sales-booster/src/components/settings/Panels/PanelSettings/Fields/SelectBox"; +import {applyFilters} from "@wordpress/hooks"; function DesignTab( props ) { const { @@ -21,31 +23,89 @@ function DesignTab( props ) { noop, options, handleSelect, + undoHandler, + showUndoIcon } = props; + const fontFamily = [ + { + value: 'poppins', + label: __('Poppins', 'storegrowth-sales-booster'), + }, + { + value: 'merienda', + label: __('Merienda', 'storegrowth-sales-booster'), + }, + { + value: 'roboto', + label: __('Roboto', 'storegrowth-sales-booster'), + }, + { + value: 'lato', + label: __('Lato', 'storegrowth-sales-booster'), + }, + { + value: 'montserrat', + label: __('Montserrat', 'storegrowth-sales-booster'), + }, + { + value: 'ibm_plex_sans', + label: __('IBM Plex Sans', 'storegrowth-sales-booster'), + }, + ]; + return ( + + + + {/* Rendered countdown settings. */} + { applyFilters( + 'sgsb_append_countdown_design_settings', + '', + formData, + onFieldChange, + showUndoIcon, + undoHandler + ) } + - - - {/**/} - {/*
*/} - {/* {options.map((option, index) => (*/} - {/* handleSelect(option.theme)}*/} - {/* isSelected={option.theme === formData.selected_theme}*/} - {/* />*/} - {/* ))}*/} - {/*
*/} - {/*
*/} +
); } diff --git a/Includes/Modules/CountdownTimer/assets/src/components/Preview.js b/Includes/Modules/CountdownTimer/assets/src/components/Preview.js index 5f9372df..b93cf730 100644 --- a/Includes/Modules/CountdownTimer/assets/src/components/Preview.js +++ b/Includes/Modules/CountdownTimer/assets/src/components/Preview.js @@ -1,13 +1,38 @@ -import React, {Fragment} from 'react' -import {__} from "@wordpress/i18n"; +import React, { Fragment } from 'react' +import { __ } from "@wordpress/i18n"; +import { useState, useEffect } from '@wordpress/element'; +import { applyFilters } from "@wordpress/hooks"; const Preview = ( { formData } ) => { + const [ defaultHeading, setDefaultHeading ] = useState( true ); + const [ defaultCounter, setDefaultCounter ] = useState( true ); const dynamicText = formData.countdown_heading.replace( '[discount]', 50 ); - + + const isProExists = applyFilters( + 'sgsb_render_countdown_premium_styles', + false + ); + + useEffect( () => { + if ( formData?.selected_theme === 'ct-layout-2' ) { + setDefaultHeading( formData?.heading_text_color === 'transparent' ); + } + }, [ formData?.heading_text_color ] ); + + useEffect( () => { + if ( !isProExists ) return; + + if ( formData?.selected_theme === 'ct-layout-2' ) { + setDefaultCounter( formData?.counter_background_color === 'transparent' ); + } else { + setDefaultCounter( formData?.counter_background_color === '#FFFFFF' ); + } + }, [ formData?.counter_background_color ] ); + return ( { formData?.selected_theme === 'ct-layout-1' && ( @@ -39,6 +64,7 @@ const Preview = ( { formData } ) => { textAlign : 'center', fontWeight : 600, lineHeight : 1.2, + fontFamily : formData?.font_family, } } > { __( dynamicText, 'storegrowth-sales-booster' ) } @@ -58,10 +84,11 @@ const Preview = ( { formData } ) => { color : '#989FAB', width : 64, height : 64, - border : `1px solid #ecedf0`, + border : `1px solid ${isProExists ? formData?.counter_border_color : '#ECEDF0'}`, fontSize : 12, textAlign : 'center', paddingTop : 12, + background : isProExists ? formData?.counter_background_color : '#FFFFFF', borderRadius : 8, letterSpacing : 2, textTransform : 'uppercase', @@ -70,22 +97,30 @@ const Preview = ( { formData } ) => { { __( '03', 'storegrowth-sales-booster' ) } - { __( 'Days', 'storegrowth-sales-booster' ) } + + { __( 'Days', 'storegrowth-sales-booster' ) } + { width : 64, color : '#989FAB', height : 64, - border : `1px solid #ecedf0`, + border : `1px solid ${isProExists ? formData?.counter_border_color : '#ECEDF0'}`, fontSize : 12, textAlign : 'center', + background : isProExists ? formData?.counter_background_color : '#FFFFFF', paddingTop : 12, borderRadius : 8, letterSpacing : 2, @@ -108,22 +144,30 @@ const Preview = ( { formData } ) => { { __( '21', 'storegrowth-sales-booster' ) } - { __( 'Hours', 'storegrowth-sales-booster' ) } + + { __( 'Hours', 'storegrowth-sales-booster' ) } + { width : 64, color : '#989FAB', height : 64, - border : `1px solid #ecedf0`, + border : `1px solid ${isProExists ? formData?.counter_border_color : '#ECEDF0'}`, fontSize : 12, textAlign : 'center', + background : isProExists ? formData?.counter_background_color : '#FFFFFF', paddingTop : 12, borderRadius : 8, letterSpacing : 2, @@ -146,22 +191,30 @@ const Preview = ( { formData } ) => { { __( '02', 'storegrowth-sales-booster' ) } - { __( 'Min', 'storegrowth-sales-booster' ) } + + { __( 'Min', 'storegrowth-sales-booster' ) } + { width : 64, color : '#989FAB', height : 64, - border : `1px solid #ecedf0`, + border : `1px solid ${isProExists ? formData?.counter_border_color : '#ECEDF0'}`, fontSize : 12, textAlign : 'center', + background : isProExists ? formData?.counter_background_color : '#FFFFFF', paddingTop : 12, borderRadius : 8, letterSpacing : 2, @@ -184,17 +238,25 @@ const Preview = ( { formData } ) => { { __( '33', 'storegrowth-sales-booster' ) } - { __( 'Sec', 'storegrowth-sales-booster' ) } + + { __( 'Sec', 'storegrowth-sales-booster' ) } + @@ -225,14 +287,15 @@ const Preview = ( { formData } ) => {

@@ -245,8 +308,8 @@ const Preview = ( { formData } ) => { color : '#fff', width : 'fit-content', display : 'flex', - boxShadow : '0px 12px 48px 0px rgba(27, 27, 80, 0.10)', - background : 'var(--gradient, linear-gradient(90deg, #32DBBE 0%, #008DFF 100%))', + boxShadow : defaultCounter ? '0px 12px 48px 0px rgba(27, 27, 80, 0.10)' : '', + background : defaultCounter ? 'var(--gradient, linear-gradient(90deg, #32DBBE 0%, #008DFF 100%))' : '', marginBottom : 10, borderRadius : 6, justifyContent : 'center', @@ -256,11 +319,12 @@ const Preview = ( { formData } ) => { className='sgsb-countdown-timer-item ct-layout-2' style={ { width : 64, + border : `1px solid ${isProExists ? formData?.counter_border_color : 'transparent'}`, height : 64, fontSize : 12, textAlign : 'center', + background : !defaultCounter ? formData?.counter_background_color : '', paddingTop : 12, - borderRadius : 8, letterSpacing : 2, textTransform : 'uppercase', @@ -269,20 +333,30 @@ const Preview = ( { formData } ) => { { __( '03', 'storegrowth-sales-booster' ) } - { __( 'Days', 'storegrowth-sales-booster' ) } + + { __( 'Days', 'storegrowth-sales-booster' ) } + { className='sgsb-countdown-timer-item ct-layout-2' style={ { width : 64, + border : `1px solid ${isProExists ? formData?.counter_border_color : 'transparent'}`, height : 64, fontSize : 12, textAlign : 'center', - + background : !defaultCounter ? formData?.counter_background_color : '', paddingTop : 12, borderRadius : 8, letterSpacing : 2, @@ -304,20 +379,30 @@ const Preview = ( { formData } ) => { { __( '21', 'storegrowth-sales-booster' ) } - { __( 'Hours', 'storegrowth-sales-booster' ) } + + { __( 'Hours', 'storegrowth-sales-booster' ) } + { className='sgsb-countdown-timer-item ct-layout-2' style={ { width : 64, + border : `1px solid ${isProExists ? formData?.counter_border_color : 'transparent'}`, height : 64, fontSize : 12, textAlign : 'center', - + background : !defaultCounter ? formData?.counter_background_color : '', paddingTop : 12, borderRadius : 8, letterSpacing : 2, @@ -339,20 +425,30 @@ const Preview = ( { formData } ) => { { __( '02', 'storegrowth-sales-booster' ) } - { __( 'Min', 'storegrowth-sales-booster' ) } + + { __( 'Min', 'storegrowth-sales-booster' ) } + { className='sgsb-countdown-timer-item ct-layout-2' style={ { width : 64, + border : `1px solid ${isProExists ? formData?.counter_border_color : 'transparent'}`, height : 64, fontSize : 12, textAlign : 'center', - + background : !defaultCounter ? formData?.counter_background_color : '', paddingTop : 12, borderRadius : 8, letterSpacing : 2, @@ -374,16 +471,25 @@ const Preview = ( { formData } ) => { { __( '33', 'storegrowth-sales-booster' ) } - { __( 'Sec', 'storegrowth-sales-booster' ) } + + { __( 'Sec', 'storegrowth-sales-booster' ) } + diff --git a/Includes/Modules/CountdownTimer/assets/src/components/SalesCountdownLayout.js b/Includes/Modules/CountdownTimer/assets/src/components/SalesCountdownLayout.js index 9023c517..4fdca756 100644 --- a/Includes/Modules/CountdownTimer/assets/src/components/SalesCountdownLayout.js +++ b/Includes/Modules/CountdownTimer/assets/src/components/SalesCountdownLayout.js @@ -19,7 +19,7 @@ import Custom from "../../images/layout/custom.svg"; import "../styles/countdown-timer.css"; import TouchPreview from "sales-booster/src/components/settings/Panels/TouchPreview"; -function SalesCountdownLayout({ navigate, useSearchParams ,moduleId}) { +function SalesCountdownLayout({ navigate, useSearchParams, moduleId }) { const isProEnabled = sgsbAdmin.isPro; const { setPageLoading } = useDispatch("sgsb"); const [buttonLoading, setButtonLoading] = useState(false); @@ -43,11 +43,18 @@ function SalesCountdownLayout({ navigate, useSearchParams ,moduleId}) { }, ]; const initialSalesCountdownData = { + font_family : 'roboto', border_color : '#1677FF', + day_text_color : '#1B1B50', selected_theme : 'ct-layout-1', + hour_text_color : '#1B1B50', + minute_text_color : '#1B1B50', + second_text_color : '#1B1B50', countdown_heading : '[discount]% OFF', - heading_text_color : '#008dff', - widget_background_color : '#ffffff', + heading_text_color : '#008DFF', + counter_border_color : '#ECEDF0', + widget_background_color : '#FFFFFF', + counter_background_color : '#FFFFFF', shop_page_countdown_enable : false, product_page_countdown_enable : true, }; @@ -55,15 +62,65 @@ function SalesCountdownLayout({ navigate, useSearchParams ,moduleId}) { const [formData, setFormData] = useState({ ...initialSalesCountdownData, }); + const [undoData, setUndoData] = useState({ + ...initialSalesCountdownData, + }); + + const undoState = { + border_color : false, + day_text_color : false, + hour_text_color : false, + minute_text_color : false, + second_text_color : false, + counter_border_color : false, + heading_text_color : false, + widget_background_color : false, + counter_background_color: false, + }; const onFormReset = () => { setFormData({ ...initialSalesCountdownData }); + setShowUndo( { ...undoState } ); }; const changeTab = (key) => { navigate("/countdown-timer?tab_name=" + key); }; + const [showUndo, setShowUndo] = useState( { ...undoState } ); + + const colorKeyStack = [ + 'border_color', + 'day_text_color', + 'hour_text_color', + 'minute_text_color', + 'second_text_color', + 'heading_text_color', + 'counter_border_color', + 'widget_background_color', + 'counter_background_color', + ]; + + const onFieldChange = (key, value) => { + setFormData({ ...formData, [key]: value }); + if ( colorKeyStack?.includes( key ) ) { + setShowUndo({ ...showUndo, [key]: true }); + } + }; + + const onUndoClick = ( key ) => { + if ( colorKeyStack?.includes( key ) ) { + setShowUndo({ + ...showUndo, + [key]: false, + }); + setFormData({ + ...formData, + [key]: undoData?.[key], + }); + } + }; + const notificationMessage = (type) => { if (type == "general_settings") { notification["success"]({ @@ -96,8 +153,10 @@ function SalesCountdownLayout({ navigate, useSearchParams ,moduleId}) { data: data, }) .success(() => { + setShowUndo(false); setButtonLoading(false); notificationMessage(type); + setUndoData({ ...formData }); }); }; @@ -116,6 +175,7 @@ function SalesCountdownLayout({ navigate, useSearchParams ,moduleId}) { .success((response) => { if (response.success) { setFormData({ ...formData, ...response.data }); + setUndoData({ ...undoData, ...response.data }); setTimeout(() => setPageLoading(false), 500); } }); @@ -129,21 +189,18 @@ function SalesCountdownLayout({ navigate, useSearchParams ,moduleId}) { onFieldChange("selected_theme", theme); }; - const onFieldChange = (key, value) => { - setFormData({ ...formData, [key]: value }); - }; - const noop = () => {}; const excludeTabs = []; const showPreview = !excludeTabs?.includes(tabName); - const fontUrl = 'https://fonts.googleapis.com/css2?family=Merienda&display=swap'; + const fontUrl = + "https://fonts.googleapis.com/css2?family=Merienda&display=swap"; - const link = document.createElement( 'link' ); + const link = document.createElement("link"); link.href = fontUrl; - link.rel = 'stylesheet'; + link.rel = "stylesheet"; - document.head.appendChild( link ); + document.head.appendChild(link); const tabPanels = [ { @@ -166,6 +223,8 @@ function SalesCountdownLayout({ navigate, useSearchParams ,moduleId}) { title: __("Design", "storegrowth-sales-booster"), panel: ( {showPreview && tabName && ( - + )} {/* Render preview panel for responsive preview. */} - + diff --git a/Includes/Modules/CountdownTimer/assets/src/components/SettingInstruction.js b/Includes/Modules/CountdownTimer/assets/src/components/SettingInstruction.js index cc537114..aaebddb3 100644 --- a/Includes/Modules/CountdownTimer/assets/src/components/SettingInstruction.js +++ b/Includes/Modules/CountdownTimer/assets/src/components/SettingInstruction.js @@ -14,7 +14,7 @@ const SettingInstruction = () => { {" "} in woocommerce. Then select a desired product to Edit. In the product meta of woocommerce you will be able to see{" "} - "Sales Countdown". + "Countdown Timer".

{ onClick={() => window.open( "https://storegrowth.io/docs/sales-countdown/", - "_blank" + "_blank", ) } > - Documentaion + Documentation
diff --git a/Includes/Modules/CountdownTimer/assets/src/components/Templates.js b/Includes/Modules/CountdownTimer/assets/src/components/Templates.js index c6530632..a97a259f 100644 --- a/Includes/Modules/CountdownTimer/assets/src/components/Templates.js +++ b/Includes/Modules/CountdownTimer/assets/src/components/Templates.js @@ -7,7 +7,7 @@ import {applyFilters} from "@wordpress/hooks"; import RadioTemplate from "sales-booster/src/components/settings/Panels/PanelSettings/Fields/RadioTemplate"; import CountDownTwo from "./Templates/CountDownTwo"; -const Templates = ( { formData, setFormData } ) => { +const Templates = ( { formData, setFormData, showUndoIcon } ) => { let templates = [ { key: 'ct-layout-1', component: }, { key: 'ct-layout-2', component: }, @@ -21,16 +21,30 @@ const Templates = ( { formData, setFormData } ) => { let templateStyles = { 'ct-layout-1' : { - border_color : '#1677FF', - selected_theme : 'ct-layout-1', - heading_text_color : '#008dff', - widget_background_color : '#FFF', + font_family : 'roboto', + border_color : '#1677FF', + day_text_color : '#1B1B50', + selected_theme : 'ct-layout-1', + hour_text_color : '#1B1B50', + minute_text_color : '#1B1B50', + second_text_color : '#1B1B50', + heading_text_color : '#008dff', + counter_border_color : '#ECEDF0', + widget_background_color : '#FFFFFF', + counter_background_color : '#FFFFFF', }, 'ct-layout-2' : { - border_color : '#0875FF33', - selected_theme : 'ct-layout-2', - heading_text_color : '#008dff', - widget_background_color : '#eff8ff', + font_family : 'merienda', + border_color : '#0875FF33', + day_text_color : '#FFFFFF', + selected_theme : 'ct-layout-2', + hour_text_color : '#FFFFFF', + minute_text_color : '#FFFFFF', + second_text_color : '#FFFFFF', + heading_text_color : 'transparent', + counter_border_color : 'transparent', + widget_background_color : '#eff8ff', + counter_background_color : 'transparent', }, }; @@ -41,6 +55,10 @@ const Templates = ( { formData, setFormData } ) => { ); const onTemplateChange = ( name, value ) => { + for ( let key in showUndoIcon ) { + showUndoIcon[key] = false; + } + setFormData( { ...formData, ...templateStyles?.[ value ] diff --git a/Includes/Modules/CountdownTimer/assets/src/components/Templates/CountDownOne.js b/Includes/Modules/CountdownTimer/assets/src/components/Templates/CountDownOne.js index e587701b..83bed7a9 100644 --- a/Includes/Modules/CountdownTimer/assets/src/components/Templates/CountDownOne.js +++ b/Includes/Modules/CountdownTimer/assets/src/components/Templates/CountDownOne.js @@ -29,6 +29,7 @@ const CountDownOne = () => { textAlign : 'center', fontWeight : 600, lineHeight : 1.2, + fontFamily : 'Roboto', } } > { __( '50% OFF', 'storegrowth-sales-booster' ) } @@ -65,16 +66,19 @@ const CountDownOne = () => { fontSize : 24, lineHeight : .75, fontWeight : 500, + fontFamily : 'Roboto', } } > { __( '03', 'storegrowth-sales-booster' ) } - { __( 'Days', 'storegrowth-sales-booster' ) } + + { __( 'Days', 'storegrowth-sales-booster' ) } + { fontSize : 24, lineHeight : .75, fontWeight : 500, + fontFamily : 'Roboto', } } > { __( '21', 'storegrowth-sales-booster' ) } - { __( 'Hours', 'storegrowth-sales-booster' ) } + + { __( 'Hours', 'storegrowth-sales-booster' ) } + { fontSize : 24, lineHeight : .75, fontWeight : 500, + fontFamily : 'Roboto', } } > { __( '02', 'storegrowth-sales-booster' ) } - { __( 'Min', 'storegrowth-sales-booster' ) } + + { __( 'Min', 'storegrowth-sales-booster' ) } + { fontSize : 24, lineHeight : .75, fontWeight : 500, + fontFamily : 'Roboto', } } > { __( '33', 'storegrowth-sales-booster' ) } - { __( 'Sec', 'storegrowth-sales-booster' ) } + + { __( 'Sec', 'storegrowth-sales-booster' ) } + diff --git a/Includes/Modules/CountdownTimer/assets/src/components/Templates/CountDownTwo.js b/Includes/Modules/CountdownTimer/assets/src/components/Templates/CountDownTwo.js index 87d5c3b0..c5b0c514 100644 --- a/Includes/Modules/CountdownTimer/assets/src/components/Templates/CountDownTwo.js +++ b/Includes/Modules/CountdownTimer/assets/src/components/Templates/CountDownTwo.js @@ -72,11 +72,14 @@ const CountDownTwo = () => { fontSize : 24, lineHeight : .75, fontWeight : 500, + fontFamily : 'Merienda', } } > { __( '03', 'storegrowth-sales-booster' ) } - { __( 'Days', 'storegrowth-sales-booster' ) } + + { __( 'Days', 'storegrowth-sales-booster' ) } + { padding : '14px 0', fontSize : 12, textAlign : 'center', - borderRadius : 8, letterSpacing : 2, textTransform : 'uppercase', @@ -106,11 +108,14 @@ const CountDownTwo = () => { fontSize : 24, lineHeight : .75, fontWeight : 500, + fontFamily : 'Merienda', } } > { __( '21', 'storegrowth-sales-booster' ) } - { __( 'Hours', 'storegrowth-sales-booster' ) } + + { __( 'Hours', 'storegrowth-sales-booster' ) } + { padding : '14px 0', fontSize : 12, textAlign : 'center', - borderRadius : 8, letterSpacing : 2, textTransform : 'uppercase', @@ -140,11 +144,14 @@ const CountDownTwo = () => { fontSize : 24, lineHeight : .75, fontWeight : 500, + fontFamily : 'Merienda', } } > { __( '02', 'storegrowth-sales-booster' ) } - { __( 'Min', 'storegrowth-sales-booster' ) } + + { __( 'Min', 'storegrowth-sales-booster' ) } + { padding : '14px 0', fontSize : 12, textAlign : 'center', - borderRadius : 8, letterSpacing : 2, textTransform : 'uppercase', @@ -174,15 +180,17 @@ const CountDownTwo = () => { fontSize : 24, lineHeight : .75, fontWeight : 500, + fontFamily : 'Merienda', } } > { __( '33', 'storegrowth-sales-booster' ) } - { __( 'Sec', 'storegrowth-sales-booster' ) } + + { __( 'Sec', 'storegrowth-sales-booster' ) } + - ); } diff --git a/Includes/Modules/CountdownTimer/assets/src/settings.js b/Includes/Modules/CountdownTimer/assets/src/settings.js index 4aab2cfb..8d2d0155 100644 --- a/Includes/Modules/CountdownTimer/assets/src/settings.js +++ b/Includes/Modules/CountdownTimer/assets/src/settings.js @@ -13,7 +13,7 @@ addFilter( routes.push({ name: moduleName, - label: "Sales Countdown", + label: "Countdown Timer", path: "/countdown-timer", element: ( { items.push({ - label: Sales Countdown, + label: Countdown Timer, key: "countdown-timer", icon: , }); diff --git a/Includes/Modules/CountdownTimer/templates/countdown-timer.php b/Includes/Modules/CountdownTimer/templates/countdown-timer.php index 7f9aad3f..d815dd6a 100644 --- a/Includes/Modules/CountdownTimer/templates/countdown-timer.php +++ b/Includes/Modules/CountdownTimer/templates/countdown-timer.php @@ -27,11 +27,44 @@ $heading_text = sgsb_find_option_setting( $settings, 'countdown_heading', 'Last chance! [discount]% OFF' ); $heading = str_replace( '[discount]', $discount_amount, $heading_text ); +$families = [ + 'lato' => 'Lato', + 'roboto' => 'Roboto', + 'poppins' => 'Poppins', + 'merienda' => 'Merienda', + 'montserrat' => 'Montserrat', + 'ibm_plex_sans' => 'IBM Plex Sans', +]; + // Countdown Styles. +$font_family = sgsb_find_option_setting( $settings, 'font_family', 'roboto' ); $border_color = sgsb_find_option_setting( $settings, 'border_color', '#1677FF' ); $heading_color = sgsb_find_option_setting( $settings, 'heading_text_color', '#008DFF' ); $background_color = sgsb_find_option_setting( $settings, 'widget_background_color', '#FFF' ); +// Get countdown heading template conditionally. +$heading_color = ( $layout_class !== 'ct-layout-2' ? $heading_color : ( $heading_color !== 'transparent' ? $heading_color: 'default' ) ); +$font_family = ! empty( $families[ $font_family ] ) ? $families[ $font_family ] : $font_family; + +$widget_style = apply_filters( + 'sgsb_countdown_timer_styles', + array( + 'day_text_color' => $layout_class === 'ct-layout-1' ? '#1B1B50' : '#FFFFFF', + 'hour_text_color' => $layout_class === 'ct-layout-1' ? '#1B1B50' : '#FFFFFF', + 'minute_text_color' => $layout_class === 'ct-layout-1' ? '#1B1B50' : '#FFFFFF', + 'second_text_color' => $layout_class === 'ct-layout-1' ? '#1B1B50' : '#FFFFFF', + 'counter_border_color' => $layout_class === 'ct-layout-1' ? '#ECEDF0' : 'transparent', + 'counter_background_color' => $layout_class === 'ct-layout-1' ? '#FFFFFF' : 'transparent', + ), + $settings +); + +if ( $layout_class === 'ct-layout-1' ) { + $colon_color = $widget_style['counter_background_color'] !== '#FFFFFF' ? $widget_style['counter_background_color'] : '#1B1B50'; +} else { + $colon_color = $widget_style['counter_background_color'] !== 'transparent' ? $widget_style['counter_background_color'] : '#FFFFFF'; + $layout_class = $widget_style['counter_background_color'] === 'transparent' ? $layout_class : ''; +} ?>

;' + class='sgsb-countdown-timer-heading ' + style='color: ; font-family: ;' >

-
+
00 Days
;' + style='color: ;' + class="sgsb-colon " >: -
+
00 Hours
;' + style='color: ;' + class="sgsb-colon " >: -
+
00 Min
;' + style='color: ;' + class="sgsb-colon " >: -
+
00 Sec
diff --git a/Includes/Modules/DirectCheckout/Includes/EnqueueScript.php b/Includes/Modules/DirectCheckout/Includes/EnqueueScript.php index 155affa9..615505a3 100644 --- a/Includes/Modules/DirectCheckout/Includes/EnqueueScript.php +++ b/Includes/Modules/DirectCheckout/Includes/EnqueueScript.php @@ -194,6 +194,13 @@ private function dc_button_inline_styles() { '; } - wp_add_inline_style( 'sgsb-button-style', $custom_css ); + wp_add_inline_style( + 'sgsb-button-style', + apply_filters( + 'sgsb_direct_checkout_button_inline_styles', + $custom_css, + $settings + ) + ); } } diff --git a/Includes/Modules/DirectCheckout/assets/src/components/Design.js b/Includes/Modules/DirectCheckout/assets/src/components/Design.js index 012603be..d5cff8eb 100644 --- a/Includes/Modules/DirectCheckout/assets/src/components/Design.js +++ b/Includes/Modules/DirectCheckout/assets/src/components/Design.js @@ -6,6 +6,8 @@ import Number from "../../../../../../assets/src/components/settings/Panels/Pane import ColourPicker from "../../../../../../assets/src/components/settings/Panels/PanelSettings/Fields/ColorPicker"; import ActionsHandler from "sales-booster/src/components/settings/Panels/PanelSettings/ActionsHandler"; import { createDirectCheckoutForm } from "../helper"; +import Switcher from "sales-booster/src/components/settings/Panels/PanelSettings/Fields/Switcher"; +import { applyFilters } from "@wordpress/hooks"; function Design({ onFormSave, upgradeTeaser }) { const { setCreateFromData } = useDispatch("sgsb_direct_checkout"); @@ -33,57 +35,76 @@ function Design({ onFormSave, upgradeTeaser }) { return ( - - + { Boolean( createDirectCheckoutFormData.button_style ) && ( + + - + - + + + + + { applyFilters( + "sgsb_after_direct_checkout_button_design_settings", + "", + createDirectCheckoutFormData, + onFieldChange, + ) } + + ) } { + const buttonStyles = applyFilters( + "sgsb_direct_checkout_button_preview_styles", + { + color : storeData?.text_color, + height : 'fit-content', + padding : '10px 30px', + fontSize : storeData?.font_size, + fontWeight : '600', + borderColor : storeData?.button_color, + borderRadius : storeData?.button_border_radius, + backgroundColor : storeData?.button_color + }, + storeData + ); + return (
- diff --git a/Includes/Modules/DirectCheckout/assets/src/helper.js b/Includes/Modules/DirectCheckout/assets/src/helper.js index 20d09c8b..cc649144 100644 --- a/Includes/Modules/DirectCheckout/assets/src/helper.js +++ b/Includes/Modules/DirectCheckout/assets/src/helper.js @@ -1,14 +1,21 @@ import { __ } from '@wordpress/i18n'; export const createDirectCheckoutForm = { - buy_now_button_setting: __( 'cart-with-buy-now', 'storegrowth-sales-booster' ), - buy_now_button_label: __( 'Buy Now', 'storegrowth-sales-booster' ), - checkout_redirect: 'legacy-checkout', - shop_page_checkout_enable: true, - product_page_checkout_enable: true, - button_color: "#008dff", - text_color: "#ffffff", - font_size: 16, - button_border_radius: 5, - generated_link:"example", + font_size : 16, + text_color : "#ffffff", + font_family : "poppins", + button_style : true, + button_color : "#008dff", + border_color : "#008dff", + border_width : 1, + paddingXaxis : 20, + paddingYaxis : 10, + generated_link : "example", + checkout_redirect : 'legacy-checkout', + button_border_style : "solid", + button_border_radius : 5, + buy_now_button_label : __( 'Buy Now', 'storegrowth-sales-booster' ), + buy_now_button_setting : __( 'cart-with-buy-now', 'storegrowth-sales-booster' ), + shop_page_checkout_enable : true, + product_page_checkout_enable : true, }; diff --git a/Includes/Modules/FloatingNotificationBar/assets/src/components/DefaultBanner.js b/Includes/Modules/FloatingNotificationBar/assets/src/components/DefaultBanner.js index 9ea473fd..95d30564 100644 --- a/Includes/Modules/FloatingNotificationBar/assets/src/components/DefaultBanner.js +++ b/Includes/Modules/FloatingNotificationBar/assets/src/components/DefaultBanner.js @@ -104,8 +104,8 @@ function DefaultBanner(props) { selectedOptions={formData.button_view} handleCheckboxChange={onFieldChange} title={__("Show Button", "storegrowth-sales-booster")} - headColSpan={16} - checkboxColSpan={8} + headColSpan={14} + checkboxColSpan={10} /> { setPageLoading(true); @@ -67,7 +67,7 @@ function FlyCart( { navigate, useSearchParams , moduleId } ) { change(event, ui) { // Not sure why it is needed, But it is required to work properly.; const fieldName = event.target.name; - let fieldValue = ui.color.toString(); + let fieldValue = ui.color.toString(); updateFormData((prevFormData) => ({ ...prevFormData, @@ -121,7 +121,7 @@ function FlyCart( { navigate, useSearchParams , moduleId } ) { }; let tabColorPickerActivated = false; - let [ searchParams, setSearchParams ] = useSearchParams(); + let [searchParams, setSearchParams] = useSearchParams(); const onTabChange = (activeKey) => { if (activeKey != "1" && !tabColorPickerActivated) { tabColorPickerActivated = true; @@ -129,61 +129,65 @@ function FlyCart( { navigate, useSearchParams , moduleId } ) { } }; - const tabName = searchParams.get( 'tab_name' ); - const changeTab = ( key ) => { - navigate( "/fly-cart?tab_name=" + key ); + const tabName = searchParams.get("tab_name"); + const changeTab = (key) => { + navigate("/fly-cart?tab_name=" + key); }; const onFormReset = () => { - updateFormData( { ...quickCartState } ); - } + updateFormData({ ...quickCartState }); + }; const tabPanels = [ { - key: 'general', - title: __( 'General Setting', 'storegrowth-sales-booster' ), - panel: , + key: "general", + title: __("General Setting", "storegrowth-sales-booster"), + panel: ( + + ), }, { - key: 'design', - title: __( 'Design', 'storegrowth-sales-booster' ), - panel: onFormSave('design') } - onFieldChange={ onFieldChange } - buttonLoading={ buttonLoading } - onFormReset={onFormReset} - />, + key: "design", + title: __("Design", "storegrowth-sales-booster"), + panel: ( + onFormSave("design")} + onFieldChange={onFieldChange} + buttonLoading={buttonLoading} + onFormReset={onFormReset} + /> + ), }, ]; return ( - - + + {/* Render preview panel for responsive preview. */} - - + + diff --git a/Includes/Modules/FlyCart/assets/src/settings.js b/Includes/Modules/FlyCart/assets/src/settings.js index e915f3e6..ee7ce803 100644 --- a/Includes/Modules/FlyCart/assets/src/settings.js +++ b/Includes/Modules/FlyCart/assets/src/settings.js @@ -1,31 +1,41 @@ -import { addFilter } from '@wordpress/hooks'; -import FlyCart from './components'; -import { ShoppingCartOutlined } from '@ant-design/icons'; +import { addFilter } from "@wordpress/hooks"; +import FlyCart from "./components"; +import { ShoppingCartOutlined } from "@ant-design/icons"; /** * Add routes to sidebar. */ -addFilter( 'sgsb_routes', 'sgsb', (routes, outlet, navigate, useParams, useSearchParams) => { - const moduleName = 'fly-cart'; - routes.push( { - name: moduleName, - label:'Quick Cart', - path: "/fly-cart", - element: , - } ); +addFilter( + "sgsb_routes", + "sgsb", + (routes, outlet, navigate, useParams, useSearchParams) => { + const moduleName = "fly-cart"; + routes.push({ + name: moduleName, + label: "Fly Cart", + path: "/fly-cart", + element: ( + + ), + }); - return routes; -} ); + return routes; + } +); /** * Add sidebar menu items */ -addFilter( 'sidebar_menu_items', 'sgsb', (items, Link) => { - items.push( { - label: Quick Cart, - key: 'fly-cart', +addFilter("sidebar_menu_items", "sgsb", (items, Link) => { + items.push({ + label: Fly Cart, + key: "fly-cart", icon: , - } ); + }); return items; -} ); +}); diff --git a/Includes/Modules/ProgressiveDiscountBanner/Includes/EnqueueScript.php b/Includes/Modules/ProgressiveDiscountBanner/Includes/EnqueueScript.php index 7a0e9d3e..9117deac 100644 --- a/Includes/Modules/ProgressiveDiscountBanner/Includes/EnqueueScript.php +++ b/Includes/Modules/ProgressiveDiscountBanner/Includes/EnqueueScript.php @@ -81,6 +81,11 @@ public function admin_enqueue_scripts( $hook ) { $settings_file['version'], false ); + + // Pass the Cart URL to the JavaScript file + wp_localize_script('sgsb-pd-banner-settings', 'sgsbFsbData', array( + 'cartUrl' => wc_get_cart_url(), // WooCommerce Cart URL + )); } } diff --git a/Includes/Modules/ProgressiveDiscountBanner/ProgressiveDiscountBannerModule.php b/Includes/Modules/ProgressiveDiscountBanner/ProgressiveDiscountBannerModule.php index 3f13646d..0a9e6dac 100644 --- a/Includes/Modules/ProgressiveDiscountBanner/ProgressiveDiscountBannerModule.php +++ b/Includes/Modules/ProgressiveDiscountBanner/ProgressiveDiscountBannerModule.php @@ -55,7 +55,7 @@ public function get_banner() { * @return string */ public function get_name() { - return 'Free Shipping Bar'; + return 'Free Shipping Rules'; } /** diff --git a/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/DesignTab.js b/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/DesignTab.js index 1dd88277..7de427a1 100644 --- a/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/DesignTab.js +++ b/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/DesignTab.js @@ -11,6 +11,7 @@ import Templates from './Templates'; function DesignTab(props) { const { + isValid, formData, setFormData, onFieldChange, @@ -18,6 +19,8 @@ function DesignTab(props) { buttonLoading, fontFamily, onFormReset, + undoHandler, + showUndoIcon } = props; return ( @@ -50,41 +53,75 @@ function DesignTab(props) { ) } + { Boolean( formData.btn_style ) && ( + + + + + ) } - + ); diff --git a/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/DiscountBanner.js b/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/DiscountBanner.js index 0b927e78..d4acbf9b 100644 --- a/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/DiscountBanner.js +++ b/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/DiscountBanner.js @@ -1,5 +1,6 @@ import { Fragment } from "react"; import { __ } from "@wordpress/i18n"; +import { useState } from "@wordpress/element"; import { applyFilters } from '@wordpress/hooks'; import SelectBox from "../../../../../../assets/src/components/settings/Panels/PanelSettings/Fields/SelectBox"; import Number from "../../../../../../assets/src/components/settings/Panels/PanelSettings/Fields/Number"; @@ -7,9 +8,11 @@ import TextAreaBox from "../../../../../../assets/src/components/settings/Panels import SettingsSection from "../../../../../../assets/src/components/settings/Panels/PanelSettings/SettingsSection"; import BarIcon from "./BarIcon"; import SettingInstruction from "./SettingInstruction"; +import Switcher from "sales-booster/src/components/settings/Panels/PanelSettings/Fields/Switcher"; +import TextInput from "sales-booster/src/components/settings/Panels/PanelSettings/Fields/TextInput"; function DiscountBanner(props) { - const { formData, setFormData, onFieldChange } = props; + const { isValid, formData, setFormData, setShowUndo, onFieldChange } = props; const barTypes = [ { @@ -57,13 +60,13 @@ function DiscountBanner(props) { { key: iconStyleName, value: } ) ); - const onBarChange = ( key, value ) => { setFormData( { ...formData, [ key ]: value, progressive_banner_custom_icon : '', } ); + setShowUndo( true ); }; return ( @@ -180,6 +183,50 @@ function DiscountBanner(props) { "storegrowth-sales-booster" )} /> + + + + { Boolean( formData.btn_style ) && ( + + + + + ) } { applyFilters( diff --git a/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/FreeShippingBarLayout.js b/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/FreeShippingBarLayout.js index ec5c1ec4..3dc6b04b 100644 --- a/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/FreeShippingBarLayout.js +++ b/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/FreeShippingBarLayout.js @@ -1,9 +1,6 @@ import { notification } from "antd"; import { __ } from "@wordpress/i18n"; -import { - useEffect, - useState, -} from "@wordpress/element"; +import { useEffect, useState } from "@wordpress/element"; import { useDispatch } from "@wordpress/data"; import { Fragment } from "react"; import SettingsTab from "./SettingsTab"; @@ -17,24 +14,34 @@ import PanelPreview from "../../../../../../assets/src/components/settings/Panel import PanelSettings from "../../../../../../assets/src/components/settings/Panels/PanelSettings"; import TouchPreview from "sales-booster/src/components/settings/Panels/TouchPreview"; -function FreeShippingBarLayout({ outlet: Outlet, navigate, useSearchParams , moduleId}) { +function FreeShippingBarLayout({ + outlet: Outlet, + navigate, + useSearchParams, + moduleId, +}) { const { setPageLoading } = useDispatch("sgsb"); const [buttonLoading, setButtonLoading] = useState(false); let [searchParams, setSearchParams] = useSearchParams("general"); const tabName = searchParams.get("tab_name") || "general"; const initialShipData = { + btn_text : 'Cart', bar_type : "normal", user_type : "both", font_size : 20, + btn_style : true, + btn_color : "#ffffff", text_color : "#ffffff", icon_color : "#ffffff", + btn_target : sgsbFsbData?.cartUrl, font_family : "poppins", banner_delay : 7, bar_position : "top", bar_template : 'shipping_bar_one', discount_type : "free-shipping", banner_height : 60, + btn_text_color : "#073b4c", banner_trigger : "after-few-seconds", close_icon_color : "#ffffff", background_color : "#0875FF", @@ -55,6 +62,7 @@ function FreeShippingBarLayout({ outlet: Outlet, navigate, useSearchParams , mod const onFormReset = () => { setFormData({ ...initialShipData }); + setShowUndo( false ); }; const fontFamily = [ @@ -97,6 +105,7 @@ function FreeShippingBarLayout({ outlet: Outlet, navigate, useSearchParams , mod .success((response) => { if (response.success && response.data) { setFormData({ ...formData, ...response.data }); + setUndoData({ ...undoData, ...response.data }); setTimeout(() => setPageLoading(false), 500); } }); @@ -106,12 +115,68 @@ function FreeShippingBarLayout({ outlet: Outlet, navigate, useSearchParams , mod getSettings(); }, []); + const [ isValidUrl, setIsValidUrl ] = useState( true ); + + const validateURL = ( input ) => { + const pattern = new RegExp('^(https?:\\/\\/)?'+ // protocol + '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|'+ // domain name + '((\\d{1,3}\\.){3}\\d{1,3}))'+ // OR ip (v4) address + '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*'+ // port and path + '(\\?[;&a-z\\d%_.~+=-]*)?'+ // query string + '(\\#[-a-z\\d_]*)?$','i'); // fragment locator + return !!pattern.test( input ); + }; + + const [showUndo, setShowUndo] = useState({ + btn_color : false, + text_color : false, + icon_color : false, + btn_text_color : false, + close_icon_color : false, + background_color : false, + }); + + const [undoData, setUndoData] = useState({ + ...initialShipData, + }); + + const colorKeyStack = [ + 'btn_color', + 'text_color', + 'icon_color', + 'btn_text_color', + 'close_icon_color', + 'background_color' + ]; + const onFieldChange = (key, value) => { + if ( key === 'btn_target' ) { + setIsValidUrl( validateURL( value ) ); + } + setFormData({ ...formData, [key]: value, }); + + if ( colorKeyStack?.includes( key ) ) { + setShowUndo({ ...showUndo, [key]: true }); + } + }; + + const onUndoClick = ( key ) => { + if ( colorKeyStack?.includes( key ) ) { + setShowUndo({ + ...showUndo, + [key]: false, + }); + setFormData({ + ...formData, + [key]: undoData?.[key], + }); + } }; + const changeTab = (key) => { navigate("/progressive-discount-banner?tab_name=" + key); }; @@ -148,8 +213,10 @@ function FreeShippingBarLayout({ outlet: Outlet, navigate, useSearchParams , mod data, }) .success(() => { + setShowUndo(false); setButtonLoading(false); notificationMessage(type); + setUndoData({ ...formData }); }); }; @@ -160,7 +227,9 @@ function FreeShippingBarLayout({ outlet: Outlet, navigate, useSearchParams , mod panel: ( onFormSave("banner_settings")} buttonLoading={buttonLoading} @@ -173,7 +242,10 @@ function FreeShippingBarLayout({ outlet: Outlet, navigate, useSearchParams , mod title: __("Design", "storegrowth-sales-booster"), panel: ( onFormSave("design")} @@ -189,26 +261,36 @@ function FreeShippingBarLayout({ outlet: Outlet, navigate, useSearchParams , mod return ( {showPreview && tabName && ( - + )} {/* Render preview panel for responsive preview. */} - - + + diff --git a/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/Preview.js b/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/Preview.js index b69fd311..9e57907f 100644 --- a/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/Preview.js +++ b/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/Preview.js @@ -1,6 +1,7 @@ import React from 'react'; import BarIcon from "./BarIcon"; import {__} from "@wordpress/i18n"; +import {extractedTitle} from "sales-booster/src/utils/helper"; const Preview = ( { isProActive, formData, fontFamily } ) => { const bannerStyle = { @@ -59,8 +60,24 @@ const Preview = ( { isProActive, formData, fontFamily } ) => { fontSize: formData.font_size, }} > - {dynamicText} + { Boolean( formData.btn_style ) ? extractedTitle( dynamicText, 19 ) : dynamicText } + { Boolean( formData.btn_style ) && ( + + { extractedTitle( formData?.btn_text, 15 ) } + + ) }
{ }} onClick={() => window.open( - "https://storegrowth.io/docs/free-shipping-bar/", + "https://storegrowth.io/docs/free-shipping-bar-setting/", "_blank" ) } > - Documentaion + Documentation
diff --git a/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/SettingsTab.js b/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/SettingsTab.js index 3f71d143..3b3ededb 100644 --- a/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/SettingsTab.js +++ b/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/SettingsTab.js @@ -6,19 +6,23 @@ import {Fragment} from "react"; function SettingsTab(props) { const { + isValid, formData, setFormData, onFieldChange, onFormSave, buttonLoading, - onFormReset + onFormReset, + setShowUndo } = props; return ( @@ -26,7 +30,7 @@ function SettingsTab(props) {

Note: Please clear your cart in order to see the updates when you update diff --git a/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/Templates.js b/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/Templates.js index 082cc2bb..fb2c6fd2 100644 --- a/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/Templates.js +++ b/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/Templates.js @@ -6,7 +6,7 @@ import ShippingBarOne from "./Templates/ShippingBarOne"; import {applyFilters} from "@wordpress/hooks"; import RadioTemplate from "sales-booster/src/components/settings/Panels/PanelSettings/Fields/RadioTemplate"; -const Templates = ( { formData, setFormData } ) => { +const Templates = ( { formData, setFormData, showUndoIcon } ) => { let templates = [ { key: 'shipping_bar_one', component: }, ]; @@ -19,12 +19,17 @@ const Templates = ( { formData, setFormData } ) => { let templateStyles = { shipping_bar_one: { + btn_text : __( 'Cart', 'storegrowth-sales-booster' ), font_size : 20, + btn_style : true, + btn_color : "#ffffff", text_color : "#ffffff", icon_color : "#ffffff", + btn_target : sgsbFsbData?.cartUrl, font_family : "poppins", bar_template : 'shipping_bar_one', banner_height : 60, + btn_text_color : "#073b4c", close_icon_color : "#ffffff", background_color : "#0875FF", cart_minimum_amount : 10, @@ -41,6 +46,10 @@ const Templates = ( { formData, setFormData } ) => { ); const onTemplateChange = ( name, value ) => { + for ( let key in showUndoIcon ) { + showUndoIcon[key] = false; + } + setFormData( { ...formData, ...templateStyles?.[ value ] diff --git a/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/Templates/ShippingBarOne.js b/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/Templates/ShippingBarOne.js index 6c241896..47b8d797 100644 --- a/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/Templates/ShippingBarOne.js +++ b/Includes/Modules/ProgressiveDiscountBanner/assets/src/components/Templates/ShippingBarOne.js @@ -1,5 +1,6 @@ import React from "react"; import { __ } from "@wordpress/i18n"; +import { extractedTitle } from "sales-booster/src/utils/helper"; const ShippingBarOne = () => { return ( @@ -73,9 +74,23 @@ const ShippingBarOne = () => { position : 'relative', }} > - { __( 'Add more $10 to get FREE SHIPPING.', 'storegrowth-sales-booster' ) } + { __( 'Add more $10 to get...', 'storegrowth-sales-booster' ) }

+ + { __( 'Cart', 'storegrowth-sales-booster' ) } + ), }); return routes; - } + }, ); /** diff --git a/Includes/Modules/ProgressiveDiscountBanner/templates/bar.php b/Includes/Modules/ProgressiveDiscountBanner/templates/bar.php index 9c908002..976aab94 100644 --- a/Includes/Modules/ProgressiveDiscountBanner/templates/bar.php +++ b/Includes/Modules/ProgressiveDiscountBanner/templates/bar.php @@ -7,9 +7,14 @@ use STOREGROWTH\SPSB\Modules\ProgressiveDiscountBanner\Includes\Helper; -$settings = Helper::sgsb_pd_banner_get_settings(); -$banner_text = Helper::sgsb_pd_banner_get_banner_text( $settings ); -$banner_icon = Helper::sgsb_pd_banner_get_banner_icon( $settings ); +$settings = Helper::sgsb_pd_banner_get_settings(); +$banner_text = Helper::sgsb_pd_banner_get_banner_text( $settings ); +$banner_icon = Helper::sgsb_pd_banner_get_banner_icon( $settings ); +$button_style = sgsb_find_option_setting( $settings, 'btn_style', true ); +$button_bg = sgsb_find_option_setting( $settings, 'btn_color', '#fff' ); +$button_text = sgsb_find_option_setting( $settings, 'btn_text', __( 'Cart', 'storegrowth-sales-booster' ) ); +$redirect_url = sgsb_find_option_setting( $settings, 'btn_target', wc_get_cart_url() ); +$button_text_color = sgsb_find_option_setting( $settings, 'btn_text_color', '#073b4c' ); ?>
@@ -59,16 +64,24 @@
- +
+ + /** + * Banner text filter. + * + * @since 1.0.0 + */ + echo wp_kses_post( apply_filters( 'sales_boster_pd_banner_text', $banner_text ) ); + ?> + + + + + +
diff --git a/Includes/Modules/SalesPop/assets/js/popup-custom.js b/Includes/Modules/SalesPop/assets/js/popup-custom.js index da18b776..e5ee47e9 100644 --- a/Includes/Modules/SalesPop/assets/js/popup-custom.js +++ b/Includes/Modules/SalesPop/assets/js/popup-custom.js @@ -8,8 +8,8 @@ var notification_per_page = popup_all_properties.notification_per_page; var mobile_view = popup_all_properties.mobile_view; var product_random = popup_all_properties.product_random; - var link_new_tab = popup_all_properties.open_product_link_in_new_tab - + var link_new_tab = popup_all_properties.open_product_link_in_new_tab; + var visibility_behaviour = popup_all_properties.enble_visibility; var notification_count = 0; message_popup = message_popup?message_popup:'please prepare you message'; @@ -138,9 +138,13 @@ } - $( ".custom-close").click( function() { - $(".custom-social-proof").stop().slideToggle('slow'); - } ); + $(".custom-close").click(function() { + if (visibility_behaviour) { + $(".custom-social-proof").remove(); + } else { + $(".custom-social-proof").stop().slideToggle('slow'); + } + }); function handlePopupVisibility() { var windowWidth = $(window).width(); diff --git a/Includes/Modules/SalesPop/assets/src/components/General.js b/Includes/Modules/SalesPop/assets/src/components/General.js index 8414eca8..a44a5275 100644 --- a/Includes/Modules/SalesPop/assets/src/components/General.js +++ b/Includes/Modules/SalesPop/assets/src/components/General.js @@ -38,7 +38,14 @@ function General( { onFormSave } ) { isEnable={ (createPopupFormData.enable == 'true' || createPopupFormData.enable == true) ? true : false } tooltip={ __( 'By enabling the sales pop will show in the store.', 'storegrowth-sales-booster' ) } /> - + {/* Rendered all necessary sales pop settings after popup enable settings. */} { applyFilters( 'sgsb_after_sales_pop_enable_settings', diff --git a/Includes/Modules/SalesPop/assets/src/helper.js b/Includes/Modules/SalesPop/assets/src/helper.js index 2a9abfc6..d07a6f1f 100644 --- a/Includes/Modules/SalesPop/assets/src/helper.js +++ b/Includes/Modules/SalesPop/assets/src/helper.js @@ -44,6 +44,7 @@ export const createPopupForm = { ...message, loop : false, enabe : false, + enble_visibility : false, sound : false, address : ['real'], template : 4, diff --git a/Includes/Modules/SalesPop/assets/src/settings.js b/Includes/Modules/SalesPop/assets/src/settings.js index 90dd53c9..834acf87 100644 --- a/Includes/Modules/SalesPop/assets/src/settings.js +++ b/Includes/Modules/SalesPop/assets/src/settings.js @@ -19,7 +19,7 @@ addFilter( routes.push({ name: moduleName, path: "/sales-pop", - label: "Sales Pop", + label: "Sales Notification", exact: true, element: ( + + { Boolean( formData.show_stock_status ) && applyFilters( + 'sgsb_append_after_stock_status_settings', + '', + formData, + onFieldChange + ) } { - return ( -
-
- { formData?.stock_display_format === 'above' ? ( - -
- - { formData?.total_sell_count_text }: - - { __( ' 247', 'storegrowth-sales-booster' ) } - - - - { formData?.available_item_count_text }: - - { __( ' 123', 'storegrowth-sales-booster' ) } - - -
-
-
-
-
- ) : ( - -
-
-
-
- - { formData?.total_sell_count_text }: - - { __( ' 247', 'storegrowth-sales-booster' ) } - - - - { formData?.available_item_count_text }: - - { __( ' 123', 'storegrowth-sales-booster' ) } - - -
-
- ) } -
-
- ); + return ( +
+
+ { formData?.stock_display_format === 'above' ? ( + +
+ + { formData?.total_sell_count_text }: + + { __( ' 247', 'storegrowth-sales-booster' ) } + + + + { formData?.available_item_count_text }: + + { __( ' 123', 'storegrowth-sales-booster' ) } + + +
+
+
+
+
+ ) : ( + +
+
+
+
+ + { formData?.total_sell_count_text }: + + { __( ' 247', 'storegrowth-sales-booster' ) } + + + + { formData?.available_item_count_text }: + + { __( ' 123', 'storegrowth-sales-booster' ) } + + +
+
+ ) } + + { Boolean( formData.show_stock_status ) && applyFilters( + 'sgsb_before_stock_bar_preview_end', + '', + formData, + ) } +
+
+ ); }; export default Preview; diff --git a/Includes/Modules/StockBar/assets/src/components/StockBarLayout.js b/Includes/Modules/StockBar/assets/src/components/StockBarLayout.js index 2dc7cfa6..d6642b05 100644 --- a/Includes/Modules/StockBar/assets/src/components/StockBarLayout.js +++ b/Includes/Modules/StockBar/assets/src/components/StockBarLayout.js @@ -23,12 +23,16 @@ function StockBarLayout({ navigate, useSearchParams ,moduleId}) { const initalStockBarData = { stockbar_height : 10, + show_stock_status : true, + stock_status_text : __( 'Hurry! only {quantity} stocks left.', 'storegrowth-sales-booster' ), + status_text_color : '#073B4C', stockbar_bg_color : "#EBF6FF", stockbar_fg_color : "#008DFF", stockbar_template : 'stock_bar_one', stock_display_format : 'above', stockbar_border_color : '#DDE6F9', total_sell_count_text : __( 'Total Sold', 'storegrowth-sales-booster' ), + status_quantity_required : 10, available_item_count_text : __( 'Available Item', 'storegrowth-sales-booster' ), shop_page_stock_bar_enable : false, shop_page_countdown_enable : false, diff --git a/Includes/Modules/StockBar/assets/src/components/Templates/StockBarOne.js b/Includes/Modules/StockBar/assets/src/components/Templates/StockBarOne.js index 31def11e..2e5864f9 100644 --- a/Includes/Modules/StockBar/assets/src/components/Templates/StockBarOne.js +++ b/Includes/Modules/StockBar/assets/src/components/Templates/StockBarOne.js @@ -1,4 +1,5 @@ import { __ } from '@wordpress/i18n'; +import {applyFilters} from "@wordpress/hooks"; const StockBarOne = ( { activeTemplate } ) => { return ( @@ -70,6 +71,8 @@ const StockBarOne = ( { activeTemplate } ) => { } } >
+ + { applyFilters( 'sgsb_before_stock_bar_preview_template_end', '' ) }
); diff --git a/Includes/Modules/StockBar/assets/src/components/Templates/StockBarThree.js b/Includes/Modules/StockBar/assets/src/components/Templates/StockBarThree.js index b6e2f0d7..97e089f4 100644 --- a/Includes/Modules/StockBar/assets/src/components/Templates/StockBarThree.js +++ b/Includes/Modules/StockBar/assets/src/components/Templates/StockBarThree.js @@ -1,4 +1,5 @@ import { __ } from "@wordpress/i18n"; +import {applyFilters} from "@wordpress/hooks"; const StockBarThree = ( { activeTemplate } ) => { return ( @@ -72,6 +73,8 @@ const StockBarThree = ( { activeTemplate } ) => { } } >
+ + { applyFilters( 'sgsb_before_stock_bar_preview_template_end', '' ) } ); diff --git a/Includes/Modules/StockBar/assets/src/components/Templates/StockBarTwo.js b/Includes/Modules/StockBar/assets/src/components/Templates/StockBarTwo.js index 6aa74880..99804042 100644 --- a/Includes/Modules/StockBar/assets/src/components/Templates/StockBarTwo.js +++ b/Includes/Modules/StockBar/assets/src/components/Templates/StockBarTwo.js @@ -1,4 +1,5 @@ import { __ } from "@wordpress/i18n"; +import {applyFilters} from "@wordpress/hooks"; const StockBarTwo = ( { activeTemplate } ) => { return ( @@ -70,6 +71,8 @@ const StockBarTwo = ( { activeTemplate } ) => { } } > + + { applyFilters( 'sgsb_before_stock_bar_preview_template_end', '' ) } ); diff --git a/Includes/Modules/StockBar/assets/src/components/Templates/index.js b/Includes/Modules/StockBar/assets/src/components/Templates/index.js index de04841b..a2a0b360 100644 --- a/Includes/Modules/StockBar/assets/src/components/Templates/index.js +++ b/Includes/Modules/StockBar/assets/src/components/Templates/index.js @@ -25,9 +25,13 @@ const Templates = ( { stockbar_bg_color : "#EBF6FF", stockbar_fg_color : "#008DFF", stockbar_template : 'stock_bar_one', + show_stock_status : true, + stock_status_text : __( 'Hurry! only {quantity} stocks left.', 'storegrowth-sales-booster' ), + status_text_color : '#073B4C', stock_display_format : 'above', stockbar_border_color : '#DDE6F9', total_sell_count_text : __( 'Total Sold', 'storegrowth-sales-booster' ), + status_quantity_required : 10, available_item_count_text : __( 'Available Item', 'storegrowth-sales-booster' ), }, stock_bar_two: { @@ -35,9 +39,13 @@ const Templates = ( { stockbar_bg_color : "#E6F8F1", stockbar_fg_color : "#02AC6E", stockbar_template : 'stock_bar_two', + show_stock_status : true, + stock_status_text : __( 'Hurry! only {quantity} stocks left.', 'storegrowth-sales-booster' ), + status_text_color : '#073B4C', stock_display_format : 'above', stockbar_border_color : '#BDE5D7', total_sell_count_text : __( 'Total Sold', 'storegrowth-sales-booster' ), + status_quantity_required : 10, available_item_count_text : __( 'Available Item', 'storegrowth-sales-booster' ), }, stock_bar_three: { @@ -45,9 +53,13 @@ const Templates = ( { stockbar_bg_color : "#EFF0F8", stockbar_fg_color : "linear-gradient(90deg, #AF89FF 0%, #0283AC 100%)", stockbar_template : 'stock_bar_three', + show_stock_status : true, + stock_status_text : __( 'Hurry! only {quantity} stocks left.', 'storegrowth-sales-booster' ), + status_text_color : '#073B4C', stock_display_format : 'above', stockbar_border_color : '#ae89ff33', total_sell_count_text : __( 'Total Sold', 'storegrowth-sales-booster' ), + status_quantity_required : 10, available_item_count_text : __( 'Available Item', 'storegrowth-sales-booster' ), }, }; diff --git a/Includes/Modules/StockBar/templates/simple-stock-status.php b/Includes/Modules/StockBar/templates/simple-stock-status.php index d40216f7..ac995005 100644 --- a/Includes/Modules/StockBar/templates/simple-stock-status.php +++ b/Includes/Modules/StockBar/templates/simple-stock-status.php @@ -27,6 +27,19 @@ $total_sell_text = sgsb_find_option_setting( $settings, 'total_sell_count_text', 'Total Sold' ); $available_item_text = sgsb_find_option_setting( $settings, 'available_item_count_text', 'Available Item' ); +// Vars for threshold warning msg. +$show_stock_status = sgsb_find_option_setting( $settings, 'show_stock_status', true ); +$stock_contents = apply_filters( + 'sgsb_stock_bar_warning_contents', + array( + 'quantity_required' => 10, + 'status_text_color' => '#073B4C', + 'stock_status_text' => __( "Hurry! only {$stock} stocks left.", 'storegrowth-sales-booster' ) + ), + $settings, + $stock +); + ?>
@@ -61,5 +74,14 @@ class="sgsb-stock-progress-bar-section wpbsc_total_sale sgsb-stock-stock-bar-for do_action( 'sgsb_stock_bar_stock_below' ); endif; ?> + + +

; margin: 0; font-size: 14px;' + > + +

+
diff --git a/Includes/Modules/UpsellOrderBump/Includes/OrderBump.php b/Includes/Modules/UpsellOrderBump/Includes/OrderBump.php index 844c570e..549fc74d 100644 --- a/Includes/Modules/UpsellOrderBump/Includes/OrderBump.php +++ b/Includes/Modules/UpsellOrderBump/Includes/OrderBump.php @@ -43,7 +43,6 @@ public function bump_product_frontend_view() { 'posts_per_page' => -1, ); $bump_list = get_posts( $args_bump ); - $showed_bump_product_id = array(); foreach ( $all_cart_products as $value ) { $cat_ids = $value['data']->get_category_ids(); @@ -91,29 +90,19 @@ public function bump_product_frontend_view() { // don't show the offer if the 'offer product' is already added in the cart from the shop page with regular price. continue; } - if ( - $bump_info->target_products - && - count( $all_cart_product_ids ) !== count( array_diff( $all_cart_product_ids, $bump_info->target_products ) ) - && - ! in_array( $offer_product_id, $showed_bump_product_id, true ) - ) { - include __DIR__ . '/../templates/bump-product-front-view.php'; - - $showed_bump_product_id[] = $offer_product_id; - } - - if ( - isset( $bump_info->target_categories ) - && count( $all_cart_category_ids ) !== count( array_diff( $all_cart_category_ids, $bump_info->target_categories ) ) - && ! in_array( $offer_product_id, $showed_bump_product_id, true ) - ) { - - include __DIR__ . '/../templates/bump-product-front-view.php'; - - $showed_bump_product_id[] = $offer_product_id; - } + $bump_type = ! empty( $bump_info->bump_type ) ? esc_html( $bump_info->bump_type ) : 'products'; + if ( $bump_type === 'products' ) { + $target_products = ! empty( $bump_info->target_products ) ? wc_clean( $bump_info->target_products ) : array(); + if ( $target_products && ( count( $all_cart_product_ids ) !== count( array_diff( $all_cart_product_ids, $target_products ) ) ) ) { + include __DIR__ . '/../templates/bump-product-front-view.php'; + } + } else { + $target_categories = ! empty( $bump_info->target_categories ) ? wc_clean( $bump_info->target_categories ) : array(); + if ( $target_categories && ( count( $all_cart_category_ids ) !== count( array_diff( $all_cart_category_ids, $target_categories ) ) ) ) { + include __DIR__ . '/../templates/bump-product-front-view.php'; + } + } } } diff --git a/Includes/Modules/UpsellOrderBump/assets/src/components/BasicInfo.js b/Includes/Modules/UpsellOrderBump/assets/src/components/BasicInfo.js index 252436ce..46fc6fde 100644 --- a/Includes/Modules/UpsellOrderBump/assets/src/components/BasicInfo.js +++ b/Includes/Modules/UpsellOrderBump/assets/src/components/BasicInfo.js @@ -11,6 +11,7 @@ import MultiSelectBox from "sales-booster/src/components/settings/Panels/PanelSe import SectionHeader from "sales-booster/src/components/settings/Panels/SectionHeader"; import SelectBox from "sales-booster/src/components/settings/Panels/PanelSettings/Fields/SelectBox"; import OfferField from "./OfferField"; +import TextRadioBox from "sales-booster/src/components/settings/Panels/PanelSettings/Fields/TextRadioBox"; const BasicInfo = ({ clearErrors }) => { @@ -108,6 +109,11 @@ const BasicInfo = ({ clearErrors }) => { } }; + const orderBumpDeal = [ + { key: 'products', value: __('Products', 'storegrowth-sales-booster') }, + { key: 'categories', value: __('Categories', 'storegrowth-sales-booster') }, + ]; + return ( @@ -122,36 +128,48 @@ const BasicInfo = ({ clearErrors }) => { "storegrowth-sales-booster" )} /> - - + {createBumpData?.bump_type !== "categories" ? ( + + ) : ( + + )} - {productList && ( +function TargetProductAndCategory({ type, catList, productList }) { + return ( + + {type === 'products' && productList && (
{__("Target Products", "storegrowth-sales-booster")}
@@ -136,7 +136,7 @@ function TargetProductAndCategory({ catList, productList }) {
)} - {catList && ( + {type === 'categories' && catList && (
{__("Target Categories", "storegrowth-sales-booster")}
@@ -146,7 +146,7 @@ function TargetProductAndCategory({ catList, productList }) {
)} - + ); } @@ -186,7 +186,7 @@ function OrderBumpList({ navigate }) { align: "left", }, { - title: "Target Product(s) and Categories", + title: "Target Product(s) or Categories", dataIndex: "product_category", }, { @@ -230,10 +230,10 @@ function OrderBumpList({ navigate }) { key: item, name: item.name_of_order_bump, product_category: ( - + ), offers: , - action: , + action: , }; } diff --git a/Includes/Modules/UpsellOrderBump/assets/src/helper.js b/Includes/Modules/UpsellOrderBump/assets/src/helper.js index 652c42da..d2fccb17 100644 --- a/Includes/Modules/UpsellOrderBump/assets/src/helper.js +++ b/Includes/Modules/UpsellOrderBump/assets/src/helper.js @@ -65,6 +65,7 @@ export const createBumpForm = { smart_offer: false, offer_product: '', offer_type: [], + bump_type: 'products', offer_amount: '', box_border_style: 'solid', box_border_color: '#32DBBE', diff --git a/README.txt b/README.txt index bb638561..2175c42a 100644 --- a/README.txt +++ b/README.txt @@ -1,97 +1,153 @@ -=== StoreGrowth - Smart Direct Checkout, Fly Cart / Floating Cart, Live Sales Notifications, Floating Notification Bar and more | Best Sales Booster for WooCommerce === +=== StoreGrowth — Best WooCommerce Marketing Solution — Fly Cart, Direct Checkout, Sales Countdown Timer, Floating Notification Bar, Live Sales Notifications, Upsell Order Bump & More to boost sales === Contributors: mehedi_csit, invizo -Tags: floating cart, notification bar, add to cart, Buy now button, woocommerce direct checkout, woocommerce ajax cart, cart popup, sales notification, social proof, fomo, woocommerce notification, Side cart, fly cart, upsell order bump, free shipping bar, stock count progress bar, sales countdown timer. +Tags: floating cart, fly cart, side cart, checkout optimization, notification bar, add to cart, Buy now button, woocommerce direct checkout, woocommerce ajax cart, cart popup, sales notification, social proof, fomo, woocommerce notification, Side cart, fly cart, upsell order bump, free shipping bar, stock count progress bar, sales countdown timer. Requires at least: 5.4 Tested up to: 6.4.1 -Stable tag: 1.1.3 +Stable tag: 1.24.4 Requires PHP: 7.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html -Best WooCommerce Direct Checkout, Fly Cart and Side Cart, Live Sales Notifications, Floating Notification Bar and More Essential Features for Every WooCommerce Site! +Boost Your Sales and Conversion with Sales Countdown Timer, Floating Notification Bar, Side Cart, Fly Cart, Live Sales Notifications, Upsell Order Bump, and many more. == Description == -= Boost Sales with WooCommerce Direct Checkout, Fly Cart and Side Cart, Live Sales Notifications, Floating Notification Bar and More Essential Features for Every WooCommerce Site! = += Create a highly converting checkout experience with Fly Cart, Upsell Order Bump, Sales Countdown Timer, Floating Notification Bar, Side Cart, Popup Cart and, Live Sales Notifications to generate more sales and revenue. = -The [StoreGrowth](https://storegrowth.io/pricing/) plugin is an all-in-one bundle for WooCommerce, offering more than eight modules to enhance sales funnels. It addresses the difficulty of installing multiple plugins by reducing the burden and improving website performance. Compatible with various WordPress themes, it allows full control over design and customization, including a real-time preview of changes. This plugin is designed to attract and encourage visitors to purchase, increasing sales and creating a positive impact on your business. +Are you tired of poor conversion and slow sales? Looking for an effective way to promote your WooCommerce deals and discounts? + +Using multiple tools to create scarcity, order bump, and seamless checkout in your WooCommerce store? + +You don’t need to do it anymore. + +We created StoreGrowth to make it easier for busy store owners like you to increase WooCommerce conversions with just a few minutes of effort. Ensure a smooth shopping journey and increase your average order value with Fly Cart, Upsell Order Bump, Sales Countdown Timer, Floating Notification Bar, Free Shipping Bar, Direct Checkout and many more. + +This plugin is super user-friendly, compatible with popular WordPress themes, gives you full customization control, and reduces the hassle of using different tools to boost WooCommerce sales. [youtube https://youtu.be/q9gWD7iUHX0?si=3C8l7l6o_JFfymg2] [Documentation](https://storegrowth.io/documentation/) [Upgrade to pro](https://storegrowth.io/pricing/) -== MODULES == +== Why Use StoreGrowth? == + +Online shoppers love deals and promotions. The WooCommerce checkout is not convincing enough for buyers to take action. + +As a store owner, you can not just sit relax, and hope to make sales. You need to apply different tactics so you can compel your targeted buyers to make the purchasing decision. + +And, what’s better than creating urgency and scarcity when it comes to boosting sales? You can use one plugin for a countdown timer, one plugin for a targeted floating notification bar, and yet another plugin for offering upsells and order bumps. + +What if you could get everything for your WooCommerce marketing needs in a single plugin? + +That’s the purpose of StoreGrowth, to maximize your WooCommerce store potential. + +From the Sales Countdown Timer that creates urgency to the Floating Notification Bar that keeps customers informed, and the Free Shipping Bar that encourages higher cart values – each element is crafted to enhance your store's conversion rates. + +With Direct Checkout, Quick Cart, Upsell Order Bump, and more, StoreGrowth streamlines the buying journey of your visitors while influencing them to purchase. + +It is designed in a way that requires zero technical skills and minimal feature setup time so that you can focus less on different tools and more on growing your business. + +Whether you’re a new or experienced WooCommerce store owner, this plugin is what you need to engage your visitors and boost conversion instantly. + + + +Everything You Need To Supercharge Your WooCommerce Store + +StoreGrowth has all the powerful features that you need to increase sales and average order value with the highest converting checkout. + +**Fly Cart:** + +Navigating and managing items within the cart can be a tiring process for online shoppers, often leading to a less-than-optimal user experience. + +To enhance the shopping experience of buyers, the quick cart feature is designed. It combines the functionality of both the floating cart and the side cart. + +This feature creates a side cart in your WooCommerce store, providing shoppers with a user-friendly interface to effortlessly manage their items, enjoy real-time updates, and proceed to a one-click checkout. + +✅ Real-Time Subtotal Updates: Keep customers informed with an instant floating cart. +✅ Seamless Item Management: Effortlessly add or remove items for a hassle-free shopping experience. +✅ One-Click Checkout: Simplify the checkout process with a one-click option. +✅ Design Flexibility: Customize the design and cart details to align with your brand seamlessly. + +With StoreGrowth's Quick Cart feature, you're not just enhancing cart functionality; you're transforming the shopping journey into a streamlined and enjoyable experience. + +**Sales Countdown Timer:** + +When you are running a sales campaign or providing time-sensitive offers, capturing customer attention, and creating a sense of urgency to drive purchases is a real struggle. + +A sales countdown timer is the best way to remind them of limited-time offers and motivate immediate action before the deal disappears. It creates buzz and excitement around your campaigns, attracting more visitors and boosting engagement. + +StoreGrowth allows you to create visually appealing and functional WooCommerce countdown timers. You get total flexibility on the customization of the sales countdown timer. + +✅Design customization options for heading, border, background, and timer. +✅Ready-made countdown timer templates. +✅Flexibility to select specific products for display. +✅Create multiple countdown timers and display them with shortcodes. + + +**WooCommerce Direct Checkout:** + +This feature is designed to get rid of abandoned carts and lengthy checkout flows in your WooCommerce store. -= WooCommerce Direct Checkout -= WooCommerce Fly Cart and Side Cart -= WooCommerce Live Sales Notification -= WooCommerce Floating Notification Bar -= WooCommerce Upsell Order Bump -= WooCommerce Sales Countdown Timer -= WooCommerce Stock Countdown Progress Bar -= WooCommerce Free Shipping Bar +Imagine customers clicking the "Buy Now" button and skipping the unnecessary cart page, leading to faster purchases and happier customers. -**WooCommerce Direct Checkout:** This feature redirects users to the checkout page after adding items to their cart. It simplifies the checkout process, reducing the likelihood of abandoned carts and speeding up shopping for a better experience and increased sales. Highlights include: +Here's how WooCommerce Direct Checkout makes it happen: -✅ Transforming the “Add to Cart” button into a “Buy Now” button. -✅ Option to place a “Buy Now” button alongside the “Add to Cart” button. -✅ Specific product targeting for the “Buy Now” button. -✅ Fully customizable design for the “Buy Now” button. +✅Button Transformation: Effortlessly transform your "Add to Cart" button into a powerful "Buy Now" button for direct checkout. +**Choose the perfect option:** +✅Replace the classic "Add to Cart" button with "Buy Now." +✅Display both buttons side-by-side for flexibility. +✅Target specific products: Apply "Buy Now" for high-demand items or limited-time promotions. +✅Fully Customizable Design: Customize the design of your "Buy Now" button to match your brand perfectly. +✅View Button Analytics: Get insights on how each product button is performing in terms of clicks and conversion so that you can plan your product promotion effectively. -**Quick Cart:** Adds a side cart to the WooCommerce store, allowing shoppers to easily add or remove items and proceed to a one-click fast checkout. Highlights include: +**Live Sales Notification:** -✅ Real-time updates of product subtotals. -✅ Seamless addition or removal of items. -✅ One-click checkout. -✅ Customizable design and cart details. +Online shoppers coming to your WooCommerce store may be hesitant to make purchases without social proof or a feeling of product popularity. -**Live Sales Popup Notification:** Enhances sales and conversion rates by displaying recent sales alerts to store visitors, creating trust and a sense of urgency. Highlights include: +Real-time sales notifications showcasing recent purchases, build trust and encourage action from hesitant visitors. -✅ Pre-made templates available with one-click application. -✅ Fully customizable template design and message. -✅ Options to display sales notifications for the latest or specific products. +The Live Sales Popup Notification feature allows you to generate real-time sales alerts, showcasing recent purchases made by other customers. It will act as social proof to boost your sales and conversions seamlessly. -**Floating Notification Bar:** Increases conversion rates with a floating announcement banner. It informs visitors about the latest deals and discounts. Highlights include: +✅ Pre-Made Templates: Quick application with one-click access to ready-to-use templates. +✅ Fully Customizable: Design and message customization for brand consistency. +✅ Targeted Display Options: Choose between displaying notifications for the latest purchases or specific products. -✅ Action button targeting specific offers or products. -✅ Highly customizable floating bar designs. -✅ Adjustable positioning for the notification bar. -✅ Targeting specific pages for display. +**Free Shipping Label and Progress Bar:** -**Free Shipping Label and Progress Bar:** Encourages customers to increase their cart value by offering free shipping incentives. Displays a progress bar for orders over a certain amount. Highlights include: +Are you offering free shipping over an amount? Then the free shipping bar is the best way to encourage your customers to increase their cart value. -✅ Real-time display of the free shipping progress bar. -✅ Options to create free shipping offers or discounts. -✅ Setting a minimum cart value. +The absence of visible progress toward free shipping thresholds may lead to lower average order values and missed opportunities for upselling. -**Checkout Upsell Order Bump:** Offers upsell opportunities during checkout with tempting additional products, without interrupting progress. Highlights include: +The Free Shipping Label and Progress Bar dynamically display the progress customers are making toward qualifying for free shipping. -✅ Specific category or product targeting for upsells. -✅ Custom days for enabling upsell offers. -✅ Various order bumps for targeted products. +✅ Real-Time Progress Display: Instant visual feedback on progress towards free shipping. +✅ Flexible Free Shipping Offers: Create custom offers or discounts to suit your marketing goals. +✅ Minimum Cart Value Setting: Clearly define the threshold for qualifying for free shipping. -**Stock Count Progress Bar:** A visual representation of available stock for a product, encouraging timely purchases. Easy to set up and customize. +Customers can instantly see how close they are to reaching the minimum cart value for free shipping, creating transparency and motivation for additional purchases. -**Sales Countdown Timer:** Showcases a flexible countdown timer, motivating customers and drawing attention to products, boosting sales during campaigns. +**Checkout Upsell Order Bump:** -**Key Features:** +With the Checkout Upsell Order Bump feature, you can strategically place attractive additional products within the checkout process. -**1. Intuitive React-Based Admin Panel:** +This way you are allowing your customers to explore and add to their order without interrupting the progress. This approach promotes a positive customer experience while maximizing upsell opportunities. -✅ Effortlessly navigate our super-fast and clean admin panel built with React for a seamless user experience. +✅ Targeted Upsells: Specify categories or products for more effective and personalized upselling. +✅ Custom Days: Set the duration of upsell offers to align with your marketing strategy. +✅ Various Order Bumps: Display a range of tempting additional products for customers to choose from. -**2. Customizable Design Options:** +**Stock Count Progress Bar:** -✅ Modify the design of every feature directly from the admin panel, giving you full control over the look and feel of your store. +The Stock Count Progress Bar offers customers a real-time visual indicator of the available stock for a specific product. -**3. Interactive Preview Panel:** +This visual representation dynamically adjusts as purchases are made. It gives customers instant feedback on the product's popularity and availability. -✅ Visualize changes in real-time with an interactive preview panel for each module, ensuring a perfect match with your store's aesthetics. +You get easy setup and customization options for the Stock Count Progress Bar. -**4. Broad Theme Compatibility:** +The highlight of this feature is its ability to create a sense of urgency. As customers witness diminishing stock levels through the progress bar, they are motivated to make timely purchases to secure the product before it gets stocked out. + +And, the best part is you can even showcase stock warning messages based on the stock you have to encourage your visitors even more. For example, Hurry Up! Only 2 Stocks Are Left!! -✅ Seamlessly integrate StoreGrowth with a variety of popular WordPress themes for a versatile user experience. ## Documentation and Support @@ -160,7 +216,65 @@ StoreGrowth floating notification bar displays ongoing offers and discounts whil == Changelog == -= 1.1.2 - 17 January, 2023 = += 1.24.4 - 17 January, 2023 = + +enhance: add font family customize option for countdown settings & fix template two heading ui stuff + +fix: bar button layout design, touch preview. + +enhance: close button popup visibility + +fix: free shipping bar documentation redirection issue + +enhance: implement settings undo option for free shipping bar & sales countdown + +enhance: implement bump type selection & dependencies for offer selection + +enhance: implement buy now button ui customization functionalities for direct checkout module + +enhance: implement cart cta button for free shipping bar + +enhance: add validation for cta url & add pro prompts for direct checkout ui + +doc: module renamed + +enhance: make compatible with updated ui & design + +enhance: make compatible with countdown premium styles + +enhance: update undo state & make it individual color settings + +fix: free shipping bar documentation redirection issue + +enhance: implement settings undo option for free shipping bar & sales countdown + +enhance: implement bump type selection & dependencies for offer selection + +enhance: implement buy now button ui customization functionalities for direct checkout module + +enhance: implement cart cta button for free shipping bar + +enhance: add validation for cta url & add pro prompts for direct checkout ui + +enhance: update undo state & make it individual color settings + +enhance: add font family customize option for countdown settings & fix template two heading ui stuff + +enhance: make compatible with updated ui & design + +enhance: readded undo init codes during merge conflicts + +enhance: add text radio box component + +enhance: implement low stock warning msg preview for stock bar + +enhance: make compatible warning message with premium version + +enhance: make compatible with template + +fix: quantity template replacement by stock quantity + += 1.1.3 - 17 January, 2023 = fix deactivate module update readme description diff --git a/assets/src/admin.scss b/assets/src/admin.scss index 3cb0f83f..f2a6d694 100644 --- a/assets/src/admin.scss +++ b/assets/src/admin.scss @@ -2033,6 +2033,15 @@ End Settings Sidebar .settings-panel { margin-right: 32px; + .dashicons { + color: #0875ff; + cursor: pointer; + &.dashicons-undo { + color: #0875ff; + cursor: pointer; + } + } + .sgsb-settings-card { height: 100%; border-radius: 5px; @@ -2265,6 +2274,10 @@ End Settings Sidebar &.field-gap { margin-bottom: 15px; } + + &.error { + border-color: red; + } } &.textarea-field { @@ -2916,13 +2929,13 @@ End Settings Sidebar } } - @media screen and (min-width: 1024px) { + @media screen and (min-width: 1241px) { .touch-preview-panel { display: none; } } - @media screen and (max-width: 1023px) { + @media screen and (max-width: 1240px) { .panel-column { flex: 100%; max-width: 100%; @@ -3120,4 +3133,4 @@ End Settings Sidebar font-size: 14px; } } -} \ No newline at end of file +} diff --git a/assets/src/components/pro-previews/Modules/DirectCheckout/index.js b/assets/src/components/pro-previews/Modules/DirectCheckout/index.js index 7754d198..4064cd21 100644 --- a/assets/src/components/pro-previews/Modules/DirectCheckout/index.js +++ b/assets/src/components/pro-previews/Modules/DirectCheckout/index.js @@ -2,6 +2,10 @@ import { __ } from '@wordpress/i18n'; import { addFilter } from '@wordpress/hooks'; import TextInput from "../../../settings/Panels/PanelSettings/Fields/TextInput"; import SingleCheckBox from "../../../settings/Panels/PanelSettings/Fields/SingleCheckBox"; +import {Fragment} from "react"; +import {SelectBox} from "../../../settings/Panels"; +import InputNumber from "../../../settings/Panels/PanelSettings/Fields/Number"; +import ColourPicker from "../../../settings/Panels/PanelSettings/Fields/ColorPicker"; // Handle direct checkout modules pro settings prompts. addFilter( @@ -95,3 +99,98 @@ addFilter( ); } ); +addFilter( + 'sgsb_after_direct_checkout_button_design_settings', + 'sgsb_after_direct_checkout_button_design_settings_callback', + () => { + const fontFamily = [ + { + value: 'poppins', + label: __('Poppins', 'storegrowth-sales-booster'), + } + ]; + + const borders = [ + { value: 'dotted', label: __( 'Dotted', 'storegrowth-sales-booster' ) } + ]; + + return ( + + + + + + + + + + + + + + ); + } +); diff --git a/assets/src/components/pro-previews/Modules/SalesCountdown/index.js b/assets/src/components/pro-previews/Modules/SalesCountdown/index.js index f89a4773..229b14bd 100644 --- a/assets/src/components/pro-previews/Modules/SalesCountdown/index.js +++ b/assets/src/components/pro-previews/Modules/SalesCountdown/index.js @@ -1,6 +1,8 @@ import { __ } from '@wordpress/i18n'; import { addFilter } from '@wordpress/hooks'; import SingleCheckBox from '../../../settings/Panels/PanelSettings/Fields/SingleCheckBox'; +import {Fragment} from "react"; +import ColourPicker from "../../../settings/Panels/PanelSettings/Fields/ColorPicker"; // Handle stock bar modules pro settings prompts. addFilter( @@ -23,3 +25,49 @@ addFilter( } ); +addFilter( + 'sgsb_append_countdown_design_settings', + 'sgsb_append_countdown_design_settings_callback', + () => { + return ( + + + + + + + + + + + + + + ); + } +); + diff --git a/assets/src/components/pro-previews/Modules/SalesPop/index.js b/assets/src/components/pro-previews/Modules/SalesPop/index.js index 6a501df2..331c8d93 100644 --- a/assets/src/components/pro-previews/Modules/SalesPop/index.js +++ b/assets/src/components/pro-previews/Modules/SalesPop/index.js @@ -7,7 +7,7 @@ import InputNumber from '../../../settings/Panels/PanelSettings/Fields/Number'; import TextAreaBox from '../../../settings/Panels/PanelSettings/Fields/TextAreaBox'; import SettingsSection from '../../../settings/Panels/PanelSettings/SettingsSection'; import ColourPicker from "../../../settings/Panels/PanelSettings/Fields/ColorPicker"; -import VisibilityControl from 'sales-booster-sales-notification/src/components/VisibilityControl'; +import VisibilityControl from '../../../../../../Includes/Modules/SalesPop/assets/src/components/VisibilityControl'; // Handle sales pop modules pro settings prompts. addFilter( diff --git a/assets/src/components/pro-previews/Modules/StockBar/index.js b/assets/src/components/pro-previews/Modules/StockBar/index.js index bbe5eeac..59a16899 100644 --- a/assets/src/components/pro-previews/Modules/StockBar/index.js +++ b/assets/src/components/pro-previews/Modules/StockBar/index.js @@ -6,6 +6,8 @@ import SelectBox from '../../../settings/Panels/PanelSettings/Fields/SelectBox'; import TextInput from '../../../settings/Panels/PanelSettings/Fields/TextInput'; import ColourPicker from '../../../settings/Panels/PanelSettings/Fields/ColorPicker'; import SingleCheckBox from '../../../settings/Panels/PanelSettings/Fields/SingleCheckBox'; +import Number from "../../../settings/Panels/PanelSettings/Fields/Number"; +import {UpgradeCrown} from "../../../settings/Panels"; // Handle stock bar modules pro settings prompts. addFilter( @@ -134,3 +136,89 @@ addFilter( ); } ); +addFilter( + 'sgsb_append_after_stock_status_settings', + 'sgsb_append_after_stock_status_settings_callback', + () => { + return ( + + + + + + + + ); + } +); +addFilter( + 'sgsb_before_stock_bar_preview_end', + 'sgsb_before_stock_bar_preview_end_callback', + () => { + return ( + +

+ { __( + 'Hurry! only {quantity} stocks left.', + 'storegrowth-sales-booster' + ) } +

+
+ ); + } +); +addFilter( + 'sgsb_before_stock_bar_preview_template_end', + 'sgsb_before_stock_bar_preview_template_end_callback', + () => { + return ( + +

+ { __( + 'Hurry! only {quantity} stocks left.', + 'storegrowth-sales-booster' + ) } +

+
+ ); + } +); diff --git a/assets/src/components/settings/Panels/PanelSettings/Fields/CheckboxGroup.js b/assets/src/components/settings/Panels/PanelSettings/Fields/CheckboxGroup.js index 3ae8af27..46299785 100644 --- a/assets/src/components/settings/Panels/PanelSettings/Fields/CheckboxGroup.js +++ b/assets/src/components/settings/Panels/PanelSettings/Fields/CheckboxGroup.js @@ -109,10 +109,16 @@ const CheckboxGroup = ({
- + {options.map((checkbox) => (