Import and Export XML data

  • Posts: 35
  • Thank you received: 1
12 years 3 months ago #56842

Hi There

I was wondering if it is possible (even with some modifcations or development) to use specific XML files for importing and exporting data in and out of Hikashop.

My client has a sophisticated POS system that takes care of inventory, sales and memberships throughout their organisation. So I am looking in to the possibility of importing their current product catalogue and users using their XML data and exporting the Hikashop sales to import back in to their POS system to track sales and update quantities etc.

Below are 3 samples of the xml files:

XML for products - need to IMPORT this in to Hikashop

<Product>
	<MasterGroupID>3</MasterGroupID>
	<MasterGroupName>Wine</MasterGroupName>
	<GroupID>676</GroupID>
	<GroupName>Wine - Red - Shiraz Blends</GroupName>
	<CategoryID>34</CategoryID>
	<CategoryName>2 for Deal</CategoryName>
	<Name>Pillar Box Red</Name>
	<Code>19218</Code>
	<ExtraDescription>This will be the description of the product with lots of detail.</ExtraDescription>
	<NormalPrice>12.9500</NormalPrice>
	<PriceRetail>12.9500</PriceRetail>
	<StockLevel>60</StockLevel>
	<SubCode>5766</SubCode>
	<Quantity>55</Quantity>
	<Vintage></Vintage>
	<CustomVarChar1>750ml</CustomVarChar1>
	<CustomVarChar2>South Australia</CustomVarChar2>
	<CustomVarChar3>Australia</CustomVarChar3>
	<TypeName>Padthaway</TypeName>
	<IsSpecial>0</IsSpecial>
	<IsVisible>1</IsVisible>
	<InternetSpecial>0</InternetSpecial>
	<Rating>0</Rating>
	<Weight>1.3400</Weight>
	<CreatedDate>2008-05-04T23:21:46.687</CreatedDate>
	<NewRelease>N</NewRelease>
	<InternetAuction>N</InternetAuction>
</Product>

XML for sales - need to EXPORT this from Hikashop
<Sales>
  <Sale>
    <ID>2120157</ID>
    <SaleDate>2012-05-17 21:20</SaleDate>
    <TillID>1000</TillID>
    <MemberID>1</MemberID>
    <Transactions>
      <Transaction>
        <PLU>3313</PLU>
        <Quantity>1</Quantity>
        <UnitPrice>699</UnitPrice>
        <TotalDiscount>0</TotalDiscount>
      </Transaction>
      <Transaction>
        <PLU>20071</PLU>
        <Quantity>4</Quantity>
        <UnitPrice>4990</UnitPrice>
        <TotalDiscount>0</TotalDiscount>
      </Transaction>
    </Transactions>
    <Payments>
      <Payment>
        <MediaID>2</MediaID>
        <Amount>20659</Amount>
      </Payment>
    </Payments>
  </Sale>
</Sales>

XML for users - need to IMPORT this to Joomla/Hikashop
<Members>
  <Member>
    <ID>4</ID>
    <Name>John Smith</Name>
    <Email>jsmith@nowhere.com</Email>
    <Password>p@$$word</Password>
  </Member>
</Members>

Thanks!!!

Please Log in or Create an account to join the conversation.

  • Posts: 82760
  • Thank you received: 13347
  • MODERATOR
12 years 3 months ago #56859

Hi,

1. In order to import the XML for the products, the easiest would be to convert it into a CSV. Either via a script you would write or a tool online like this one:
www.luxonsoftware.com/opensource/xmltocsv

2. In order to export orders in XML, you will have to change the code of the file "export" of the view "order" for your back end template via the menu Display->Views.

3. Importing users into joomla is not related to HikaShop.
Once users will be in joomla, HikaShop will be able to "see" them.
You will find several solutions for importing users into joomla:
extensions.joomla.org/extensions/migrati...sers-import-a-export
I don't know if any supports XML, but if that's not the case, you should ask them.

The following user(s) said Thank You: shifty_

Please Log in or Create an account to join the conversation.

  • Posts: 15
  • Thank you received: 1
12 years 2 months ago #63970

nicolas wrote: Hi,
..../

2. In order to export orders in XML, you will have to change the code of the file "export" of the view "order" for your back end template via the menu Display->Views.

/....


Hi,

I'm using Hikashop Business edition and I'm needing to export order info to XML when order gets "shipped' status. This XML file is for UPS (see more here : devwiki.volusion.com/index.php/UPS_WorldShip )

I'm no PHP crack, but I'd like to know where I can get more info on how to transform that CSV export to XML export & better yet, have it sent via e-mail to UPS (any examples or tutos welcome).

I hope I'm not the only one needing this and maybe someone has already come accross a solution to this.

Thank you

Please Log in or Create an account to join the conversation.

  • Posts: 82760
  • Thank you received: 13347
  • MODERATOR
12 years 2 months ago #64124

Hi,

In the file "export" of the view "order", HikaShop echo the data of the orders with the CSV format. You will have to change it to echo the data with the XML format of UPS.

Please Log in or Create an account to join the conversation.

  • Posts: 79
  • Thank you received: 1
11 years 6 months ago #101107

Hi, is there any sample file for this instruction
In the file "export" of the view "order", HikaShop echo the data of the orders with the CSV format. You will have to change it to echo the data with the XML format of UPS.

I realy would love to export the csv into xml data but haven´t got a clue how to manage this. Probably there is a smiple manual for dummies? Which erp system do the most hikashop customers use normaly?

Please Log in or Create an account to join the conversation.

  • Posts: 82760
  • Thank you received: 13347
  • MODERATOR
11 years 6 months ago #101321

Each ERP will have a different XML format. So we cannot provide a simple manual as it would have to be different for each erp. Thus it requires a developer in order to make it compatible with your ERP format.

I guess that openERP must be used a lot. They have an import tool which handles CSV imports:
doc.openerp.com/v6.1/book/8/8_20_Config/...g_import_export.html

The following user(s) said Thank You: Georg

Please Log in or Create an account to join the conversation.

Time to create page: 0.080 seconds
Powered by Kunena Forum