Add file extension validation in magento form by using below code.
Read More…Author: karthi s
Get latitude and longitude using google map api – PHP
Google provides an API to get latitude and longitude based on the valid address. All we need to do is just pass address to that api. We can able to get response in various format. In below code i’m requesting api to return response a json format. If curl is enabled in your server you […]
Read More…Fixed – Quantity defaults to 0 in product view page magento
We might come across the problem, when we go to product view page in magento qty box will show 0 qty as default. We can change the default value by following below steps. Steps to change default qty in product view page 1. Goto Admin page -> System -> Configuration -> Inventory -> Product Stock […]
Read More…Migrate Twitter API from Version 1 to 1.1
My twitter feed response is started showing below message when i was tried to access users_timeline using this URL https://api.twitter.com/1/statuses/user_timeline.xml?include_entities=true&include_rts=true&screen_name=karthi0110&count=1 “The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview.” I have tried by replacing version 1 to 1.1 in the request URL https://api.twitter.com/1.1/statuses/user_timeline.xml?include_entities=true&include_rts=true&screen_name=karthi0110&count=1 it shown “Bad Authentication data” error. […]
Read More…Adding cusom options automatically to magento products
Hello friends in this post i’m going to give you a nice code to add custom options to your product when it is saved. After searching long time got good resources with that i have created an event to add custom options. Magento having lot of feature to customize the product We can add different […]
Read More…Convert long url to short url using tinyurl api
Tinyurl provides us a short and simple service to convert long URL to small(tiny) URL. We can send email without link breakage.Here is the tinyurl api to get shorten url. You can use any of the method. Method 1: Use file_get_contents to fetch tinyurl. echo file_get_contents(‘http://tinyurl.com/api-create.php?url=http://www.websnippetz.com’); file_get_contents is not working? If your are able to […]
Read More…