From 03b05ef4ec6e74ec95559a2d6d6992aa8a8b11c6 Mon Sep 17 00:00:00 2001 From: Tanvir Hasan <54507026+TanvirHasan19@users.noreply.github.com> Date: Sat, 6 Jul 2024 03:34:33 +0600 Subject: [PATCH 1/3] Added a Return to the previous step Button inside the seller setup wizard. https://prnt.sc/pO7MH81aqBKL --- includes/Vendor/SetupWizard.php | 39 +++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/includes/Vendor/SetupWizard.php b/includes/Vendor/SetupWizard.php index 8510d5375f..f8c8892c60 100644 --- a/includes/Vendor/SetupWizard.php +++ b/includes/Vendor/SetupWizard.php @@ -9,7 +9,7 @@ * Seller setup wizard class */ class SetupWizard extends DokanSetupWizard { - /** @var string Currenct Step */ + /** @var string Current Step */ protected $step = ''; /** @var array Steps for the setup wizard */ @@ -17,13 +17,11 @@ class SetupWizard extends DokanSetupWizard { /** @var string custom logo url of the theme */ protected $custom_logo = ''; - /** - * @var int - */ + + /** @var int */ public $store_id; - /** - * @var array - */ + + /** @var array */ public $store_info; /** @@ -35,7 +33,7 @@ public function __construct() { add_action( 'dokan_setup_wizard_enqueue_scripts', [ $this, 'frontend_enqueue_scripts' ] ); } - // define the woocommerce_registration_redirect callback + // Define the woocommerce_registration_redirect callback public function filter_woocommerce_registration_redirect( $var ) { $url = $var; $user = wp_get_current_user(); @@ -99,7 +97,7 @@ public function setup_wizard() { $this->steps = apply_filters( 'dokan_seller_wizard_steps', $steps ); $this->step = current( array_keys( $this->steps ) ); - // get step from url + // Get step from URL if ( isset( $_GET['_admin_sw_nonce'], $_GET['step'] ) && wp_verify_nonce( sanitize_key( wp_unslash( $_GET['_admin_sw_nonce'] ) ), 'dokan_admin_setup_wizard_nonce' ) ) { $this->step = sanitize_key( wp_unslash( $_GET['step'] ) ); } @@ -365,6 +363,7 @@ public function dokan_setup_store() {

+ @@ -503,7 +502,7 @@ public function dokan_setup_store_save() { $dokan_settings['find_address'] = isset( $_POST['find_address'] ) ? sanitize_text_field( wp_unslash( $_POST['find_address'] ) ) : ''; $dokan_settings['show_email'] = isset( $_POST['show_email'] ) ? 'yes' : 'no'; - // Validating fileds. + // Validating fields. $is_valid_form = true; if ( empty( $dokan_settings['address']['street_1'] ) ) { $is_valid_form = false; @@ -520,9 +519,8 @@ public function dokan_setup_store_save() { if ( empty( $dokan_settings['address']['country'] ) ) { $is_valid_form = false; $_POST['error_address[country]'] = 'error'; - } - else { - if ( ( isset( $states[ $dokan_settings['address']['country'] ] ) && count( $states[ $dokan_settings['address']['country'] ] ) && empty( $dokan_settings['address']['state'] ) || ( ! isset( $states[ $dokan_settings['address']['country'] ] ) && empty( $dokan_settings['address']['state'] ) ) ) ) { + } else { + if ( ( isset( $states[ $dokan_settings['address']['country'] ] ) && count( $states[ $dokan_settings['address']['country'] ] ) && empty( $dokan_settings['address']['state'] ) ) || ( ! isset( $states[ $dokan_settings['address']['country'] ] ) && empty( $dokan_settings['address']['state'] ) ) ) { $is_valid_form = false; $_POST['error_address[state]'] = 'error'; } @@ -572,8 +570,8 @@ public function dokan_setup_payment() { ?>

+ -

@@ -661,9 +659,22 @@ public function dokan_setup_ready() {

+

steps ); + $current_index = array_search( $this->step, $keys, true ); + $prev_step = isset( $keys[ $current_index - 1 ] ) ? $keys[ $current_index - 1 ] : ''; + return add_query_arg( 'step', $prev_step, remove_query_arg( 'save_step' ) ); + } } From 3f987e66756d8bdbd73989fc4602787811fa57fe Mon Sep 17 00:00:00 2001 From: Tanvir Hasan <54507026+TanvirHasan19@users.noreply.github.com> Date: Sat, 6 Jul 2024 03:37:25 +0600 Subject: [PATCH 2/3] Added necessary CSS to adjust the newly added Return to the previous step Button layout inside the seller setup wizard. Added necessary CSS to adjust the newly added Return to the previous step Button layout inside the seller setup wizard to make the button three columns. --- assets/css/setup.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assets/css/setup.css b/assets/css/setup.css index 9ba96f36f2..343b7b7ad3 100644 --- a/assets/css/setup.css +++ b/assets/css/setup.css @@ -256,6 +256,9 @@ width: 100%; height: 300px; } +.dokan-vendor-setup-wizard form .wc-setup-actions .button{ + padding: 11px!important; +} span.required { color: #e2401c; } From 01e93b40db4c32619de1076990b5e6b77ce82b02 Mon Sep 17 00:00:00 2001 From: Tanvir Hasan <54507026+TanvirHasan19@users.noreply.github.com> Date: Sat, 6 Jul 2024 04:09:46 +0600 Subject: [PATCH 3/3] Adjusted RTL layout issue on the vendor dashboard withdrawal menu --- assets/css/rtl.css | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/assets/css/rtl.css b/assets/css/rtl.css index bd29420e61..69469f1c8a 100644 --- a/assets/css/rtl.css +++ b/assets/css/rtl.css @@ -251,4 +251,21 @@ text-align: right !important; } } - +/* Adjusted RTL layout issue on the vendor dashboard withdrawal menu */ +.dokan-withdraw-content .dokan-withdraw-area .dokan-panel-body .dokan-panel-inner-container .dokan-w5 { + position: absolute; + right: 80%!important; + top: 50%; + transform: translate(10px, -50%); + width: 20%!important; + float: right!important; +} +.dokan-withdraw-content .dokan-withdraw-area .dokan-panel-body .dokan-panel-inner-container .dokan-w5 a{ + float:left!important; +} +#dokan-request-withdraw-button{ + float:left!important; +} +.dokan-withdraw-content .dokan-withdraw-area .dokan-panel-body .dokan-panel-inner-container .dokan-w5 button{ + float:left!important; +}