Home Forums WC Vendors Pro Support Hide Product Type and always checked Downloadable

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 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #41479
    DesignLab
    Participant

    In the frontend product submission, my site uses WooCommerce PDF Vouchers only. Since the developer had integrated frontend voucher creation using WC Vendors Pro, I would like vendors to only create PDF Vouchers-products only. So what I need is a code snippet to do :

    1.make the Downloadable checkbox turned on by default
    2.hide this Downloadable checkbox
    3.hide the Product Type dropdown from showing up because by default it shows Simple Product, and that is what I wanted by default

    This way, it will always show the PDF Vouchers product tab to vendors.

    Can you guys help me?

    #41534
    Jamie
    Keymaster

    Hello,

    You’d edit the template and remove the reference to product_type() (line 60 in the template) and then replace that with two hidden fields that use the following :

    https://gist.github.com/digitalchild/cb49e3dfd04b67450d2c

    You can just ignore the lines 26 – 34 of that gist as it forces virtual too which you did not specify you need. This will force a simple downloadable product and all be hidden from the user.

    cheers,

    Jamie.

    #43732
    Jorrel Paleracio
    Participant

    I’m doing something similar – Jaime this worked a charm!


    @Designlab

    Had to also remove the following to stop the downloadable file upload form from popping up.

    Lines 97- 107

    <div class=”show_if_downloadable” id=”files_download”>
    <!– Downloadable files –>
    <?php WCVendors_Pro_Product_Form::download_files( $object_id ); ?>

    <!– Download Limit –>
    <?php WCVendors_Pro_Product_Form::download_limit( $object_id ); ?>
    <!– Download Expiry –>
    <?php WCVendors_Pro_Product_Form::download_expiry( $object_id ); ?>
    <!– Download Type –>
    <?php WCVendors_Pro_Product_Form::download_type( $object_id ); ?>
    </div>
    </div>

    Cheers,

    Jorrel

    #65174
    Samia
    Participant

    Hi Jamie,
    I would like to checked downloadable and manage stock for Variations tab because my products are downloadable and have variations.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘WC Vendors Pro Support’ is closed to new topics and replies.