Knowledgebase
Does the Feed Manager export product options / variants ?
Posted by - NA - on 07 December 2010 11:37 AM
|
|
SolutionFeed Manager 1.0 does not support variants. Feed Manager 2.0 supports variants for x-cart 4.1.X and above. You can access the variants and product options through code. For example, if you have a book with a variant named "Cover" with the options of "Hardback" and "Paperback" you can use custom php code like this to print out the variant value: $field_value = $data['variant_options']['Cover']; This will print out "Hardcover" or "Paperback" in your feed. If you have a product with multiple variant options, you can modify the code above to include several options. For example, if you have a shirt with three variants named Size, Color, and Style, you can use custom php like this to print out the combined variant value: $tmp = array(); foreach ($data['variant_options'] as $k => $v) { $tmp[] = sprintf('%s: %s', $k, $v); } $feed_value = implode(', ', $tmp); This will print out a combination like "Color: Blue, Style: Short-sleeve, Size: Large" in your feed. | |
|
Comments (0)