How can I add Create review button
reopened

By Alexandr Spirov, 5 years ago

I'm using premium version, and I would like to add write review button on store reviews page. How can I do that?

By Petr Hučík, 5 years ago

You can edit template

views/templates/front/store-review.tpl

and add this content:

{strip}
  <button id="store-review-trigger">{l s='Write review' mod='revws'}</button>
  <script>
    $(function() {
        $('#store-review-trigger').click(function() {
            window.revws({
                type: 'TRIGGER_CREATE_REVIEW',
                entityType: 'store',
                entityId: 1
            });
        });
    })
  </script>
{/strip}
By AdrianyMG -, 5 years ago

I did not get the idea, so how did you make a button to leave comments on the home page about the store?

By Petr Hucik, 5 years ago

The snippet above is complete. It will render button. When you click on that button then revws module will display store review popup window.

Note that store review is premium functionality, so this snippet will *not* work in free version. There, you can create similar functionality to trigger product review request.

By AdrianyMG -, 5 years ago

ok, thx , but a link to the store review page exists or can be created?

By AdrianyMG -, 4 years ago

hi, i use the paid version, on a 1.7.6.1 service but unfortunately it does not work (I copied and pasted what is here) but at the click on the add review nothing happens. Maybe someone can help me, I see that the technical side is quite difficult, and this is a disadvantage

By AdrianyMG -, 4 years ago