Stock Price Widget in Sitecore with Google Finance URL

Posted 01/12/2017 by Yogeshwer Sharma

I am sharing about my recently created module Stock Price widget in Sitecore. With the help of this module we can show a stock price widget on our website with the stock details as given below.

Installation of Stock Price Widget Module – 

  1. Download the Sitecore package by clicking here.
  2. Open Installation Wizard in Sitecore and upload the package.
  3. Install Sitecore package.
  4. After successfully installation publish items on below locations –
    1. /sitecore/templates/Stocks
    2. /sitecore/system/Modules/StocksSettings
    3. /sitecore/layout/Renderings/Stocks

How to use this module – 

For demonstration I have added Google share price information, but we can update it for any organization from Sitecore by following below steps - 

  1. Navigate to /sitecore/system/Modules/StocksSettings/StocksSettings path. There are 3 fields as below –
    1. StockServiceURL  - Google Finance service URL which provide stock price details.

      For example I have added http://finance.google.com/finance/info?client=ig&q= URL

    2. StockSymbol – This field is very important field we need to provide the symbol name of our organization. And on the bases of this symbol we can get the stock information of respective company. We can get this symbol from Google.

      For example I have added symbol for Google “GOOGL”

    3. CurrencySymbol  - We can define the currency symbol what we want to set.

      For example I have added “$” as a currency symbol.


         

  2. After entering the details in above field we need to add SharePrice rendering from /sitecore/layout/Renderings/Stocks/SharePrice location to any of the item in content tree.
  3. Provide Datasource of /sitecore/system/Modules/StocksSettings/StocksSettings item to above rendering.
  4. Now just need to run the page and you can see a small stock price widget on website.

Share:

Add your comment

 
 

 

Archive

Syndication