Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Ultimate › Set the PRODUCT PUBLISHING FORM to default slected and checked VIRTUL & DOWNLOAD
Tagged: downloadable
- This topic has 3 replies, 2 voices, and was last updated 6 years, 2 months ago by WCFM Forum.
- AuthorPosts
- October 11, 2018 at 2:43 am #33752Lwifunyo MangulaParticipant
Hi
once again thanks for the great work in woocommerce and more in great supportMy 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 pluginthanks
- October 11, 2018 at 3:37 am #33753Lwifunyo MangulaParticipant
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 dohope 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
- October 11, 2018 at 3:43 am #33754Lwifunyo MangulaParticipant
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
- October 12, 2018 at 4:44 am #33831WCFM ForumMember
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
- AuthorPosts
- The topic ‘Set the PRODUCT PUBLISHING FORM to default slected and checked VIRTUL & DOWNLOAD’ is closed to new replies.