kpeet
Forum Replies Created
-
Or use something like (found on the web), and needs to customize for this function
function aantal_product_sku($sku) { foreach ($sku as $item) { echo "$item\n"; $sku[] = $item; } print_r($sku); }
- This reply was modified 5 years, 4 months ago by kpeet.
In addition to above:
Products with variations,
The first variation (all data) is always te same as the data in the feed it self…So actually the main product will be _sku 10203040, that’s actually the same as variation #1, _sku 10203040 and size Medium…
So the feed without variations has always one field with Variants>variant in it….
See below the feed of a product with multiple variations:
<product> <id>1234</id> <artnr>10203040</artnr> <title>Title of product</title> <description>description of product</description> <brand> <id>63</id> <title>brand name</title> </brand> <date>15-03-2010</date> <modifydate>05-08-2019</modifydate> <variants> <variant> <id>1235</id> <type>S</type> <subartnr>10203040</subartnr> <ean>1212121212121</ean> <stock>Y</stock> <stockestimate>3</stockestimate> <title>Medium</title> </variant> <variant> <id>1236</id> <type>S</type> <subartnr>10203041</subartnr> <ean>1212121212122</ean> <stock>Y</stock> <stockestimate>50</stockestimate> <title>Large</title> </variant> ... ...
See below the feed of a single product:
<product> <id>1234</id> <artnr>10203040</artnr> <title>Title of product</title> <description>description of product</description> <brand> <id>63</id> <title>brand name</title> </brand> <date>15-03-2010</date> <modifydate>05-08-2019</modifydate> <variants> <variant> <id>1235</id> <type>S</type> <subartnr>10203040</subartnr> <ean>1212121212121</ean> <stock>Y</stock> <stockestimate>3</stockestimate> <title>Medium</title> </variant> </variants> ... ...
Do i need to have a functions like: ifthe product has multiple variations (real varion product) skip the first variation in the feed because this is the same as the ‘ primary’ feed in the xml it self?
or do i need to import the feed in a different way before i can synch stock… in a new import?