WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
How to set default product type to external (7 posts)

  1. jochemdu
    Member
    Posted 1 year ago #

    How can i set the default product type to "external"?

    I really want to know because my product catalog is imported automatically and they won't show up on the website until i change the product type to external.
    The category count is updated but the products won't show.

    http://wordpress.org/extend/plugins/woocommerce/

  2. bheadrick
    Member
    Posted 1 year ago #

    can you not include the product type as part of your import process? product type is a taxonomy (taxonomy name of 'product_type')

  3. jochemdu
    Member
    Posted 1 year ago #

    Thanks bheadrick for your answers, I totally missed that.. Sometimes it's easier then it looks. I got sidetrailed because i looked at the way how it worked and noticed that it writes to the wp_options table.

    I did manage to classify it as "external" product_type at the automated import and it shows in the backend as an external/affiliate product_type BUT there is a big catch. It still does not show up in the frontend and the reason for this is that if i open the product and save it again, ONLY then it writes to the "wp_options" with the following values.

    option_id option_name option_value autoload
    764 _transient_wc_product_type_386 external yes

    The number 386 is the postid from wp_posts. It does not automatically write these values to wp_options. Would it not be better to write this value to a postmeta field?

    I think it's a bit strange for a post_type to write to the options table, that would be suitable for plugin's, theme's and the wordpress core?

  4. bheadrick
    Member
    Posted 1 year ago #

    transient values are like a form of database caching, and they always go in the options table, but that should not required for the product to be displayed.

  5. jochemdu
    Member
    Posted 1 year ago #

    Ok thank you did not know that about transient values.
    I found the problem. I had to set the metakey "_visibility" to value "visible" during the automated import...

  6. Julianali
    Member
    Posted 1 year ago #

    Hallo Jochem,

    Hoe heb je dit nu opgelost?

    Ik probeer te gebruiken:

    Name Value

    _product_type external

    _visibility visible

    Maar dat werkt nog niet. Kun je me helpen?

  7. jochemdu
    Member
    Posted 1 year ago #

    Hi Julianali,

    This is an English website, please try to respond in english so other people can read it and help you out as well.

    What kind of plugin do you use for the import?
    Do you have an example site to show?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic