ryandesigned
Forum Replies Created
-
Thank you, I would also like to remove fields from the next steps. I tried to use this code in the same function it doesn’t work either.. Any advice?
/**
* Store step.
*/
public function dokan_setup_store() {
$store_info = $this->store_info;$store_ppp = isset( $store_info[‘store_ppp’] ) ? esc_attr( $store_info[‘store_ppp’] ) : 10;
$show_email = isset( $store_info[‘show_email’] ) ? esc_attr( $store_info[‘show_email’] ) : ‘no’;
$address_street1 = isset( $store_info[‘address’][‘street_1’] ) ? $store_info[‘address’][‘street_1’] : ”;
$address_street2 = isset( $store_info[‘address’][‘street_2’] ) ? $store_info[‘address’][‘street_2’] : ”;
$address_city = isset( $store_info[‘address’][‘city’] ) ? $store_info[‘address’][‘city’] : ”;
$address_zip = isset( $store_info[‘address’][‘zip’] ) ? $store_info[‘address’][‘zip’] : ”;
$address_country = isset( $store_info[‘address’][‘country’] ) ? $store_info[‘address’][‘country’] : ”;
$address_state = isset( $store_info[‘address’][‘state’] ) ? $store_info[‘address’][‘state’] : ”;$country_obj = new WC_Countries();
$countries = $country_obj->countries;
$states = $country_obj->states;
?>
<h1><?php _e( ‘Store Setup’, ‘dokan-lite’ ); ?></h1>
<form method=”post” class=”dokan-seller-setup-form”>
<table class=”form-table”>
<tr>
<th scope=”row”><label for=”store_ppp”><?php _e( ‘Store Product Per Page’, ‘dokan-lite’ ); ?></label></th>
<td>
<input type=”text” id=”store_ppp” name=”store_ppp” value=”<?php echo $store_ppp; ?>” />
</td>
</tr>
<tr>
<th scope=”row”><label for=”address[street_1]”><?php _e( ‘Street’, ‘dokan-lite’ ); ?></label></th>
<td>
<input type=”text” id=”address[street_1]” name=”address[street_1]” value=”<?php echo $address_street1; ?>” />
</td>
</tr>
<tr>
<th scope=”row”><label for=”address[street_2]”><?php _e( ‘Street 2’, ‘dokan-lite’ ); ?></label></th>
<td>
<input type=”text” id=”address[street_2]” name=”address[street_2]” value=”<?php echo $address_street2; ?>” />
</td>
</tr>
<tr>
<th scope=”row”><label for=”address[city]”><?php _e( ‘City’, ‘dokan-lite’ ); ?></label></th>
<td>
<input type=”text” id=”address[city]” name=”address[city]” value=”<?php echo $address_city; ?>” />
</td>
</tr>
<th scope=”row”><label for=”address[zip]”><?php _e( ‘Post/Zip Code’, ‘dokan-lite’ ); ?></label></th>
<td>
<input type=”text” id=”address[zip]” name=”address[zip]” value=”<?php echo $address_zip; ?>” />
</td>
<tr>
<th scope=”row”><label for=”address[country]”><?php _e( ‘Country’, ‘dokan-lite’ ); ?></label></th>
<td>
<select name=”address[country]” class=”wc-enhanced-select country_to_state” id=”address[country]”>
<?php dokan_country_dropdown( $countries, $address_country, false ); ?>
</select>
</td>
</tr>
<th scope=”row”><label for=”calc_shipping_state”><?php _e( ‘State’, ‘dokan-lite’ ); ?></label></th>
<td>
<input type=”text” id=”calc_shipping_state” name=”address[state]” value=”<?php echo $address_state; ?>” / placeholder=”<?php esc_attr_e( ‘State Name’, ‘dokan-lite’ ); ?>”>
</td>
</tr>
<tr>
<th scope=”row”><label for=”show_email”><?php _e( ‘Email’, ‘dokan-lite’ ); ?></label></th>
<td>
<input type=”checkbox” name=”show_email” id=”show_email” class=”input-checkbox” value=”1″ <?php echo ( $show_email == ‘yes’ ) ? ‘checked=”checked”‘ : ”; ?>/>
<label for=”show_email”><?php _e( ‘Show email address in store’, ‘dokan-lite’ ); ?></label>
</td>
</tr><?php do_action( ‘dokan_seller_wizard_store_setup_field’, $this ); ?>
</table>
<p class=”wc-setup-actions step”>
<input type=”submit” class=”button-primary button button-large button-next store-step-continue” value=”<?php esc_attr_e( ‘Continue’, ‘dokan-lite’ ); ?>” name=”save_step” />
get_next_step_link() ); ?>” class=”button button-large button-next store-step-skip-btn”><?php _e( ‘Skip this step’, ‘dokan-lite’ ); ?>
<?php wp_nonce_field( ‘dokan-seller-setup’ ); ?>
</p>
</form>
<script>
(function($){
var states = <?php echo json_encode( $states ); ?>;$(‘body’).on( ‘change’, ‘select.country_to_state, input.country_to_state’, function() {
// Grab wrapping element to target only stateboxes in same ‘group’
var $wrapper = $( this ).closest(‘form.dokan-seller-setup-form’);var country = $( this ).val(),
$statebox = $wrapper.find( ‘#calc_shipping_state’ ),
$parent = $statebox.closest(‘tr’),
input_name = $statebox.attr( ‘name’ ),
input_id = $statebox.attr( ‘id’ ),
value = $statebox.val(),
placeholder = $statebox.attr( ‘placeholder’ ) || $statebox.attr( ‘data-placeholder’ ) || ”,
state_option_text = ‘<?php echo esc_attr__( ‘Select an option…’, ‘dokan-lite’ ); ?>’;if ( states[ country ] ) {
if ( $.isEmptyObject( states[ country ] ) ) {
$statebox.closest(‘tr’).hide().find( ‘.select2-container’ ).remove();
$statebox.replaceWith( ‘<input type=”hidden” class=”hidden” name=”‘ + input_name + ‘” id=”‘ + input_id + ‘” value=”” placeholder=”‘ + placeholder + ‘” />’ );$( document.body ).trigger( ‘country_to_state_changed’, [ country, $wrapper ] );
} else {
var options = ”,
state = states[ country ];for( var index in state ) {
if ( state.hasOwnProperty( index ) ) {
options = options + ‘<option value=”‘ + index + ‘”>’ + state[ index ] + ‘</option>’;
}
}$statebox.closest(‘tr’).show();
if ( $statebox.is( ‘input’ ) ) {
// Change for select
$statebox.replaceWith( ‘<select name=”‘ + input_name + ‘” id=”‘ + input_id + ‘” class=”wc-enhanced-select state_select” data-placeholder=”‘ + placeholder + ‘”></select>’ );
$statebox = $wrapper.find( ‘#calc_shipping_state’ );
}$statebox.html( ‘<option value=””>’ + state_option_text + ‘</option>’ + options );
$statebox.val( value ).change();$( document.body ).trigger( ‘country_to_state_changed’, [country, $wrapper ] );
}
} else {
if ( $statebox.is( ‘select’ ) ) {$parent.show().find( ‘.select2-container’ ).remove();
$statebox.replaceWith( ‘<input type=”text” class=”input-text” name=”‘ + input_name + ‘” id=”‘ + input_id + ‘” placeholder=”‘ + placeholder + ‘” />’ );$( document.body ).trigger( ‘country_to_state_changed’, [country, $wrapper ] );
} else if ( $statebox.is( ‘input[type=”hidden”]’ ) ) {
$parent.show().find( ‘.select2-container’ ).remove();
$statebox.replaceWith( ‘<input type=”text” class=”input-text” name=”‘ + input_name + ‘” id=”‘ + input_id + ‘” placeholder=”‘ + placeholder + ‘” />’ );$( document.body ).trigger( ‘country_to_state_changed’, [country, $wrapper ] );
}
}$( document.body ).trigger( ‘country_to_state_changing’, [country, $wrapper ] );
$(‘.wc-enhanced-select’).select2();
});$( ‘:input.country_to_state’ ).change();
})(jQuery)
</script>
<?phpdo_action( ‘dokan_seller_wizard_after_store_setup_form’, $this );
}No that didn’t work. I believe it’s deprecated.
Forum: Plugins
In reply to: [Wholesale Order Table for WooCommerce] Make Category not expanded by defaultAlso any way to re-order categories?
Forum: Plugins
In reply to: [Ninja Tables - Easiest Data Table Builder] Product variationsI have the exact same question.. I just bought the plugin, but I’m afraid it will be useless with out a variations dropdown.. Right now, the only options I can see are Buy Now, or Select Options (redirects to single product page)
Thanks
THANK YOU SO MUCH!
Thank you!
I haven’t used a plugin, but have added this snippet to my functions.php…
add_action( ‘init’, ‘custom_taxonomy_Color’ );
function custom_taxonomy_Color() {
$labels = array(
‘name’ => ‘Colors’,
‘singular_name’ => ‘Color’,
‘menu_name’ => ‘Color’,
‘all_items’ => ‘All Colors’,
‘parent_item’ => ‘Parent Color’,
‘parent_item_colon’ => ‘Parent Color:’,
‘new_item_name’ => ‘New Color Name’,
‘add_new_item’ => ‘Add New Color’,
‘edit_item’ => ‘Edit Color’,
‘update_item’ => ‘Update Color’,
‘separate_items_with_commas’ => ‘Separate Color with commas’,
‘search_items’ => ‘Search Colors’,
‘add_or_remove_items’ => ‘Add or remove Colors’,
‘choose_from_most_used’ => ‘Choose from the most used Colors’,
);
$args = array(
‘labels’ => $labels,
‘hierarchical’ => true,
‘public’ => true,
‘show_ui’ => true,
‘show_admin_column’ => true,
‘show_in_nav_menus’ => true,
‘show_tagcloud’ => true,
);
register_taxonomy( ‘color’, ‘product’, $args );
register_taxonomy_for_object_type( ‘color’, ‘product’ );
}Wondering how to turn this into a filter widget in my shop! Thanks
THANK YOU…How can I edit the first code if vendors can only withdrawl with paypal and not with stripe? Thanks.
Hello, I have purchased your ultimate plugin! Any update on this code?
Thanks
Will you be posting the code on this thread?
Thanks
Solved
THANK YOU!!! I will be purchasing your plugin soon.
Paypal And Stripe will be the methods for vendor withdrawl!
Thanks again.
Thank you.. So to be clear, if I purchase the Ultimate Plugin, that will fix the Dokan shipping issue that I’m experiencing?
Thanks
Thank you so much! One more issue now… not sure if you can help. I am using Dokan Pro plugin… and from your vendor dashboard, under the shipping tab, I am getting the error:
” Dokan Pro Shipping Settings: Please ask your Store Admin to upgrade your dashboard to access this feature.”
I have set up shipping zones in WooCommerce Shipping settings, but they still wont show up on your vendor dashboard. Am I missing something?
Thanks for your help!
Is it possible to override that file in a child theme?