Set the PRODUCT PUBLISHING FORM to default slected and checked VIRTUL & DOWNLOAD

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM – Ultimate Set the PRODUCT PUBLISHING FORM to default slected and checked VIRTUL & DOWNLOAD

Tagged: 

Viewing 3 reply threads
  • Author
    Posts
    • #33752
      Lwifunyo Mangula
      Participant

      Hi
      once again thanks for the great work in woocommerce and more in great support

      My store is dedicated to letting people selling DOWNLOADABLE PRODUCTS

      In asking how can i by DEFAULT SET
      – product type is DOWNLOADABLE (set and checked)
      – VIRTUAL PRODUCT (set and checked)
      -DOWNLOAD LIMIT (set and checked)

      so when the vendor start to publish product is only dedicated to publishing
      because
      some of inexperienced vendors may wonders on many fields and steps!

      HOW CAN I SET DEFAULT VALUE (checked and set)
      – im looking from you for some code to put in function.php file as short-term solution before improving the plugin

      thanks

    • #33753
      Lwifunyo Mangula
      Participant

      hello I thanks My Lord Jesus i have solved this!

      according to this thread
      https://wclovers.com/forums/topic/how-to-customize-add-product-page/

      this is what i have done!
      – i go to plugin folder and ‘wp-content/plugins/wc-frontend-manager/views’
      i copied all the contents within it to my theme into a new floder called wcfm (Override this at – “yourtheme/wcfm/”)
      – then in those copied files, i opened “wcfm/products-manager/wcfm-view-products-manage.php” then i edited it
      – to enable default downloadable product ticked by default then this is what i did (starting from line ~77)

      $product_id = 0;
      $product = array();
      $product_type = apply_filters( ‘wcfm_default_product_type’, ” );
      $is_virtual = ‘enable’;
      $title = ”;
      $sku = ”;
      $visibility = ‘visible’;
      $excerpt = ”;
      $description = ”;
      $regular_price = ”;
      $sale_price = ”;
      $sale_date_from = ”;
      $sale_date_upto = ”;
      $product_url = ”;
      $button_text = ”;
      $is_downloadable = ‘enable’;
      $downloadable_files = array();
      $download_limit = ‘3’;
      $download_expiry = ‘7’;
      $children = array();

      $featured_img = ”;
      $gallery_img_ids = array();
      $gallery_img_urls = array();
      $categories = array();
      $product_tags = ”;
      $manage_stock = ”;
      $stock_qty = 0;
      $backorders = ”;
      $stock_status = ”;
      $sold_individually = ‘enable’;
      $weight = ”;
      $length = ”;
      $width = ”;
      $height = ”;
      $shipping_class = ”;
      $tax_status = ”;
      $tax_class = ”;
      $attributes = array();

      note:
      $is_downloadable = ”; ==== i changed to ====> $is_downloadable = ‘enable’;
      then
      to other fields you can look what you can do

      hope this may help others!

      i copied those files to my active child theme folder inorder to avoid destroying my modifications when we will be updating the plugin

    • #33754
      Lwifunyo Mangula
      Participant

      but i suggenst more feutures for downlodable products in woocommerce you can add
      – version history (when selling softwares) vendors can add changlogs
      https://wordpress.org/plugins/awesome-changelog/ === maybe this plugin can be intergrated

      – controll download limits

      i will continue to add more suggestions

      thansk

    • #33831
      WCFM Forum
      Keymaster

      HI,

      I am sorry for a bit delayed reply.

      Well, you have edited WCFM template for set downloadable and virtual option enable by default.
      But that will be gone when you will update next time.

      Better, you just add this code snippet in your child theme’s functions.php –

      function wcfm_custom_product_manage_fields_1110_general( $general_fileds, $product_id, $product_type ) {
      	global $WCFM;
      	if( isset( $general_fileds['is_virtual'] ) ) {
      		$general_fileds['is_virtual']['dfvalue'] = 'enable';
      	}
      	if( isset( $general_fileds['is_downloadable'] ) ) {
      		$general_fileds['is_downloadable']['dfvalue'] = 'enable';
      	}
      	return $general_fileds;
      }
      add_filter( 'wcfm_product_manage_fields_general', 'wcfm_custom_product_manage_fields_1110_general', 150, 3 );

      We will check “change log” plugin definitely.

      Thank You

Viewing 3 reply threads
  • The topic ‘Set the PRODUCT PUBLISHING FORM to default slected and checked VIRTUL & DOWNLOAD’ is closed to new replies.