Total Posts: 3
After searching and finding nothing that met my needs, I found this which did the categories, but I still needed to get access to the child SKUs on an export for batch importing elsewhere via Magmi or similar. I’ve done a full writeup on a blog entry, but the short version is that I’ve added the ability to export both child SKUs of configurable products, and parent SKUs of simple products that are part of a child.
Usage is the same as the original extension, with the addition of a few options at the bottom:
<action method="unparse" type="exportextension/modifier">
- remove_line_breaks: if the value of this tag is âtrueâ, linebreaks will be removed from the content
- remove_html_tags: if the value of this tag is âtrueâ, html tags will be removed from the content
- add_categories: if the value of this tag is âtrueâ, each product will be extended with category names.
The following tags, are only used, if âadd_categoriesâ is âtrueâ. They configure the additional category field:
- category_field_name: this value defines the used name of the category field. The default value of this tag is âcategoryâ. This tag is only expedient, if you export the fieldnames aor if you allready have another field with the defaultname âcategoryâ.
- category_delimiter: if a product is at more than one categories, each category will added and they will be delimited by this string. The default value is â#â.
- category_first_level: this value defines the level of the first exportable category. If it is 2 or greater, the first category names of the category tree wonât be added to the data. The values 1 and 0 are the same, because there is no level 0 - the root category has level 1. If the value is set to â-1â, only the proper category name will be added to the product. The default value of this tag is â1â.
- category_path_delimiter: if the category paths are exported (category_first_level is not -1), each category at the path will be delimited by this string. The default value is â>â. Example: catA1>catA2#catB1>catB2>catB3
- add_absolute_url_to_field; wit this tag you can set a field name, which will be used to add the absolute product link. if this field does not exists, it will be added. if it exists, it will be overwritten.
- add_image_url_to_field; this tag works at the same way, but exports the absolute image link.
- add_parent_sku: If this field is added, the parent SKU of any simple products associated with a configurable product will be added as a field.
- add_child_sku: If this field is added, the child SKUs of any configurable products will be added as a field. If intended for use with Magmi, this should be named as simple_skus.
- child_sku_delimiter: Delimiter for the add_child_sku field, default if unspecified is a comma.
Limitations: This will only currently pull up the first parent SKU of a simple product, if it is assigned to multiple configurables. I didn’t look into that any further at the time. This does not affect child products of configurables, which will be properly seperated by the delimiter specified.
I’ve uploaded the source to GitHub,at https://github.com/microchip/Magento-ExportExtension - both the main extension code, and a prepackaged version in the package folder. Hope it helps save someone the pain I went through trying to figure this out.
Rudi, I’ve sent a pull request, if you’d like to incorporate this back into your original code. I’ve also repackaged it at GitHub, and attached it to this post - it seemed to deserve a .1 version bump with the extra features!
Edit: Re-uploaded package which is now working with Magento 188.8.131.52, it didn’t like the camelcase ExportExtension.