Home Forums WC Vendors Pro Support Am I missing something here?

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 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #59874
    patrick
    Participant

    Im trying to get the drop down on the product page to work. It displays on single product and product edit. But anything inputted on product edit doesnt make it to the single product page. Just wondering if im missing something simple.

    
    // TRANMISSION
    WCVendors_Pro_Form_Helper::select( array(  
    	'post_id'      => $object_id, 
    	'id' 	       => 'wcv_custom_transmission_type',
    	'class'        => 'select2',
    	'label'        => __( 'transmission_type', 'wcvendors-pro' ), 
    	'placeholder'  => __( 'Please specify if your product is NEW or USED', 'wcvendors-pro' ),
    	'wrapper_start' 	=> '',
    	'wrapper_end' 		=> '', 
    	'desc_tip'     => 'true', 
    	'description'  => __( 'Is your Product New or Used?', 'wcvendors-pro' ),
    	'options' 	=> array(
    			'new'   => __( 'New' ),
    			'used' 	=> __( 'Used'),
    			'nwot'  => __( 'New Without Tags' ),
    	)	 
    ) );
    ?>
    
    /* Now, put the code below in your theme/child theme functions.php */
    add_action('woocommerce_product_meta_start', 'wcv_transmission_type', 2);
    function wcv_transmission_type() {
        $output = get_post_meta( get_the_ID(), 'wcv_custom_transmission_type', true ); 
        echo 'Transmission Type: ' . $output . '<br>';
    }
    
    • This topic was modified 5 years, 10 months ago by patrick.
    #59898
    Jamie
    Keymaster

    Hello,

    We only provide code for you to store custom information with a product. If you need to display that information on the store front end then you need to then reference your meta keys and display them on the relevant part of the single product pages. As this is theme dependent we haven’t written any auto code to display these. The general thing is, open the relevant template file and see which actions are called where and then hook into that action to display the meta key you’re storing.

    Here is a reference for the actions.

    cheers,

    Jamie.

    #59907
    patrick
    Participant

    Your answer is confusing. If you look at the code, the meta key is there.
    My issue is it will not post. Im wondering if im missing something, maybe i have to turn something on in admin, I dont know. Or maybe the second part of my add action is off:
    add_action(‘woocommerce_product_meta_start’, ‘wcv_transmission_type’, 2);

    Just looking for a little direction.
    Here is the original code I found on wcvendors and which is also on your githb

    /* Put the below code in your product-edit.php template where you wish it to show up-- I've chosen directly before the - Product Categories -*/ 
    
    <?php 
    WCVendors_Pro_Form_Helper::select( array(  
    	'post_id'      => $object_id, 
    	'id' 	       => 'wcv_custom_product_condition',
    	'class'        => 'select2',
    	'label'        => __( 'Product Condition', 'wcvendors-pro' ), 
    	'placeholder'  => __( 'Please specify if your product is NEW or USED', 'wcvendors-pro' ),
    	'wrapper_start' 	=> '',
    	'wrapper_end' 		=> '', 
    	'desc_tip'     => 'true', 
    	'description'  => __( 'Is your Product New or Used?', 'wcvendors-pro' ),
    	'options' 	=> array(
    			'new'   => __( 'New' ),
    			'used' 	=> __( 'Used'),
    			'nwot'  => __( 'New Without Tags' ),
    	)	 
    ) );
    ?>
    
    /* Now, put the code below in your theme/child theme functions.php */
    
    add_action('woocommerce_product_meta_start', 'wcv_product_condition', 2);
    function wcv_product_condition() {
        $output = get_post_meta( get_the_ID(), 'wcv_custom_product_condition', true ); 
        echo 'Product Condition: ' . $output . '<br>';
    }
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘WC Vendors Pro Support’ is closed to new topics and replies.
This website uses cookies to ensure you get the best experience on our website.