WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Product_type external via WP All Import

[Resolved] Product_type external via WP All Import

Viewing 12 replies - 1 through 12 (of 12 total)
  • So, you’re importing products using a non wc importer, and you want to have it set the product type to external, correct?

    Personally, I use WP CSV Importer to import my products, and it suits my needs pretty well. I need to fork it and add support for featured image, but anyway…

    I’m assuming the plugin you’re using gives you the ability to use custom taxonomies, yes? Simply use it to set the term for the “product_type” taxonomy to “variable”

    That is correct.
    I’ve setup these custom fields:
    http://img507.imageshack.us/img507/6885/schermafbeelding2012111.png
    But my products keep getting uploaded as simple products instead on external.

    custom fields (aka postmeta) are different from taxonomies. Product categories, product tags, and shipping classes are other examples of taxonomies – did the plugin auto-detect those, or did you have to add them manually?

    product_type is the same type of thing as product categories

    Here’s where it’s registered:
    register_taxonomy( ‘product_type’,
    array(‘product’),
    array(
    ‘hierarchical’ => false,
    ‘update_count_callback’ => ‘_update_post_term_count’,
    ‘show_ui’ => false,
    ‘show_in_nav_menus’ => false,
    ‘query_var’ => $admin_only_query_var,
    ‘rewrite’ => false
    )
    );

    I’m guessing one of these false’s is why it’s not showing up for you.
    Since the plugin you’re working with is a paid plugin, you should be able to contact the developer to help you out with getting the plugin to work for this purpose

    hi bheadrick,

    Thank you very much!
    I’ve changed everything to ‘true’ and now it’s showing up in my admin area!

    In case someone needs the same, I’ve changed the files:
    – woocommerce.php
    – admin/woocommerce-admin-import.php

    Sure, it works, but the next time a woocommerce update comes out, you’ll have to go hack up those files again – I guess it’s not such a big deal since we’re talking about importing and not something the site depends on constantly.

    I don’t believe wordpress actually has methods available to override taxonomyies, though. I think you’d have to unregister it and reregister it if you wanted to avoid hacking the woocommerce plugin.

    Here’s how you would unregister the taxonomy:

    add_action( 'init', 'unregister_taxonomy');
    function unregister_taxonomy(){
    	global $wp_taxonomies;
    	$taxonomy = 'product_type';
    	if ( taxonomy_exists( $taxonomy))
    		unset( $wp_taxonomies[$taxonomy]);
    }

    Maarten1234,

    What did you change in – admin/woocommerce-admin-import.php ?

    I changed everything to true, and set the name and value just as your screenshot.

    The products show up on the website, but in the admin the products still are set as Simpel product instead of External product.

    Can you help me? I’m dutch so…

    If you enable those fields, a new categories field comes up on the Settings page:
    http://imageshack.us/photo/my-images/694/schermafbeelding2013011j.png/
    fill that one with “external” and all products should appear as External prods.
    Succes 😉

    That works but in so far that i do have to open the posts and save it before it works!

    How did you fix this?

    Dankje;)

    I deleted all posts (products) and imported the whole feed again 🙂

    WORKS!

    Wow something things can be so simply;)

    Thank you for your help Maarten:)

    Hi Maarten,

    I’ve been trying to do this aswell but i can’t really dertermin if ive a problem with my wordpress or if im bilnd. Where exactly do you go to edit that taxonomy?

    Seems i can’t find it after i’ve set all bools to true.

    It changed. Here’s how to do this in WP All Import 3.0: http://www.wpallimport.com/wp-content/uploads/woocosettings.png

    Notice the “external” in the Tags box.

    For anyone reading this thread and looking for WP All Import support, we don’t handle it on the WP.org forums. We do answer requests submitted through our support desk in a timely manner: http://www.wpallimport.com/support

    Louis

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Resolved] Product_type external via WP All Import’ is closed to new replies.