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 –
- Download the Sitecore package by clicking here.
- Open Installation Wizard in Sitecore and upload the package.
- Install Sitecore package.
- After successfully installation publish items on below locations –
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 -
- Navigate to /sitecore/system/Modules/StocksSettings/StocksSettings path. There are 3 fields as below –
- 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
- 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”
- CurrencySymbol - We can define the currency symbol what we want to set.
For example I have added “$” as a currency symbol.
- 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.
- Provide Datasource of /sitecore/system/Modules/StocksSettings/StocksSettings item to above rendering.
- Now just need to run the page and you can see a small stock price widget on website.