0

I'm trying to make customer reviews appear on the PDP page without clicking on the reviews button. On reviews tab click, ajax request is being sent to the server and I want to send this request on page load, however I could not find the file where the click event is written. Any kind of help would appreciated

This is the js file: vendor/magento/module-review/view/frontend/web/js/process-reviews.js

enter image description here This is the reviews tab, clicking on it triggers ajax request send and I want to do it on page load

($(document).ready(function ($) {}) - using jQuery for example)

1 Answer 1

0

If you are looking to switch to that tab, a simple way to do it would be to use jquery's .click() function such that:

$(document).ready(function ($) {$("#tabid").click();})
2
  • No I don't want to switch to that tab, I simply want to send ajax request
    – Hgresa
    Commented Jul 16, 2021 at 6:09
  • Do you want to send it on page load or when the tab is clicked?
    – joeybab3
    Commented Jul 16, 2021 at 15:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.