• Resolved shopmaster

    (@serdarozbilen)


    Hello,

    First of all thank you very much for excellent plugin. I’am new at your plugin. Tested it and decided to use.I tried other plugins and I decided the best plugin is yours for multi vendor systems.
    I have a few question.I hope you can help me.

    1- Question : I have some custom meta fields for products. Vendors have to enter them. I added field for meta data from for add-product.php
    ( $dp_data = get_post_meta($product_id, 'dp_data', true);)
    And tried this for input
    "dp_data" => array('label' => __('Kargo Suresi', 'dc-woocommerce-multi-vendor'), 'type' => 'text', 'class' => 'regular-text pro_ele simple variable', 'label_class' => 'pro_ele simple variable external grouped booking', 'value' => $dp_data, 'hints' => __('Data Label.', 'dc-woocommerce-multi-vendor')),

    But could’nt save this meta data.Found this topic but there isn’t a “wcmp_frontend_product_manager_template.php” under plugin files.

    How can I add ?

    2- Quesiton. We transferred all data(orders,products) easily from our ex .net web site.
    Now vendors see on dashboard all orders waiting shipping ?? Can we mark ex orders as shipped multiply ?

    3- Can we add customer name and mark as shipped button on /vendordashboard/vendor-orders ?

    I know I asked too many question but I can donate a bit for support.
    Thanks again.
    Best Regards.

Viewing 7 replies - 1 through 7 (of 7 total)
  • @serdarozbilen, thanks for reaching WCMp Support!!

    Our replies are inline ”

    1- Question : I have some custom meta fields for products. Vendors have to enter them. I added field for meta data from for add-product.php
    But could’nt save this meta data.Found this topic but there isn’t a “wcmp_frontend_product_manager_template.php” under plugin files.
    How can I add ?

    >> Make sure that you are getting the custom value in the post array.

    Alternatively, you can also use this filters :

    do_action('end_wcmp_fpm_products_manage', $product_id);

    >> This action will let you add your custom product type’s available product fields to add fields for a product

    do_action('after_wcmp_fpm_meta_save', $new_product_id, $product_manager_form_data);

    >> Using this action you have to save your custom product type’s product fields data for the respective product.

    2- Quesiton. We transferred all data(orders,products) easily from our ex .net web site.

    >> You may use any WordPress Import plugin for this.

    – Now vendors see on dashboard all orders waiting shipping ?? Can we mark ex orders as shipped multiply ?

    >> Vendor can mark each order as shipped, if you have enabled the option “Enable Vendor Shipping” via WCMp >> Settings >> General.

    3- Can we add customer name and mark as shipped button on /vendordashboard/vendor-orders ?

    >> This thread might help you out – https://wc-marketplace.com/support-forum/topic/orders-tab-add-more-columns/

    Let us know if you have any further query.

    Thread Starter shopmaster

    (@serdarozbilen)

    Thank you for quick reply

    1-“>> Make sure that you are getting the custom value in the post array.”

    – Yes I’am sure. I’am getting custom meta value. I can see it on add-product page as input field wit value. I could’nt undersatand where to add this action ?

    2 Yes I know but we did data transfer and all orders seem as “pending shhiping”. We want to set marked all of them as shipped if it is possible ??

    3- “>> Vendor can mark each order as shipped, if you have enabled the option “Enable Vendor Shipping” via WCMp >> Settings >> General.”

    – It is okay. Vendor can see on dasboard(Pending Shipping). But can not see “mark as shippied” action on vendor-orders list page.

    I added more data columns (Thank you)

    Thread Starter shopmaster

    (@serdarozbilen)

    I checked this topic => here

    I did what did you write. Added following codes to add-product.php

    $WCMp->wcmp_frontend_fields->wcmp_generate_form_field(apply_filters('wcmp_fpm_fields_general', array("title" => array('label' => __('Title', 'dc-woocommerce-multi-vendor'), 'type' => 'text', 'class' => 'regular-text pro_ele simple variable external grouped', 'label_class' => 'pro_title pro_ele simple variable external grouped', 'value' => $title),
                        "sku" => array('label' => __('SKU', 'dc-woocommerce-multi-vendor'), 'type' => $vendor_show_sku, 'class' => (apply_filters("product_sku_hide",false)) ? 'regular-text pro_ele simple variable external grouped vendor_hidden non-booking non-accommodation-booking non-redq_rental' : 'regular-text pro_ele simple variable external grouped non-booking non-accommodation-booking non-redq_rental', 'label_class' => (apply_filters("product_sku_hide",false)) ? 'pro_title vendor_hidden simple variable external grouped non-booking non-accommodation-booking non-redq_rental' : 'pro_title simple variable external grouped non-booking non-accommodation-booking non-redq_rental', 'value' => $sku, 'hints' => __('SKU refers to a Stock-keeping unit, a unique identifier for each distinct product and service that can be purchased.', 'dc-woocommerce-multi-vendor')),
                        "regular_price" => array('label' => __('Price', 'dc-woocommerce-multi-vendor') . '(' . get_woocommerce_currency_symbol() . ')', 'type' => 'text', 'wrapper_class' =>'pro_ele simple external non-grouped non-booking non-accommodation-booking non-subscription non-variable non-variable-subscription non-redq_rental non-auction','class' => 'regular-text simple external non-grouped non-booking non-accommodation-booking non-subscription non-variable non-variable-subscription non-redq_rental non-auction', 'label_class' => 'pro_ele pro_title simple external non-grouped non-booking non-accommodation-booking non-subscription non-variable non-variable-subscription non-redq_rental non-auction', 'value' => $regular_price),
                        "sale_price" => array('label' => __('Sale Price', 'dc-woocommerce-multi-vendor') . '(' . get_woocommerce_currency_symbol() . ')', 'type' => 'text', 'wrapper_class' =>'pro_ele simple external non-grouped non-booking non-accommodation-booking non-variable non-variable-subscription non-redq_rental non-auction','class' => 'regular-text simple external non-grouped non-booking non-accommodation-booking non-variable non-variable-subscription non-redq_rental non-auction', 'label_class' => 'pro_ele pro_title simple external non-grouped non-booking non-accommodation-booking non-variable non-variable-subscription non-redq_rental non-auction', 'value' => $sale_price),
                        "sale_date_from" => array('label' => __('Sale Date From', 'dc-woocommerce-multi-vendor'), 'type' => 'text', 'placeholder' => __('From... YYYY-MM-DD', 'dc-woocommerce-multi-vendor'), 'wrapper_class' => 'pro_ele simple external non-grouped non-booking non-accommodation-booking non-variable non-variable-subscription non-redq_rental non-auction','class' => 'regular-text simple external non-grouped non-booking non-accommodation-booking non-variable non-variable-subscription non-redq_rental non-auction', 'label_class' => 'pro_ele pro_title simple external non-grouped non-accommodation-booking non-booking non-variable non-variable-subscription non-redq_rental non-auction', 'value' => $sale_date_from),
                        "sale_date_upto" => array('label' => __('Sale Date Upto', 'dc-woocommerce-multi-vendor'), 'type' => 'text', 'placeholder' => __('To... YYYY-MM-DD', 'dc-woocommerce-multi-vendor'), 'wrapper_class' => 'pro_ele simple external non-grouped non-booking non-accommodation-booking non-variable non-variable-subscription non-redq_rental non-auction','class' => 'regular-text simple external non-grouped non-booking non-accommodation-booking non-variable non-variable-subscription non-redq_rental non-auction', 'label_class' => 'pro_ele pro_title simple external non-grouped non-accommodation-booking non-booking non-variable non-variable-subscription non-redq_rental non-auction', 'value' => $sale_date_upto),
                        "visibility" => array('label' => __('Visibility', 'dc-woocommerce-multi-vendor'), 'type' => 'select', 'options' => array('visible' => __('Catalog/Search', 'dc-woocommerce-multi-vendor'), 'catalog' => __('Catalog', 'dc-woocommerce-multi-vendor'), 'search' => __('Search', 'dc-woocommerce-multi-vendor'), 'hidden' => __('Hidden', 'dc-woocommerce-multi-vendor')), 'class' => 'regular-select pro_ele simple variable external grouped', 'label_class' => 'pro_ele pro_title simple variable external grouped', 'value' => $visibility, 'hints' => __('Choose where this product should be displayed in your catalog. The product will always be accessible directly.', 'dc-woocommerce-multi-vendor')),
                        "excerpt" => array('label' => __('Short Description', 'dc-woocommerce-multi-vendor'), 'type' => 'wpeditor', 'class' => 'regular-textarea pro_ele simple variable external grouped', 'label_class' => 'pro_title grouped', 'value' => $excerpt, 'settings' => $_wp_editor_settings),
                        "description" => array('label' => __('Description', 'dc-woocommerce-multi-vendor'), 'type' => 'wpeditor', 'class' => 'regular-textarea pro_ele simple variable external grouped', 'label_class' => 'pro_title grouped', 'value' => $description, 'settings' => $_wp_editor_settings),
                        "pro_id" => array('type' => 'hidden', 'value' => $product_id),
    "dp_kargolanma_suresi" => array('label' => __('Kargolanma Suresi', 'dc-woocommerce-multi-vendor'), 'type' => 'text', 'class' => 'regular-text pro_ele simple variable external grouped', 'label_class' => 'pro_title pro_ele simple variable external grouped', 'value' => $dp_kargolanma_suresi)
                                    ), $product_id));

    And added this to my theme functions.php

    function vendor_change_kargo_tarihi($product_id, $form_data){
         $current_post = get_post( $product_id);
         $current_post-> dp_kargolama_suresi = $form_data['dp_kargolanma_suresi'];
         wp_update_post($current_post);
    }
    add_action('after_wcmp_fpm_meta_save', 'vendor_change_kargo_tarihi', 10, 2);

    I am getting right value on add-product.php with this code line
    $dp_kargolanma_suresi = get_post_meta($product_id, 'dp_kargolanma_suresi', true);

    Showing right value. If adding a new product it seems null and if it is a product update, it shows old value.

    But when I sumbit anything change, saving product meta value doesn’t change

    What is the wrong
    :/

    • This reply was modified 6 years, 1 month ago by shopmaster.
    • This reply was modified 6 years, 1 month ago by shopmaster.
    Thread Starter shopmaster

    (@serdarozbilen)

    I hope you will help :/

    @serdarozbilen, Please use update_post_meta() instaed of wp_update_post()

    Thread Starter shopmaster

    (@serdarozbilen)

    Thank you so much ??

    You are welcome ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Add Custom Fields to Products’ is closed to new replies.