Import Data from XML File and Export Attributes to XML File
Posted by Wayne Smith, Last modified by Doug Borowski on 07 May 2012 04:24 PM
Module: Export Attributes to XML File
Description: Exports Product Attributes and Attribute Templates assigned to Products to Provisioning file (Filename is user specified. Default: provide.xml). Gives an option to then email that file (Email Address is user specified. Default: Store email).
Provisioning File Description (Tags in bold represent parent level tags):
ProductAttribute_Add - Takes one parameter (product_code). Tells provisioning system to assign the attribute in this tag to the product_code specified.
Code - Attribute Code
Type - Attribute Type
Prompt - Attribute Prompt. Must be encapsulated in as this field may contain HTML.
Image - Attribute Image.
Price - Attribute Price.
Cost - Attribute Cost.
Weight - Attribute Weight.
Required - Yes/Empty or 1/0. Specify Yes or 1 if this Attribute is Required and leave this tag blank if itâ€™s not.
ProductAttributeOption_Add - Takes two parameters (product_code, attribute_code). Tells provisioning system to assign the option in this tag to the product_code/attribute_code specified.
Code - Option Code
Prompt - Option Prompt. Must be encapsulated in as this field may contain HTML.
Image - Option Image
Price - Option Price
Cost - Option Cost
Weight - Option Weight
DefaultOption - Specify â€œYesâ€ if the option is your default option for this attribute. Otherwise donâ€™t include this tag.
ProductAttribute_Add_Template - Takes one parameter (product_code). Tells provisioning system to assign the attribute template in this tag to the product_code specified.
AttributeTemplateCode - Attribute Template code.
Module: Import Data from XML File
Description: Imports Provisioning XML Formatted file or a fragment of XML into the store youâ€™re running this module in.
To import, simply upload the Provisioning XML Formatted file and select the XML File option. If you wish to receive the log of the import process, specify the email address you want to send the log file to and check the option next to the Email Field. Additionally, you can remove the existing Provisioning log file before you start the Import (for a clean log).
You can also import by selecting the XML Fragment option and specifying a block of Provisioning XML code.
MM Provisioning System uses a specific set of XML tags (defined by us) to allow merchants to backup their data to an XML file. They can then import that data back into Miva Merchant by copying the XML file (must be provide.xml) to their DATA directory. When the user then logs into their store, the system is automatically activated.
With Import Data from XML File, you no longer need access to your DATA directory and can simply run XML instructions inside the module screen.
Example of an XML fragment: