Forum Replies Created

Viewing 38 posts - 1 through 38 (of 38 total)
  • Author
    Posts
  • in reply to: my wc vendor invoice #48016
    Jan-Philipp Wittrin
    Participant

    Well. It should at least show your invoicing address, don’t you think?

    My German tax lawyer says, that email is not good enough.

    He cannot use it. So it is a wasted company expense which I cannot get a tax return from. πŸ™

    How can I get a proper invoice from you?

    B.t.W. really every other American or Australian tech company I bought so far plugins from offers a proper invoicing system.

    Cheers.

    in reply to: Email notification on product approval and new update? #20576
    Jan-Philipp Wittrin
    Participant

    Hi Ben and Jamie,

    1. Did you just write this? Wow. Thank you. T.U.

    2. I stupidly used the ACF formatting, but I think it is not so hard to change either. Looking forward the new release.

    Cheers,

    jp

    in reply to: customize product fields in the frontend #18687
    Jan-Philipp Wittrin
    Participant

    Hi Karen,

    into your header above <?php wp_header;?>

    
    <?php acf_form_head();?> // to generate frontend form

    and then into your product-edit.php

    <?php $options = array(
    
    	/* (string) Unique identifier for the form. Defaults to 'acf-form' */
    	'id' => 'field_55636916e7a83', // the ID from your export
    	'post_id'	=> $post_id, // untested, but most likely, because in product-form class of WC Vendors
    
    	'form' => false, // because you don't want submit buttom
    
    ....
    
    ?>
    
    <?php acf_form( $options ); ?>

    I am not a developer either, but trial and error usually works well πŸ˜‰

    Let us know if it worked please.

    Cheers, jp

    in reply to: customize product fields in the frontend #18615
    Jan-Philipp Wittrin
    Participant

    Hi @Conscious Crafties,

    I noticed it is important that your custom field name starts with

    _wcv_custom_product_….

    so. in your case: ‘_wcv_custom_product_dispatch_times’

    Then it should work. At least it worked for me πŸ™‚

    Cheers,

    Jan-Philipp

    in reply to: How to add custom fields in Product page #18613
    Jan-Philipp Wittrin
    Participant

    Hi @surendra ,

    which multilanguage plugin are you using?

    Cheers,

    Jan-Philipp

    in reply to: Categories are not populated in pending review edit form #18250
    Jan-Philipp Wittrin
    Participant

    Ok Ben, thank you. Here is how I did it.
    As admin I set: vendor can edit live products, products need approval.

    Then almost like you:

    As vendor I added a test product, with the capabilities set so the product requires approval.

    [As vendor I go back again to change something (before approval), here the issue appears, categories are blank, although they are saved in backend.]

    I view test product as admin, see the categories set properly already. I published the product. I edited the product as a vendor and all the fields I entered are populated.

    _
    Would you mind to replicate it this way again? Thank you very much in advance. πŸ™‚ Attached is a screenshot to clarify what i mean.

    in reply to: customize product fields in the frontend #18206
    Jan-Philipp Wittrin
    Participant

    Hi Nicolas.

    In functions.php you add a new woo tab like this (untested):

    
    	$tabs['test_tab'] = array(
    		'title' 	=> __( 'New Product Tab', 'woocommerce' ),
    		'priority' 	=> 50,
    		'callback' 	=> 'woo_new_product_tab_content'
    	);
    
    	return $tabs;
    
    }
    function woo_new_product_tab_content() {
    
    	// The new tab content
    
    	echo '<h2>New Product Tab</h2>';
    	echo '<p>Here\'s your new product tab.</p>';
    
    }
    

    And then within the function you can call your custom field. F.e. like this.

    
    global $post;
    
    $product = wc_get_product( $post->ID );
    
    $description = $post->post_content;
    $shipping = $product->get_weight();
    
    $custom_meta = get_post_meta( $post->ID, 'your_meta_key', true );
    

    Source: https://wordpress.org/support/topic/how-to-add-custom-fields-in-custom-product-tabs-in-woocommerce-1

    Cheers.

    in reply to: customize product fields in the frontend #18182
    Jan-Philipp Wittrin
    Participant

    I solved these issues with a combination of Advanced Custom Fields (for the Admin Backend (and even the frontend if you want to get more geeky)). In ACF I would make a text field with the id ‘_wcv_custom_product_ingredients’ and say that the custom field should be shown on product edit in the admin and then use the code like above in the product-edit.php

    The field you can then echo into your single product or archive with echo get post meta (like above the last bit of code) or with the ACF own -> the_field (‘_wcv_custom_product_ingredients’);

    Don’t forget the overide the Woocommerce template:
    https://www.skyverge.com/blog/how-to-override-woocommerce-template-files/

    By using the same ID in ACF the field gets populated in the backend.
    The combination of ACF and WC Vendors works pretty well.

    in reply to: "Send from: Store Adress" with custom adress form #18144
    Jan-Philipp Wittrin
    Participant

    SOLVED IT!

    So in case anybody ever needs something simular.

    I found the country option values in the page source.

    In the ACF select field with the ID ‘_wcv_store_country’ I defined the option values / keys like that:

    DE : Germany
    DK : Denmark

    this way only the chosen countries are getting populated as Store Country.

    πŸ™‚

    in reply to: "Send from: Store Adress" with custom adress form #18143
    Jan-Philipp Wittrin
    Participant

    Ok. I digged a bit deeper and found.

    All address fields are getting populated by my ACF form except the country select options. And exactly this one is responsible for the “send from”.

    So, in the end I have 3 questions:

    1. Is it possible to hook into option values of the country select? Something like _wcv_germany ;-)?

    Or 2.: Is it possible to limit the store countries to just a few. (Because I donΒ΄t users to be able to have shops in f.e. Japan…)

    3. I tried to find the document which is responsible for the country list. Where could I find that?

    Your help is appreciated.

    in reply to: Bugs on Add Product Page (Frontend) #17608
    Jan-Philipp Wittrin
    Participant

    Issue 3 solved: Select box translation!

    The attribute select box was not translating.

    In the form helper on line 552 it should say:

    'show_option_none' => __('Select a ', 'wcvendors-pro' ) . __(ucfirst( $product_attribute->attribute_name )),

    instead of

    
    'show_option_none'	=> __('Select a ' . ucfirst( $product_attribute->attribute_name ), 'wcvendors-pro' ),
    
    
    Here again the full attribute select also with translate label (from line 546 on):
    
    

    // Output attribute select
    self::select( array(
    ‘id’ => ‘attribute_values[‘ . $i . ‘][]’,
    ‘post_id’ => $post_id,
    ‘label’ => __(ucfirst( $product_attribute->attribute_name )),
    ‘value’ => $current_attribute,
    ‘show_option_none’ => __(‘Select a ‘, ‘wcvendors-pro’ ) . __(ucfirst( $product_attribute->attribute_name )),
    ‘taxonomy’ => wc_attribute_taxonomy_name( $product_attribute->attribute_name ),
    ‘taxonomy_args’ => array(
    ‘hide_empty’ => 0,
    ‘orderby’ => $product_attribute->attribute_orderby,
    ),
    )
    );
    `

    Then the translation is working.

    All issues solved.

    in reply to: WC Vendor Pro + Advanced Custom Fields (ACF) #17583
    Jan-Philipp Wittrin
    Participant

    Hi. One more question: how can I turn off the ‘required’ function for the product description.

    I am hiding this field, since I am replacing it with two other fields, and now I cannot save the form because the field is empty when I hide it.

    Edit:

    I just tricked it now, by giving the description in the product form class a default value:

    ‘value’ => ‘-‘,

    instead of ‘value’ => $prouduct_description,

    That works, but is a bit ugly… πŸ™‚

    in reply to: WC Vendor Pro + Advanced Custom Fields (ACF) #17579
    Jan-Philipp Wittrin
    Participant

    Ok.

    I got it working to output a textarea in the frontend product edit form and then to save the values to the acf field.

    Here is a little tutorial:

    1. I added a field in ACF Fieldgroups with the ID ‘_wcv_custom_product_product_description_in_english’ to show in post_type: Product

    2. Then I added in ‘The WCVendors Pro Product Form class’ following code:

    
    /**
    	 *  Output product description  
    	 * 
    	 * @since    1.0.0
    	 * @param 	 int 	$post_id  post_id for this meta if any 
    	 */
    	public static function english_description( $post_id, $english_product_description ) {
    
    		 WCVendors_Pro_Form_Helper::textarea( apply_filters( 'wcv_english_product_description', array( 
    		 	'post_id'	=> $post_id, 
    		 	'id' 		=> '_wcv_custom_product_product_description_in_english', 
    		 	'label'	 	=> __( 'English Product Description', 'wcvendors-pro' ), 
    		 	'value' 	=> $english_product_description 
    		 	) )
    		 );
    
    	} // english_description()
    
    

    3. Then in the theme/wc_vendors/dashboard/product-edit.php I added

    
    <?php WCVendors_Pro_Product_Form::english_description( $object_id, $english_product_description );  ?>
    

    That’s it.

    Jamie, what I wonder, is this a legitimate method? And more important, how can I make this update safe.

    in reply to: WC Vendor Pro + Advanced Custom Fields (ACF) #17565
    Jan-Philipp Wittrin
    Participant

    Hi Jamie,

    I am curious about that too, since I need to integrate two extra ACF Fields in the product form.

    Looking forward to your tutorial.

    Cheers

    jp

    in reply to: Bugs on Add Product Page (Frontend) #17549
    Jan-Philipp Wittrin
    Participant

    Hi Ben, thank you. I just stumbled by coincidence that you can sort them in the WooCommerce category options page and when you do that, it actually effects the order in the selectbox! πŸ™‚ God, that makes me happy.

    in reply to: Bugs on Add Product Page (Frontend) #17408
    Jan-Philipp Wittrin
    Participant

    Ok. Issue 1: I reasigned the children of the missing parents to new parent categories in Woocommerce, and now it works. Strange but true.

    Issue 1 solved.

    Extra-Question: Is there a way to change the order of the parent categories in the select box?

    in reply to: Bugs on Add Product Page (Frontend) #17406
    Jan-Philipp Wittrin
    Participant

    Extras to 1:

    In the select box 1 Child and 1 Parent are not shown at all.

    17 categories are not hieracically shown (those ones which are children / grandchildren of the missing parents).

    in reply to: Bugs on Add Product Page (Frontend) #17404
    Jan-Philipp Wittrin
    Participant

    Ok. Issue No. 2 was a javascript issue. I solved that.

    Issue 1 and 3 remain with or without my faulty js.

    in reply to: HowTo Conditions of Use for Vendor Shop #17320
    Jan-Philipp Wittrin
    Participant

    Hi @biowomo, hi Jamie and Ben.

    I reworked Sebastians translation a bit, corrected the translated vocabulary where needed and added German translations of the countries and some other idioms.

    Sebastian, if you want the version of this po-file, I can send it to you via email.

    Also I send it to [email protected]

    Cheers

    jp

    in reply to: Pro Dashboard Product Table #15171
    Jan-Philipp Wittrin
    Participant

    Hi Jamie, hi Ben.

    I have created the ACF function, but I am missing one crucial information and I am not sure how to retrieve. I need the table id. I looked in the page source, but it does not offer an ID, except the article ID. I tried it with that one, but of course it does not work. Here is the code i have.

    
    add_action('wcvendors_pro_table_before_[MISSING ID?]', 'wcv_save_featured_product');
    function wcv_save_featured_product() {
    	acf_form_head();
    }
    
    add_action('wcvendors_pro_table_after_[MISSING ID?]', 'wcv_add_featured_product');
    function wcv_add_featured_product() {
    
    acf_form( array( 	'form' => true,
    			'instruction_placement' => 'field',
    			'return' => false,
    			'field_groups' => array(group_5642a69678d17),
    			'submit_value' => __("Set Featured Product", 'acf'),
    			'post_id' => WCVendors_Pro_Vendor_Controller::get_vendor_store_id( get_current_user_id() )	) );
    
    }

    I assume that the ID is missing after:
    wcvendors_pro_table_before_
    wcvendors_pro_table_after_

    How could I retrieve this ID? I know it is a big ask and maybe goes a bit above Pro Support. Your help would be for the greater good though πŸ˜‰

    Thank you and cheers,

    jp

    in reply to: Pro Dashboard Product Table #15090
    Jan-Philipp Wittrin
    Participant

    Hi Jamie,

    thank you.

    I can generate the form through ACF, that’s ok.

    So what I have to look for would be a table_after action of that particular kind of table to hook into my form. I will check that out.

    Cheers,

    jp

    in reply to: Pro Dashboard Product Table #15086
    Jan-Philipp Wittrin
    Participant

    Here we go! πŸ™‚

    in reply to: Pro Dashboard Product Table #15085
    Jan-Philipp Wittrin
    Participant

    Yes. That sounds like a good way.

    What I try first also it is not as neat: I add another tab in store settings called Featured Product where I integrate my ACF Post Object (which can get all products by the vendor in a select box) and my “Want more? Pay more!” Notice. πŸ™‚

    If Jamie happens to have an idea about the table, I would be very happy. I researched a bit more into the wcv table stuff, it seems to be generated completely dynamic without having a template where it all comes together, right?

    in reply to: Pro Dashboard Product Table #15079
    Jan-Philipp Wittrin
    Participant

    Yeah I thought about that. It is actually possible.

    The problem I am having with that is that you cannot limit the featured product to one. On the listing page, everything is neat together in terms of UI.

    I highly recommend checking ACF a bit further. You can even integrate it into your own plugins.

    Just a little read, might be interesting for you guys.

    http://www.advancedcustomfields.com/resources/including-acf-in-a-plugin-theme/

    Cheers,

    jp

    in reply to: Pro Dashboard Product Table #15074
    Jan-Philipp Wittrin
    Participant

    That is good to hear.

    Unfortunatly my clients have a very specific idea of where the products should be displayed, and how.

    Also I completely rebuild the whole store layout, with funky slide shows, etc. but no featured products there.

    I would like to go on with the featured product via post object, especially I want to give vendors the opportunity of only one feature product that the vendor can choose, more will become a paid extra. That’s all possible with the ACF post object. (So, the theory :-))

    in reply to: Pro Dashboard Product Table #15072
    Jan-Philipp Wittrin
    Participant

    Thank you, that would be great.

    The reason I am asking: I want to integrate a “Featured Product” Select Box there, with the ACF Post Object. The native Woo Solution is to Vendor unfriendly. I kinda know how to achieve that part, it is just the place where to hack into it that I am missing. πŸ™‚

    in reply to: Pro Dashboard Product Table #15061
    Jan-Philipp Wittrin
    Participant

    Thank you Ben,

    that was my first instinct too. But that is not the file I mean. I am talking about the one that is listing all products. I add a screenshot.

    Cheers,

    jp

    in reply to: Howto: Add ACF fields to frontend shop edit #14893
    Jan-Philipp Wittrin
    Participant

    Ok. Simple, once you know it. It was a caching problem of ACF. Here I found the answer: http://support.advancedcustomfields.com/forums/topic/text-field-that-should-show-content-displays-boolfalse/

    So I created a new ACF image field and user the code above and now it is working.

    And this is really amazing, because the interplay of ACF Frontend Forms and WC Vendors opens up a whole new world…

    Thank you so much @benlumley for this gold piece of code.

    in reply to: Howto: Add ACF fields to frontend shop edit #14877
    Jan-Philipp Wittrin
    Participant

    Hi @benlumley and Ben, hi Community

    thank you for sharing this piece of code. It is really great!!!

    I can get the ACF fields to work inside the vendor settings, I can also echo text acf fields in the store-header template.

    But for some reason I can’t get the image ACF field to display in the store header.

    I tried it with this one and many other ways…

    
    <?php
    $img = wp_get_attachment_image_src( get_post_meta( $store_id, 'representive_image_of_shop',true ), array( 150, 150 	) );?>
    
    <img src="<?php echo $img[0];?>" alt="" class="" />

    Any ideas would be very much appreciated.

    Cheers,

    jp

    in reply to: Pro Dashboard breaks with Qtranslate #14420
    Jan-Philipp Wittrin
    Participant

    Hello Ben,

    I have good news. Remember I made the virgin installation to find this Mark shipped bug.

    Well, I just use this to install WC Vendors Pro V 1.0.5 and Qtranslate X.

    Et voila. The Pro Dashboard internal links are working.

    So it must be some major other f**k up on my main installation that ruins my other dashboard, or it is the earlier Pro Version that troubles.

    It is not translating though. Is the Pro Dashboard already localized, or do I need to translate the strings myself?

    I am very happy that the links don’t produce a 404 anymore!

    Cheers

    jp

    in reply to: Mark As Shipped in vendor dashboard #14260
    Jan-Philipp Wittrin
    Participant

    Hi Ben,

    Here is the weird thing. I tested on two environments.

    Enviroment one: WC, WCV, with and without Qtranslate, Woos Storefront Theme:
    In the vendor dashboard, once you click: Mark shipped it turns to Marked shipped (free translated from German Interface), but I cannot unmark it (maybe that is intended).

    Environment two (the problem child): WC, WCV, Qtranslate and Automatics _underscore theme (Woo enabled)
    In the vendor dashboard, once you click: Mark shipped it stays Mark shipped (only the top notification gets shown), but I can unmark it* again (with a second click).

    *as seen in the vendor backend

    I hope that helps, to follow up on this bug.

    If you have further requirements please let me know.

    Cheers, jp

    Woocommerce and WC Vendors.

    in reply to: Pro Dashboard breaks with Qtranslate #14221
    Jan-Philipp Wittrin
    Participant

    Well,

    I understand your frustration, but please understand mine.

    Qtranslate is one of the three big Multilanguage plugins. So, it might be worth investigating it, since you know your product best.

    I asked you, if you don’t mind to replicate the problem. Your answer would be fair enough for a free plugin. But I paid a lot of money for your product, and all I get is an unfriendly β€œflavor of the” hour answer and a plugin that does not work under pretty normal work environment.

    πŸ™

    in reply to: Pro Dashboard breaks with Qtranslate #14152
    Jan-Philipp Wittrin
    Participant

    Hi Ben,

    sorry, I was in the desert and dealing with many other issues.

    The environment:
    Qtranslate X is a proper alternative to WPML which has kind of an annoying overhead.
    With QtX vendors can directly translate there products and don’t have to have translator rights and all what WPML needs.
    It is quite intuitive and has a long WordPress history. Also a history of constant struggle with bugs. But usually a very vibrant community to sort this out.

    The problem:

    The free WC Vendors just works fine in combination with Qtranslate.

    The issues in the Pro Version appear on the Vendor Pro Dashboard. The only page that is loading is the Dashboard (with the sales report) as such, but all the links: “Products Orders Coupons Ratings Settings” are not working when I activate it. As soon I turn qtx off it is working again.

    I hope that helps to understand. Maybe you guys can replicate the problem by installing Qtranslate X https://wordpress.org/plugins/qtranslate-x/

    Cheers, jp

    in reply to: Mark As Shipped in vendor dashboard #14151
    Jan-Philipp Wittrin
    Participant

    Hi Ben,

    i just hit the same wall.

    I updated V 1.8 but the “Mark shipped” problem still exists. I am looking forward your solution, since it is indeed confusing to the vendor.

    Cheers,

    jp

    in reply to: Pro Dashboard breaks with Qtranslate #10867
    Jan-Philipp Wittrin
    Participant

    Forget, what I just said about the refund. I am working myself into it and try to get the best out of it.

    It would be great though if you could make the Vendor Dashboard Pro compatible with Qtranslate X.

    I don’t know if that is possible in the future, but I think there are some more people out there who might appreciate that.

    Cheers

    jp

    in reply to: Shop branding with slideshow, front end editing #10254
    Jan-Philipp Wittrin
    Participant

    Hi Ben. Like this?

    add_action(‘wcvendors_settings_after_paypal’, ‘pv_add_custom_merchant_id_field’);
    function pv_add_custom_merchant_id_field() {
    ?>
    <div class=”pv_merchant_id_container”>
    <p><b><?php _e( ‘Merchant ID’, ‘wc_product_vendor’ ); ?></b><br/>
    <?php _e( ‘Your Checkout.fi merchant ID.’, ‘wc_product_vendor’ ); ?><br/>

    <input type=”text” name=”pv_merchant_id” id=”pv_merchant_id” placeholder=”1234″ value=”<?php echo get_user_meta( get_current_user_id(), ‘pv_merchant_id’, true ); ?>” />
    </p>
    </div>
    <?php
    }

    add_action( ‘wcvendors_admin_after_commission_due’, ‘pv_admin_user_info’ );
    function pv_admin_user_info( $user ) {
    ?>
    <tr>
    <th><label for=”pv_merchant_id”><?php _e( ‘Merchant ID’, ‘wc_product_vendor’ ); ?></label></th>
    <td><input type=”text” name=”pv_merchant_id” id=”pv_merchant_id” value=”<?php echo get_user_meta( $user->ID, ‘pv_merchant_id’, true ); ?>” class=”regular-text”></td>
    </tr>
    <?php
    }

    add_action( ‘wcvendors_shop_settings_saved’, ‘pv_save_merchant_id’ );
    add_action( ‘wcvendors_update_admin_user’, ‘pv_save_merchant_id’ );
    function pv_save_merchant_id( $user_id )
    {
    if ( isset( $_POST[‘pv_merchant_id’] ) ) {
    update_user_meta( $user_id, ‘pv_merchant_id’, $_POST[‘pv_merchant_id’] );
    }
    }

    in reply to: Remove fields from Admin User Edit #9079
    Jan-Philipp Wittrin
    Participant

    Thank you Ben.

    That gives me an idea. If I crack it, I will report on how to.

    jp

    in reply to: Remove fields from Admin User Edit #8997
    Jan-Philipp Wittrin
    Participant

    Hi Ben,

    sorry for the delayed answer. And thank you for the code snippet.

    Since you ask, maybe that is a question I should ask the ACF support, but I wonder if I can hook ACF fields directly into the Shop Settings page (backend).

    I am asking because I am keen on using ACF specific functionalities like the Repeater Field for an Image slide show in the WC Vendors Shop Header.

    Right now I am solving by integrating it into the profile, but ideally I would love to keep your shop settings page.

    Cheers

    jp

Viewing 38 posts - 1 through 38 (of 38 total)