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.

To request help, please  OPEN A SUPPORT TICKET   and we will assist you.

Thank you to all of our customers!

This topic contains 4 replies, has 2 voices, and was last updated by  Samia 3 months, 2 weeks ago.

  • Author
    Posts
  • #77322
     Samia 
    @appngamereskin

    Hi,
    I am trying to add another file upload option for product thumbnail image. For this purpose I am using your given form helper for File Uploader WCVendors_Pro_Form_Helper::file_uploader. But the below code didn’t work for me.
    Our field id is “wcv_custom_product_small_image”.

    <?php
    do_action( ‘wcv_form_file_uploader_before_’. $object_id );
    WCVendors_Pro_Form_Helper::file_uploader( array(
    ‘header_text’ => __(‘Thumbnail Image’, ‘wcvendors-pro’ ),
    ‘add_text’ => __(‘Add Thumbnail Image’, ‘wcvendors-pro’ ),
    ‘remove_text’ => __(‘Remove Thumbnail Image’, ‘wcvendors-pro’ ),
    ‘image_meta_key’ => ‘wcv_custom_product_small_image’,
    ‘save_button’ => __(‘Add Thumbnail Image’, ‘wcvendors-pro’ ),
    ‘window_title’ => __(‘Select an Image’, ‘wcvendors-pro’ ),
    ‘value’ => $value
    ) );
    do_action( ‘wcv_form_file_uploader_after_’. $object_id);
    ?>

    I have also tried this

    <?php
    do_action( ‘wcv_form_file_uploader_before_’. $object_id );
    WCVendors_Pro_Form_Helper::file_uploader( array(
    ‘post_id’ => $object_id,
    ‘id’ => ‘wcv_custom_product_small_image’,
    ‘header_text’ => __(‘Thumbnail Image’, ‘wcvendors-pro’ ),
    ‘add_text’ => __(‘Add Thumbnail Image’, ‘wcvendors-pro’ ),
    ‘remove_text’ => __(‘Remove Thumbnail Image’, ‘wcvendors-pro’ ),
    ‘image_meta_key’ => ‘wcv_custom_product_small_image’,
    ‘save_button’ => __(‘Add Thumbnail Image’, ‘wcvendors-pro’ ),
    ‘window_title’ => __(‘Select an Image’, ‘wcvendors-pro’ ),
    ‘value’ => $value
    ) );
    do_action( ‘wcv_form_file_uploader_after_’. $object_id);
    ?>

    Kindly let me know why this is not working for me?

    #77328
     Samia 
    @appngamereskin

    Hi,
    When I added the same image from admin panel it’s working fine and also showing on edit product page for vendor but when but when vendor tries to remove or want to add new from front-end then this is not working.
    Here is the updated code:
    <?php
    $thumbnail_id = MultiPostThumbnails::get_post_thumbnail_id(‘product’, ‘wcv_custom_product_small_image’, $object_id);
    WCVendors_Pro_Form_Helper::file_uploader( array(
    ‘header_text’ => __(‘Thumbnail Image’, ‘wcvendors-pro’ ),
    ‘add_text’ => __(‘Add Thumbnail Image’, ‘wcvendors-pro’ ),
    ‘remove_text’ => __(‘Remove Thumbnail Image’, ‘wcvendors-pro’ ),
    ‘image_meta_key’ => ‘wcv_custom_product_small_image’,
    ‘save_button’ => __(‘Add Thumbnail Image’, ‘wcvendors-pro’ ),
    ‘window_title’ => __(‘Select Thumbnail Image’, ‘wcvendors-pro’ ),
    ‘value’ => $thumbnail_id
    ) );
    ?>

    This is working only when image added from admin panel and when vendor tries to add or edit using edit product page then file is saving into media liberary but don’t get back and not going to front where we want to show the image.

    #77378
     Samia 
    @appngamereskin

    Please have a look and pay some attention to my problems.

    #77482
     Anna 
    WC Vendors Official Support
    @fervous

    Hello,
    Upon review I am not certain why your custom code is not working as you had intended.
    Please look for an outside developer to assist with further custom code work for WC Vendors, as we only provide guidelines and our docs site for outlining the available hooks & filters for custom development with WC Vendors and WC Vendors Pro.
    http://docs.wcvendors.com/

    #77512
     Samia 
    @appngamereskin

    Hi,
    Here is WC Vendors reply for someone. I have seen that @ben and @Jami replied about custom code issues but @fervous always replies such kind of answers for me. I don’t know why you can’t forward my problem to @ben or @Jami.
    I always saw that @ben and @jami answer such kind of questions on your support channel. For clarification have a look at following links:

    Media Uploader Show Saved Image?

    Howto: Add ACF fields to frontend shop edit

    Many other examples I have seen on the support channel.

Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘WC Vendors Pro Support’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?