Home Forums WC Vendors Pro Support "sold by" label

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 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #52051
    IGNACIO
    Participant

    Good morning, I would like to hide the “sold by” label on the woocommerce display and display it just below the title page of each product. Would it be possible?

    #52074
    Anna
    Member

    @lamadrequetestampo
    Hello Ignacio,
    OK- well we do provide code to remove the sold by.. but I am not sure which sold by you want to remove.
    Do you mean the main shop page that shows all vendors’ products? The “loop”?
    Or do you mean you just would like to remove it from the product page as it is, and move it to a new area on the product page (below the title?)?

    Feel free to send screenshots to describe this so I can better assist you.

    #52079
    IGNACIO
    Participant

    I would like to hide the “sold by” label on the store and display products from woocommerce and show it on the product page. I also have products of administrator and sellers, but I would like to show them in the products of the sellers and not the products that the administrator publishes.

    #52133
    Anna
    Member

    Hello,
    To remove the sold by in the product loop (main shopping pages), then use this code in your theme/child theme functions.php:

    /* Remove sold by in product loops */
    remove_action( 'woocommerce_after_shop_loop_item', array('WCV_Vendor_Shop', 'template_loop_sold_by'), 9, 2);

    For the product pages sold by… You would need to first remove the action that places the “sold by” in the product meta in that location. Then you add a new action with the new location.

    Because WC Vendors is using the WooCommerce product pages to place this code, WooCommerce hooks are used for the location of this action, and you are somewhat limited by what hooks are provided by WooCommerce for the single product page.

    To remove the action, first put this in your child theme functions.php:

    /* Remove sold by on single product pages */
    remove_action( 'woocommerce_product_meta_start', array( 'WCV_Vendor_Cart', 'sold_by_meta' ), 10, 2 );

    Now, to add the new action… add this, but change the location to your choice one of the available hooks for the area. I chose woocommerce_single_product_summary just for this example and based on what you described above. This also goes in your child theme functions.php:

    /* add sold by in product loop in new hook area */
    if ( WC_Vendors::$pv_options->get_option( 'sold_by' ) ) { 
    add_action ( 'woocommerce_single_product_summary', array('WCV_Vendor_Cart', 'sold_by_meta'), 10, 2 );
    }

    Notice that: woocommerce_after_shop_loop_item is now changed to: woocommerce_single_product_summary
    That changes the location of the “sold by” action.

    This shows some of the hooks that are available for the single product page. Use a different hook from woocommerce_single_product_summary if you want to show the sold by in a different area: https://businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/

    #52347
    IGNACIO
    Participant

    Sorry, I try to make the first step that they tell me but I disappear the page with products by category. Am I not an expert, explaining in detail? “To remove the sold by in the product loop (main shopping pages)?”

    #52385
    Anna
    Member

    Hello,
    Try this one instead. Theme or child theme functions.php file:
    remove_action( 'woocommerce_after_shop_loop_item', array( $wcvendors_pro->wcvendors_pro_store_controller, 'loop_sold_by'), 8 );

    #52468
    IGNACIO
    Participant

    Sorry but the code should be incorrect, I still give the same error: “The page lamadrequetestampo.com does not work. The lamadrequetestampo.com page can not process this request now.HTTP ERROR 500” https://lamadrequetestampo.com/camisetas/

    #52604
    IGNACIO
    Participant

    Sorry for the inconvenience, it is resolved, it was an issue with the wordpress theme that has been resolved. Thank you very much.

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