Home Forums WC Vendors Pro Support remove tab structure on product page

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 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #52442
    Duncan
    Participant

    I wish to remove the tab structure of the edit product form and replace it with the same information, just without the tabs, so that the ‘General Inventory Shipping…’ contents appear one after the other on the page. Would this require edits to product-edit.php or should i be looking elsewhere??

    Thanks for the help in advanced

    #52445
    Anna
    Member

    Here is a reply I gave to another user; you’re attempting the same thing, so I am just going to post it here. Let me know if you need more help with this.
    https://www.wcvendors.com/help/topic/remove-tabs-but-keep-content-when-adding-product/

    #52484
    Duncan
    Participant

    thanks for that.
    If I were to edit the text of a the save/draft buttons and a few title texts ( e.g ‘featured image’ ‘Inventory’) could i do that from product-edit.php also?

    Thanks

    #52502
    Anna
    Member

    Hello,
    The “Save Draft’ text can be changed at the very end of the template. Don’t change anything except the text between the single quotes.
    The Inventory tab is not changed by a template; that is in a core file. This tab label on the product add/edit page can be changed using a filter, so you do not have to modify core files.
    You can put this in your theme/child theme functions.php :

    https://gist.github.com/fervous/213a85a10899c5b13aa20a99377896f6

    The Features Image label does not have a filter at the time– so the only way to change that is to modify a core file (not recommended) and that is not update safe.
    If you still want to change it, let me know and I can show you were that is in a core file.

    It looks like Jamie has made a notation and he’ll be adding a filter there in the future.

    #52652
    Duncan
    Participant

    If the change isn’t update safe then i wont worry about it.

    To be honest id rather not change any of the wording, but im getting lots of feedback from user AB testing about confusion of how the specific ‘Add product’ field will show up on the live product.

    So in terms of Featured Image, it could just be some text added next to it like i’ve achieved with product description? (see screen shot).

    Thanks

    #52666
    Anna
    Member

    Sure– there are two action hooks: wcv_before_media and wcv_after_media

    TO add a message, you can use this gist. Change the hook if you want it after the media upload area:
    https://gist.github.com/fervous/089e6562e0b00c531f4df56d63ae8e87

    #52667
    Duncan
    Participant

    Thanks very much for the gist.

    Are there hooks available for all elements in the product upload form? Have i missed a doc containing this information…?

    #52668
    Duncan
    Participant

    It appears I am unable to add a custom message with that function…
    Page loads fine but with no sign of custom message.

    #52682
    Anna
    Member

    Hmmm… are you using the BuddyBoss theme?
    If so, then I may have to test it out and see if I can find out what they changed… They may already have something there using that hook or something.

    #52696
    Duncan
    Participant

    Yeh i’m using Buddyboss Social marketplace theme

    #52718
    Anna
    Member

    Hello,
    BuddyBoss overrides that template.
    So, to make this change and take advantage of the hooks, you’ll need to do the following:
    1. go to the buddyboss marketplace folder and find the product-edit template that they have overridden. Copy this template.
    Here is the location: wp-content/plugins/buddyboss-marketplace/templates/wc-vendors/dashboard/product-edit.php

    2. Make sure you have created a bb-marketplace folder, and within it, a wc-vendors folder in your onesocial-child theme. With this theme, you have to add an extra path to the wc-vendors template files if buddyboss has already overrideen that template :bb-marketplace .
    wp-content/themes/onesocial-child/bb-marketplace/wc-vendors

    3. Now also create a folder called: dashboard so you can save the copied template form step 1. Your path should look like this: wp-content/themes/onesocial-child/bb-marketplace/wc-vendors/dashboard

    4. Copy the template from step 1 to this folder in your child theme. wp-content/themes/onesocial-child/bb-marketplace/wc-vendors/dashboard/product-edit.php

    Now to override this template, as you need to do to add in these hooks they have not put in there yet, go to approximately line 57 where you see this:

     <div class="all-100">
        	<!-- Media uploader -->
    		<div class="wcv-product-media">
    			<?php BuddyBoss_BM_Templates::product_media_uploader( $object_id ); ?>
    		</div>
    	</div>

    You need to add in the before and after hooks: <?php do_action( 'wcv_before_media', $object_id ); ?> and <?php do_action( 'wcv_after_media', $object_id ); ?>

    Add them before and after this line:<?php WCVendors_Pro_Form_helper::product_media_uploader( $object_id ); ?> This is what that section should look like when you add the hooks:

     <div class="all-100">
        	<!-- Media uploader -->
    		<div class="wcv-product-media">
                          <?php do_action( 'wcv_before_media', $object_id ); ?>
    			<?php BuddyBoss_BM_Templates::product_media_uploader( $object_id ); ?>
                          <?php do_action( 'wcv_after_media', $object_id ); ?>
    		</div>
    	</div>
    #52885
    Duncan
    Participant

    Great, all working as expected 🙂 Thanks a lot for your help!

    #52943
    Anna
    Member

    Glad to hear this is working well for you now. 🙂

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