Showing results for 
Search instead for 
Did you mean: 

Adding "virtual try now" feature

Adding "virtual try now" feature

Hello folks,

I am new to Majento. I am trying to build "virtual try now" feature in Majento. What I need is:

  1. Add button on products detail page.
  2. On click on button, show overlay that can launch angular application. (I guess if overlay can be opened, adding iFrame and content inside can be done)

Overlay would communicate with camera and show how product will appear when actually wore. I do have working Angular application that can do virtual try now function. What is needed is opening my application from Majento.


Could you please identify good sources to refer to.


Each and every help is appreciated.


Re: Adding "virtual try now" feature

To add a "virtual try now" feature to a Magento website, you can follow these steps:

  1. Create a custom button on the product detail page using Magento's layout and template system. You can refer to Magento's documentation for more information on creating custom buttons.

  2. When the button is clicked, use JavaScript to display an overlay on the page. You can use CSS to style the overlay and make it look like a modal window.

  3. Inside the overlay, you can add an iFrame that loads your Angular application. You can set the iFrame's source to the URL of your application.

  4. To communicate between the overlay and your Angular application, you can use JavaScript's postMessage API. When the user interacts with your application, you can send messages to the parent window (i.e. the overlay) to update the UI or close the overlay.

  5. To ensure a seamless user experience, you should optimize the performance of your Angular application and make sure it loads quickly.

You can refer to Magento's developer documentation and forums for more information on implementing these steps. Additionally, there are third-party extensions available for Magento that provide similar functionality, so you may want to consider using one of those if they meet your needs.