Home Forums WC Vendors Pro Support Add tab on panel with fields to fill

NOTICE: We've Moved to a Ticket System for Support

As of August 31, 2017 (12am EST) our support forums will be retired (read-only), and we will be moving to a support ticket system.  This will allow us to better organize and answer support requests, and provide a more personalized experience as we assist our customers.

For the time being, we will leave our forums open for reading and learning while we work on creating a more robust Knowledge Base for everyone to use.

If you are a WC Vendors Pro customer please open a support ticket here. 

If you are a WC Vendors user please open a support ticket on the Wordpress.org forums.

The information on this forum is outdated and in most instances no longer relevant. Please be sure to check our documentation for the most up to date information.

https://docs.wcvendors.com/

Thank you to all of our customers!

 

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #52794
    IGNACIO
    Participant

    Good afternoon, I would like to add a tab with bank and tax information on the seller’s desk. You would need to add custom fields, a form to fill in by the seller with bank details, fiscal data (particular, autonomous, company), method desired to settle commissions (bank account or paypal options), country of membership, etc. It is possible to add it in an easy way. Thank you so much

    #52810
    Anna
    Member

    Ignacio,
    Not easily, no.
    You can use this example in our kb that shows how to add custom fields that will then collect the data and show up in the admin user’s screen. https://www.wcvendors.com/kb/custom-fields-to-shop-settings-page/ As far as adding a tab, that will be more work. I will need to look into the tab more to see what that’d require.
    You can work on the custom fields, though. If you use the example for WC Vendors Pro, then the fields will show up on your store settings page/tab.

    #56258
    IGNACIO
    Participant

    Good afternoon the code disables the web.

    #56301
    Anna
    Member

    Hello,
    Disables the web?
    Well…
    Please tell me what happens exactly.. do you see a white screen? Error(s)?
    I copied this code exactly as is, to the child theme functions.php on my dev site, and it is working as intended.
    Did you make alterations to the code?
    Did you place it after the opening php tag in your theme / child theme functions.php?

    #56305
    IGNACIO
    Participant

    The web appeared blank. I’ll try it again as I undo the changes made. I did not know very well what position to place the code. I will try to post it after the theme issue and I will write you with the result. Thank you

    #56316
    IGNACIO
    Participant

    I have located the error. I copied all the code and a few keys left the end of code that disabled the rest, so my web was not displayed. Thank you

    add_action ( ‘wcvendors_admin_after_commission_due’, ‘wcv_store_bank_details_admin’);
    wcv_store_bank_details_admin función ($ usuario) {
    ?>
    <Tr>
    <Th> <label for = “_ wcv_custom_settings_bankname”> <? Php _e ( ‘Nombre del banco’, ‘wcvendors-pro’); ?> </ Label> </ th>
    <Td> <input type = “text” name = “_ wcv_custom_settings_bankname” id = “_ wcv_custom_settings_bankname” value = “<? Php echo get_user_meta ($ usuario-> Identificación, ‘_wcv_custom_settings_bankname’, true);?>” Class = “regularización texto “> </ td>
    </ Tr>
    <? Php
    }
    ?> ————> this “?>” is the error

    #56320
    IGNACIO
    Participant

    Another question if it is not too much trouble, to make the text field a required field which code should be added? Thank you

    #56322
    Anna
    Member

    I think with this, as it is HTML, you’d use just simply required at the end of the text form… so in the code snip you put above, it’s look like this:
    `Class = “regularización texto ” required>

    #56337
    IGNACIO
    Participant

    Sorry it does not work:

    add_action( ‘wcvendors_admin_after_commission_due’, ‘wcv_store_bank_details_admin’ );
    function wcv_store_bank_details_admin( $user ) {
    ?>
    <tr>
    <th><label for=”_wcv_custom_settings_bankname”><?php _e( ‘Bank Name’, ‘wcvendors-pro’ ); ?></label></th>
    <td><input type=”text” name=”_wcv_custom_settings_bankname” id=”_wcv_custom_settings_bankname” value=”<?php echo get_user_meta( $user->ID, ‘_wcv_custom_settings_bankname’, true ); ?>” class=”regular-text” required></td>
    </tr>
    <?php
    }

    #56355
    Anna
    Member

    Hmmm..
    Well get rid of the required at the end, and try:

    <input type="text" required="required" 
    
    #56359
    IGNACIO
    Participant

    Sorry it does not work

    #56364
    Anna
    Member

    OK- then you can make the field required using php.
    Here is an example of how to make a field required with php.
    For the form that will be in the vendor’s store setting ont he front end. We should have started there in the first place– I just realized that…. since you are using Pro, that’s where they will be filling this out anyway.

    So.. add two custom attributes to your function for the form that you have made for the store settings.
    https://gist.github.com/fervous/da55d0936db7256231ebbd152b1e7870

    • This reply was modified 6 years, 3 months ago by Anna.
    • This reply was modified 6 years, 3 months ago by Anna.
    #56474
    IGNACIO
    Participant

    Its OK! Thaks!!

    #56476
    Anna
    Member

    @lamadrequetestampo
    Good- glad it is working now.
    I should have started there- sorry we went back and forth so much.
    I was just looking at the code for the admin– should have been working with the Pro front end form the whole time. 😛

Viewing 14 posts - 1 through 14 (of 14 total)
  • The forum ‘WC Vendors Pro Support’ is closed to new topics and replies.