0
votes

I'm having a modal that loads different content (imagine different profiles for products), and I want to add a review section for a product in the modal. I thought about making it by myself, but the HTML markup, PHP backend handling, comment reply, and image upload all that are just very complicated (and time consuming). So I decide to use Disqus. I've used Disqus before. I know it works pretty fine with stand alone pages. What I'm not sure if how it will work with ajax loaded Modal? For example, how does Disqus know the product is different and the comment section should change accordingly?

Since I'm using AngularJS framework, I checked out this nice directive: https://github.com/kirstein/angular-disqus/wiki Well, this still doesn't explain how should I let disqus know the product is different, and it needs to generate a different comment section.

Can I get any help from here?

1
Disqus is simple you just need to drop the integration <script> tag right at the bottom of the HTML layout of the modal. Pay attention that Disqus requires a unique URL for the page otherwise all the products you have will share the same comments thread! - Ahmad Alfy
@AhmadAlfy Yes that's actually my question, so I need to change the url each time I display a different product in the modal? - windweller

1 Answers

1
votes

Your problem is you need to set the unique Disqus identifier

More about it here

Example:

The following uses a unique id (maybe your product ID) as an identifier.

var disqus_identifier = '2583573';