• Resolved 7acestech

    (@7acestech)


    I am in early stages of my website – multi vendor development.

    To market the products to vendors, I scraped few vendor websites, and uploaded the products as admin. I have like 4000 products & approximately 10 vendors.
    Unfortunately, the scraping plug in I used, cannot create attributes. So I have to do them manually.

    However, my challenge here as an admin is – if I export all the products in CSV, apparently there is no option for “store” or “user”, and that information is not getting exported. This field is important, as it dictates my product search by location.

    How can I make this happen?

    Open to code modifications as well.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author WC Lovers

    (@wclovers)

    Hi,

    Add this snippet to your site –

    function add_export_column( $columns ) {
    	$columns['store_id'] = 'Store';
    	$columns['store_name'] = 'Store Name';
    	return $columns;
    }
    add_filter( 'woocommerce_product_export_column_names', 'add_export_column' );
    add_filter( 'woocommerce_product_export_product_default_columns', 'add_export_column' );
    function add_export_data_store_id( $value, $product ) {
    	$value = wcfm_get_vendor_id_by_post( $product->get_id() );
    	return $value;
    }
    add_filter( 'woocommerce_product_export_product_column_store_id', 'add_export_data_store_id', 10, 2 );
    function add_export_data_store_name( $value, $product ) {
    	$value = wcfm_get_vendor_store_name_by_post( $product->get_id() );
    	return $value;
    }
    add_filter( 'woocommerce_product_export_product_column_store_name', 'add_export_data_store_name', 10, 2 );
    
    add_filter( 'wcfm_free_plan_payment_message', function( $label ) {
    	return 'This is our free plan, there is no payment required.';
    });

    Add custom code(s) to your child theme’s functions.php
    In case you do not have child theme then add those using this plugin –?https://www.ads-software.com/plugins/code-snippets/

    Now, you will have store and store name column in exported CSV – https://ibb.co/9wNkwY7

    Thank You

    Thread Starter 7acestech

    (@7acestech)

    Hi

    I exported and it worked like a charm.

    Before importing I want to make sure, the following changes would not throw any error:

    1. Change the Store ID and Store NAME – to a different store

    2. Modify the categories.

    3. Add attributes and tags, for each product.

    Thread Starter 7acestech

    (@7acestech)

    @wclovers

    I tried to import, and however there is no option to import the Store/ Store ID. Any way I can add this capability via code, during the import setting of WOOCOMMERCE?

    Plugin Author WC Lovers

    (@wclovers)

    To import there should be a column “store” and specify vendor user ids at that column.

    During import you have to map that field with “Store” – https://ibb.co/tzmLVBc

    Thank You

    Thread Starter 7acestech

    (@7acestech)

    @wclovers

    I do not have what you have. See my screen shots

    https://ibb.co/kKPgbSy

    https://ibb.co/MR848yP

    • This reply was modified 4 years, 8 months ago by 7acestech.

    I have used the hook, but I have a problem, only the “Store” field appears, but “Store Name” is not available in the selection list. This from the administrator panel.
    Is the code missing something?

    Just to clarify, the code works and fulfills what was promised. But to improve, you should add the missing field.

    Hey @7acestech! I have recently created a non-profit marketplace and am in the process of finalizing the website. I would love to know the scraping plugin you used to get products from other partner websites without creating each product individually.

    What’s the name of the plugin?

    Thread Starter 7acestech

    (@7acestech)

    @chrishouse180 I used Octolooks scrapes at the time of this post.

    However I would not recommend it. Support was not great and I ended up writing a code for my needs. If I could go back in time, I would not buy it.

    Ahh okay. Thanks for the reply bro

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘WCFM Woocommerce product export import’ is closed to new replies.