• Resolved mattyf

    (@mattyf)


    Hi

    Just been testing your plugin (which is excellent!) and have a question related to the notification emails.

    There are plenty of options for notifications which works perfectly however the {review_link} directs to the admin page of the review and I have customers who don’t have/want admin access and just want to be able to see it on the product page directly… is there a tag I can add to the notifications for the product page url for the page the review was actually left on?

    Also will be upgrading to to premium later and wondered if you had either a voting option or social sharing option (on a good review of course!) included in your roadmap?

    Thanks Matt

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Gemini Labs

    (@geminilabs)

    1. The only problem with this is that reviews do not have permalinks, so you cannot currently link to a specific review on your website. An update is planned at some point which will allow this (similar to how Tripadvisor does), but at the moment it does not.

    However, this is how you can modify the {review_link} tag. I have added #review-<ID> to the URL as that is possibly what will be used at some point to link to specific reviews.

    /**
     * Change the {review_link} notification tag to the URL of the review form page
     * @param array $data
     * @param \GeminiLabs\SiteReviews\Modules\Email $email
     * @return array
     */ 
    add_filter('site-reviews/email/compose', function ($data, $email) {
        if (isset($_POST['site-reviews']['_post_id'])) {
            $postId = $_POST['site-reviews']['_post_id'];
            $href = get_the_permalink($postId);
        }
        if (!empty($href)) {
            $review = $email->data['review'];
            $publicLink = sprintf('<a href="%1$s#review-%2$s">%1$s</a>', $href, $review->ID);
            $data['template-tags']['review_link'] = $publicLink;
        }
        return $data;
    }, 10, 2);

    2. These features are planned for future add-ons. See: https://github.com/pryley/site-reviews/blob/develop/ROADMAP.md

    Thread Starter mattyf

    (@mattyf)

    Thanks for this it worked perfectly ??

    Roadmaps looks excellent… will purchase premium tomorrow!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Notification link’ is closed to new replies.