I am developing a affiliation website for products similar to http://www.mysmartprice.com or http://www.smartprix.com/ but I am facing problem in design is database.
My approach:
- I first downloaded XML of each website which are provided by the ecommerce website itself. It contain the detail of products on that website.
Sample XML file
<Product><ProductID>41410399</ProductID>
<ProductSKU>B00LTUN476</ProductSKU>
<ProductName>Micromax Canvas HD Plus A190 (White)</ProductName>
<ProductDescription>8MP primary camera with full HD video recording, LED flash, 4x digital zoom, auto focus and 2MP front facing camera 5-inch HD capacitive touchscreen with 1280 x 720 pixels resolution Android v4.4.2 KitKat operating system with 1.5GHz hexa core processor, 1GB RAM and 8GB internal memory expandable up to 32GB 2000mAH battery providing talk-time up to 7 hours and standby time up to 250 hours on 2G networks 1 year manufacturer warranty for device and 6 months manufacturer warranty for in-box accessories including batteries from the date of purchase</ProductDescription>
<ProductPrice>8069.00</ProductPrice>
<ProductPriceCurrency>INR</ProductPriceCurrency>
<WasPrice>0.00</WasPrice>
<DiscountedPrice>0.00</DiscountedPrice>
<ProductURL>http://clk.omgt5.com/?AID=630405&PID=13171&Type=12&r=http://www.amazon.in/dp/B00LTUN476/ref%3Dasc_df_B00LTUN47626216749/</ProductURL>
<PID>13171</PID>
<MID>661795</MID>
<ProductImageSmallURL>http://ecx.images-amazon.com/images/I/51EbrIOWRtL._SL75_.jpg</ProductImageSmallURL>
<ProductImageMediumURL>http://ecx.images-amazon.com/images/I/51EbrIOWRtL._SL160_.jpg</ProductImageMediumURL>
<ProductImageLargeURL>http://ecx.images-amazon.com/images/I/51EbrIOWRtL.jpg</ProductImageLargeURL>
<MPN>MCX_A190_WHE</MPN>
<StockAvailability>Usually dispatched within 24 hours</StockAvailability>
<Brand>Micromax</Brand>
<custom1>Shipping Charge INR -0.00</custom1>
<CategoryName>Smartphones</CategoryName>
<CategoryPathAsString>Root|Electronics|Categories|Mobiles & Accessories|Smartphones & Basic Mobiles|Smartphones|</CategoryPathAsString>
</Product>
I made separate table for each website. And one table for my website i.e my_table, which has product name and some details
Whenever a product is searched it fetched from my_table and it searches from other website tables and shows me the same product with its price on different websites.
My questions are:
- Is my approach correct?
- The ecommerce websites does not provide product description separately. They provide it in a paragraph manner. So how can I use filters in different products because manually inputting data is not feasible for 2 million products.
- How to make an API so that if there is any change in price of product on any web site it directly reflects on my website?