waqas-4549

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 59 total)
  • Author
    Posts
  • in reply to: Vendor Dashboard “Register” Section #126763
    waqas-4549
    Participant
    This reply has been marked as private.
    in reply to: Vendor Dashboard “Register” Section #126745
    waqas-4549
    Participant

    It did not make any changes to the page 🙁

    in reply to: How to add two new Meta Data while Adding a Product #126123
    waqas-4549
    Participant

    Thank you Sir,

    I added the following code

    
    do_action( 'wcmp_after_product_excerpt_metabox_panel', $post->ID );
    
    /**
    * Add Custom Tab in add product page.
    * @author WC Marketplace
    * @Version 3.3.0
    */
    function add_custom_product_data_tabs( $tabs ) {
       $tabs['advanced'] = array(
           'label'    => __( 'Brand ID & Part Number', 'your-text-domain' ),
           'target'   => 'custom_tab_product_data',
           'class'    => array(),
           'priority' => 100,
       );
       return $tabs;
    }
    add_filter( 'wcmp_product_data_tabs', 'add_custom_product_data_tabs' );
    
    /**
    * Add Custom Tab content in add product page.
    * @author WC Marketplace
    * @Version 3.3.0
    */
    function add_custom_product_data_content( $pro_class_obj, $product, $post ) {
        //prnt_r($product->get_id());die;
        $hh = get_post_meta($product->get_id() , 'brand_id' );
        $hh = get_post_meta($product->get_id() , 'part_number' );
          //print_r($hh);
       ?>
       <div role="tabpanel" class="tab-pane fade" id="custom_tab_product_data"> <!-- just make sure tabpanel id should replace with your added tab target -->
           <div class="row-padding">
               <div class="form-group">
                   <label class="control-label col-sm-3 col-md-3">Brand ID</label>
    	       <label class="control-label col-sm-3 col-md-3">Part Number</label>
    		 <div class="col-md-6 col-sm-9">
                       <input type="text" name="custom_text_field" class="form-control" value= <?php print_r($hh[0]) ?> />
                   </div>
               </div>
           </div>
       </div>
       <?php
    }
    add_action( 'wcmp_product_tabs_content', 'add_custom_product_data_content', 10, 3 );
    
    /**
    * Save Custom Tab content data.
    * @author WC Marketplace
    * @Version 3.3.0
    */
    function save_custom_product_data( $product, $post_data ) {
       if( isset($post_data['post_ID']) && isset($post_data['custom_text_field'])){
           update_post_meta( absint( $post_data['post_ID'] ), 'brand_id', $post_data['custom_text_field']);
           update_post_meta( absint( $post_data['post_ID'] ), 'part_number', $post_data['custom_text_field']);
       }
    }
    add_action( 'wcmp_process_product_object', 'save_custom_product_data', 10, 2 );
    
    Copy

    It does not show the input field for Brand ID now.. as shown in the following screen shot
    https://snipboard.io/WZHnab.jpg

    Can you please help, I do not have any coding skills

    in reply to: How to add two new Meta Data while Adding a Product #125977
    waqas-4549
    Participant

    I have used the following code:

    do_action( ‘wcmp_after_product_excerpt_metabox_panel’, $post->ID );

    /**
    * Add Custom Tab in add product page.
    * @author WC Marketplace
    * @Version 3.3.0
    */
    function add_custom_product_data_tabs( $tabs ) {
    $tabs[‘advanced’] = array(
    ‘label’ => __( ‘Brand ID & Part Number’, ‘your-text-domain’ ),
    ‘target’ => ‘custom_tab_product_data’,
    ‘class’ => array(),
    ‘priority’ => 100,
    );
    return $tabs;
    }
    add_filter( ‘wcmp_product_data_tabs’, ‘add_custom_product_data_tabs’ );

    /**
    * Add Custom Tab content in add product page.
    * @author WC Marketplace
    * @Version 3.3.0
    */
    function add_custom_product_data_content( $pro_class_obj, $product, $post ) {
    //prnt_r($product->get_id());die;
    $hh = get_post_meta($product->get_id() , ‘brand_id’ );
    //print_r($hh);
    ?>
    <div role=”tabpanel” class=”tab-pane fade” id=”custom_tab_product_data”> <!– just make sure tabpanel id should replace with your added tab target –>
    <div class=”row-padding”>
    <div class=”form-group”>
    <label class=”control-label col-sm-3 col-md-3″>Brand ID</label>
    <div class=”col-md-6 col-sm-9″>
    <input type=”text” name=”custom_text_field” class=”form-control” value= <?php print_r($hh[0]) ?> />
    </div>
    </div>
    </div>
    </div>
    <?php
    }
    add_action( ‘wcmp_product_tabs_content’, ‘add_custom_product_data_content’, 10, 3 );

    /**
    * Save Custom Tab content data.
    * @author WC Marketplace
    * @Version 3.3.0
    */
    function save_custom_product_data( $product, $post_data ) {
    if( isset($post_data[‘post_ID’]) && isset($post_data[‘custom_text_field’])){
    update_post_meta( absint( $post_data[‘post_ID’] ), ‘brand_id’, $post_data[‘custom_text_field’]);
    }
    }
    add_action( ‘wcmp_process_product_object’, ‘save_custom_product_data’, 10, 2 );

    in reply to: How to add two new Meta Data while Adding a Product #125976
    waqas-4549
    Participant

    Thank you for all the help,
    I have managed to add one field as you can see from the following screen shot:
    https://snipboard.io/WPqkvO.jpg

    It also saves to the exact meta data that I want it to.
    I would like to add another input box in this same area labelled “Part Number” and it should save in “part_number”
    Can you please help with that?

    in reply to: How to add two new Meta Data while Adding a Product #125853
    waqas-4549
    Participant

    Message from GeekyCoder Abhirup (Moderator)
    “If you want to add fields on a particular position then kindly share us a screenshot of the position, so we will give you hook to add fields on this position.”

    I would like place the two input fields on that area.. I am replying to the comment from the Moderator.

    in reply to: How to add two new Meta Data while Adding a Product #125844
    waqas-4549
    Participant

    Dear Team,

    Do I place that code in the functions file?
    Also I would like to place it on following area:
    https://pasteboard.co/KebpqJ5.png

    in reply to: How to add two new Meta Data while Adding a Product #125770
    waqas-4549
    Participant

    Thank you for the reply,

    All the coding regarding the saving/display had already been conducted. I just require a code to display the two input field while adding the product.
    The two field are have the raw name as “Meta: part_number” & “Meta: brand_id” .
    If you can display these in while adding a product on Vendor Dashboard, then the rest of the things will be done automatically since our development team has already programmed it in the back end.

    in reply to: Product filter Not Working on Vendor Shop Page #125709
    waqas-4549
    Participant

    Dear Team,

    The following screen share shows that the vendor shop page does not show a filter while the categories pages show the product filter.
    https://www.loom.com/share/f034adb8c7c6448b95a66330c000b3dd

    in reply to: Free Shipping Coupons #125673
    waqas-4549
    Participant

    Thank you guys, this issue is resolved.
    You may mark this thread closed.

    waqas-4549
    Participant

    Thank you,
    You may mark this thread closed 🙂

    waqas-4549
    Participant

    Thank you so much,
    May I know the directory of the file this code has been added to?

    waqas-4549
    Participant

    Hi,
    Can you keep scrolling down till the end, you will see it them. I noticed in the video you shared that you didn’t completely scroll down.

    waqas-4549
    Participant
    This reply has been marked as private.
    waqas-4549
    Participant
    This reply has been marked as private.
Viewing 15 posts - 1 through 15 (of 59 total)