Difference between revisions of "Extension talk:MarketResearch"

From Organic Design wiki
m (possible to make the shopping cart page open up "inside" the jumppage?)
m (updating)
Line 108: Line 108:
  
 
==todo==
 
==todo==
in special jump page
+
==in article:==
*include price at bottom of jump page article: price="3850"
+
*replace all product info with link "more info & ordering" which takes you to jump page
**append ''$'' and cat ''.00 USD'' to price
+
(currently, it has a link of each and every available product)
*add text buy link (http://www.marketresearch.com/feed/cart/addtocart.asp?partnerid=951781402&productid=xxxxxxx)
+
 
*add text link to add to shopping cart at top of page, and at bottom next to buy link
+
===in special jump page===
 +
*change rendered text name of jump page to "Details on This Report"
 +
*Navigation on top/bottom needs to be links to:
 +
**View Cart
 +
**GovITwiki Research Report Store [[GovITwiki Research Report Store]]
 +
**back button (javascript)
 +
 
 +
*article text
 +
 
 +
*for each available product need
 +
**Product Name (currently on Article Page that links to jump page)
 +
**include price at bottom of jump page article: price="3850"
 +
**"add to cart" link (http://www.marketresearch.com/feed/cart/addtocart.asp?partnerid=951781402&productid=xxxxxxx)
  
 
==tbd==
 
==tbd==
*waiting for client to give me input on location of buttons/icons and if he wants the price on the summary pre-jump...
 
 
*is it possible to make the shopping cart page open up "inside" the jumppage? no biggie....
 
*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
 +
 +
==todo for market research==
 +
 +
*currently giving no XML response, have open ticket.
 +
*There are currently no items in your shopping cart.
 +
Please, continue shopping.  LINK IS WRONG

Revision as of 22:28, 21 August 2008

{{#security:*|Nad}}

Todo

  • Cache and check modified date before retrieving entire content
  • Add args for max description length, and max results

Input

<marketresearch>term-1,term-2,term-n</marketresearch>
might want to do
<marketresearch>term-1+term-2+term-n</marketresearch>
to make it neater.

The usual way to have 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

http://www.marketresearch.com/feed/search_results.asp?bquery=computers&partnerid=951781402

just one term is fine for now, have a call in to see how they handle multiple.... --Phalseid 05:47, 11 July 2008 (NZST)
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:

  • replace all product info with link "more info & ordering" which takes you to jump page

(currently, it has a link of each and every available product)

in special jump page

  • change rendered text name of jump page to "Details on This Report"
  • Navigation on top/bottom needs to be links to:
  • article text

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

todo for market research

  • currently giving no XML response, have open ticket.
  • There are currently no items in your shopping cart.

Please, continue shopping. LINK IS WRONG