January 7, 2017 at 11:27 pm #52442
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
Attachments:January 7, 2017 at 11:47 pm #52445
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/January 8, 2017 at 6:59 pm #52484
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?
ThanksJanuary 9, 2017 at 12:09 am #52502
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 :
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.January 10, 2017 at 4:47 pm #52652
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).
Attachments:January 10, 2017 at 8:05 pm #52666
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:January 10, 2017 at 8:34 pm #52667
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…?January 10, 2017 at 10:30 pm #52668
It appears I am unable to add a custom message with that function…
Page loads fine but with no sign of custom message.January 10, 2017 at 11:58 pm #52682
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.January 11, 2017 at 1:06 am #52696
Yeh i’m using Buddyboss Social marketplace themeJanuary 11, 2017 at 10:26 am #52718
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 .
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>January 12, 2017 at 10:03 pm #52885
Great, all working as expected 🙂 Thanks a lot for your help!January 13, 2017 at 10:58 am #52943
Glad to hear this is working well for you now. 🙂
You must be logged in to reply to this topic.