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:

  1. Add/edit event.
  2. Manage event to add photos and YouTube videos.
  3. 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: Magento development 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!

Posted by Advaiya

    Let's connect to make technology work for you.





    Please tick the options most relevant to your business challenges
    Decision makingBusiness productivityCustomer experienceTechnology-led innovationDigital transformation


    [By using this form you agree with the storage and handling of your data by this website.]