• Resolved samuelnovotny1

    (@samuelnovotny1)


    <product>
    <title>Bed</title>
    <sku>6574</sku>
    <description></description>
    <image></image>
    <quantity></quantity>
    <category></category>
    <price></price>
    </product>
    
    <product>
    <title>Bed - white</title>
    <sku>6574,white</sku>
    <description></description>
    <image></image>
    <quantity></quantity>
    <category></category>
    <price></price>
    </product>

    Please, can anyone help me with this type of feed? I do not know how to import such variable products. Variations have a parent, but the color is stored in the SKU box after the comma.

    Hope, someone can help me.

Viewing 1 replies (of 1 total)
  • Plugin Author WP All Import

    (@wpallimport)

    Hi @samuelnovotny1

    We have instructions on importing variable products here: http://www.wpallimport.com/documentation/woocommerce/variable-products/. Since your data doesn’t match the requirements, you can use custom PHP functions to manipulate it during the import: http://www.wpallimport.com/documentation/developers/execute-php/.

    For example, this would let you strip the color from the title and match all of the products together (using the “All variations for a particular product have the same title as the parent product.” option):

    [trim(strtok({title[1]},"-"))]

    And this would get the color out of the title (for use in the “Attributes” tab):

    function my_get_attribute( $title ) {
    	if ( ! strpos( $title, "-" ) ) return;
    	
    	return trim( substr( $title, strpos( $title,"-" ), strlen( $title ) )," -" );
    }

    Example usage:

    [my_get_attribute({title[1]})]

Viewing 1 replies (of 1 total)

The topic ‘Import variable products’ is closed to new replies.