There are a number of e-commerce frameworks available in market, but Magento is one of the most popular choices for medium-to-large-scale portals. Its feature set and its architecture help set it apart from many of the other options available today. Along with the third party extensions, you can also develop your own module in Magento.
In one of the websites, it was required to add an event module to enable the client to add events with photos, videos and other details. But even after spending a couple of hours, I couldn’t find any solution to fit with my requirements. Finally, I decided to develop a custom event module that would enable users to do the following:
- Add/edit event.
- Manage event to add photos and YouTube videos.
- View the event on Google map with marker that differentiates between upcoming, current and past event.
Below is the screen shown, where you can add/edit event information:
Screen to mark location on map
You need to enter event venue in address field and it will then automatically locate location on map with marker. You can drag and drop the marker to adjust the location and save the event.
Here is the screen showing the front end view of the event created:
Past event detail For the past event, you can add photos and YouTube videos. It will be shown on the event details page as below: To change the default map to other country, open the following file: “App/design/frontend/base/default/template/advaiya/event” Open list.phtml file and update the latitude and longitude as country specific (default is US lat , long) geocoder = new google.maps.Geocoder(); var latlng = new google.maps.LatLng(39, -95); Upload files to Magneto main folder and login/relogin into admin panel to install the module. Once the module is installed, it will show up in the top navigation named ‘event’. The sample code for the same can be downloaded here.
Have anything to add? Please don’t hesitate to leave your comments or questions below!