Extension talk:MarketResearch
{{#security:*|Nad}}
Contents
Input
many items in a tag are with separate lines,
<marketresearch> term-1 term-2 term-n </marketresearch>
- --nad 09:39, 12 July 2008 (NZST)
<php>$keywords = preg_split('/[\x00-\x1f+,]+/', trim($input));</php> This allows any of the forms above --nad 21:52, 12 July 2008 (NZST)
which will give formatted data from
- multiple is done in the form foo+bar:
http://www.marketresearch.com/feed/search_results.asp?bquery=computers+monitor&partnerid=951781402
--Phalseid 02:52, 12 July 2008 (NZST)
Process
the parsing needs to give
- the <TITLE>
- a snippet of the article(s)<DESCRIPTION></DESCRIPTION>
- the product id which is BUY id from the resultant XML file... (<BUY id=xxxxx)
Output
shows the title, description, and a link to buy it...
http://www.marketresearch.com/feed/cart/addtocart.asp?partnerid=951781402&productid=xxxxxxx
--Phalseid
Development
The current version is working and tested, check it out and give me some feedback. Its not caching yet, so there's quite a delay on page load and it will fail if the feed doesn't return valid xml etc. To use it include it like normal and set you partner id as in the following example: <php> include("$IP/extensions/MarketResearch.php"); $wgMarketResearchPartner = "951781402"; </php> The rendered output is in the following format, design aspects should be made as CSS rules in MediaWiki:Common.css.
<div class="marketresearch"> <div class="marketresearch-item"> <h3>Men's and Boys' Clothing</h3> <p>This report analyzes the worldwide markets for Men's & Boy's Clothing in Millions of US$. The specific product segments analyzed are Suits, Coats & Jackets, Shirts, T-Shirts, Trousers, Slacks and Jean...</p> <ul> <li><a href="...addtocart.asp?partnerid=951781402&productid=1281401">1281401</a></li> </ul> </div> <div class="marketresearch-item"> <h3>Fashion and Media - UK</h3> <p>Fashion brands and retailers have a long-standing relationship with women's magazines and, more recently, with men's magazines. Television has been used to a lesser extent, particularly as it is very ...</p> <ul> <li><a href="...addtocart.asp?partnerid=951781402&productid=1089359">1089359</a></li> <li><a href="...addtocart.asp?partnerid=951781402&productid=1089358">1089358</a></li> </ul> </div> <div class="marketresearch-item"> <h3>Clothing Retailing - UK</h3> <p>The clothing sector is the second largest in UK retail. The influx of value fashion has forced the specialists to re-think their value proposition, with the mid-market in particular feeling the squeez...</p> <ul> <li><a href="...addtocart.asp?partnerid=951781402&productid=1562450">1562450</a></li> <li><a href="...addtocart.asp?partnerid=951781402&productid=1562451">1562451</a></li> <li><a href="...addtocart.asp?partnerid=951781402&productid=1562452">1562452</a></li> </ul> </div> </div>
Jump Page
Some new changes. the API supplier is requiring us to use a "Jumppage" File:Jumppage.pdf. Please take a look at this and email me your revised quote for financial and chronological requirements.--Phalseid 06:19, 17 July 2008 (NZST)
sure...search string --> <---xml--> results in article --->jumppage (details of selected article)
- Jump page would probably be best as an unlisted specialpage which is linked to by the buy links
- An extra tag added for rendering links to the shopping cart so that it can be added to nav or personal urls etc
- Index of Articles that are returned (Table of Contents on the "Jump page") -note this is NOT not a table of contents for the ARTICLE!-we don't get that back in the XML file!
- Article Title
- is it possible to search in article(?)
- Full Article Description (all text that comes back from the XML file for that article..some are short, some are quite lengthy)
- Link to Buy Article(s)
- Link to go back to the top (Table of Contents)
- Link to the Shopping cart (No Dynamic Shopping Cart-that is possible but im guessing out of your budget). The shopping cart you get is the one from MarketResearch. I thought we could put it in the page like your illustration, but it looks like crap when it is resized....so it must be a link only...
- Cache pages so they load fast
- Assign maximum number of articles to return from query (minimum will always be 0!)
- Text (or image) Link to shopping cart in main navigation in case the user navigates away from the page...they can always complete purchase!
TODO
in article:
Article Name by <Vendor> -- need to add vendor details from XML file...doneexpand sample text out to 500 characters.donereplace all product info with link "more info & ordering" image which takes you to jump page (currently, it has a link of each and every available product)done
- Images must be in MarketResearch/images, I don't get how you want to deal with multiple buy links
two word queries not workingcan't see a problem here, works fine for me
in special jump page:
change rendered text name of jump page to "Details on This Report"doneArticle Name by Vendor -- need to add vendor details...doneextra <P> tags showing up in http://www.govitwiki.com/wiki/Special:MarketResearch/satellite/1225858
This is a problem with the content it has invalid HTML, the <P>'s open but don't close. I've tried outputting them as raw html which may help
Navigation on top/bottom needs to be links to: View Cart | GovITwiki Research Report Store | Backdone
- $wgMarketResearchName and $wgMarketResearchLink to change the middle link and text
for each available product need: as a select box:doneProduct Name (currently on Article Page that links to jump page)doneinclude price as part of <li> jump page article: price="3850"doneappend $ and cat .00 USDdone
tbd
- is it possible to make the shopping cart page open up "inside" the jumppage? no biggie....
- is it possible to do a search of reports only
- Ok link goes back to the page with the original search on it that you got to the special page from. It would be possible to embed the search within an iFrame, but I'd have to add another $50 cos too many currently are taking longer than expected... --nad 15:32, 26 August 2008 (NZST)
- go ahead and do the search, will pay.... --Phalseid 16:31, 26 August 2008 (NZST)
todo for market research
- There are currently no items in your shopping cart.
Please, continue shopping. LINK IS WRONG
- this note is for the MarketResearch folk, not NAD. --Phalseid 16:30, 26 August 2008 (NZST)