Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter jnasoy

    (@jnasoy)

    Hello Michael,
    After spending more time debugging and contacting our hosting provider, i found out that a certain plugin that was also recently auto-updated was causing the issue.

    Thanks so much for the quick responses, keep up the good work!

    Thread Starter jnasoy

    (@jnasoy)

    Thanks for quick response, still figuring out the actual error. Tried to disable archive page in cpt ui tool and it shows 404 error, which is expected, but if I turn it back on, it will show the error again. We have our staging running older version of CPT UI and the same archive page is working fine (https://lifestylefirstrealty.flywheelstaging.com/about/meet-the-team/). Haven’t done any theme update, only plugins.

    Thread Starter jnasoy

    (@jnasoy)

    Perfect! Thank you

    Thread Starter jnasoy

    (@jnasoy)

    Hello,

    Thank you for the response. I implemented a check in the assigned terms value and it seems to work.

    Another question, Does the glsr_create_review only accepts terms id in assinged_terms value?

    I’ve tried using the slug but it doesn’t work. No problem if I use the term/category ID.

     $review = glsr_create_review([
            'rating' => $qualityR_val,
            'name' => $author_user,
            'email' => $author_email,
            'date' => $date,
            'assigned_users' => $author_id,
            'assigned_posts' => $assigned_post_id,
            'assigned_terms' => 139,
            'ip_address' => $ip_address,
            'quality_rating' => $qualityR_val,
            'service_rating' => $serviceR_val,
            'sustainability_rating' => $sustainabilityR_val
          ]);

    Thanks

    • This reply was modified 3 years, 9 months ago by jnasoy.
    • This reply was modified 3 years, 9 months ago by jnasoy.
    Thread Starter jnasoy

    (@jnasoy)

    Hello,

    The second review for every submitted review is assigned to a specific category or term and its rating value is based on the custom field of the main form (which doesn’t have terms assigned to it).

    I have 3 main categories for the ratings, quality, service, and sustainability.

    I could just add 3 rating forms that assigns to the different categories/terms but that will have 3 different submit button for each category form which does not meet my requirement. The requirement is to have single submit button for the multiple category ratings.

    My solution is have a form that does not assigned to any categories but add custom field for quality, services, and sustainability ratings.

    In order for me to easily display the rating of each categories, I need to dynamically create rating entry for the different categories every time a new rating (with the custom field) is submitted.

    Maybe there’s a better approach to this and I’m just over-complicate it ??

    I hope I explain it clearly ??

    Thank you

    Thread Starter jnasoy

    (@jnasoy)

    So apparently setting the field to required doesn’t trigger the custom validation, you need to modify the plugins custom validation using the following filter

    add_filter('site-reviews/validation/rules', function ($rules) {
        $rules['overall_rating'] = 'required';
        $rules['quality_rating'] = 'required';
        $rules['service_rating'] = 'required';
        $rules['sustainability_rating'] = 'required';
        return $rules;
    });
    
    Thread Starter jnasoy

    (@jnasoy)

    Thank you so much for the response. I will try the options

    Thread Starter jnasoy

    (@jnasoy)

    Here’s my initial solution.

    I just grabbed all the reviews using glsr_get_reviews function and setup a condition that if user_id == current_loggedin_user_id, saved the assigned_to IDs in an array and use it in post__in to query the posts. This requires more than one queries, which I don’t really care that much but does anyone know a more efficient way to do it?

    Thank you

    • This reply was modified 3 years, 12 months ago by jnasoy.
    Thread Starter jnasoy

    (@jnasoy)

    Thanks for your response.
    Thats a handly hook but can you guide mo through what should my logic block looks like? Like how can i get star rating input value and save in a specific category. Sorry im new in wordpress, can you show me how the code block looks like?

    Thank you so much

    Thread Starter jnasoy

    (@jnasoy)

    Thank you for your response.
    I’ve checked the link you’ve provided and its so cool that we could do more customization to the rating form,

    One question, is there a way I can programmatically assigned the submitted valued of a custom field to a certain rating category?

    Thanks

    jnasoy

    (@jnasoy)

    That’s great to here. Looking forward to it. Great work!

    jnasoy

    (@jnasoy)

    Hello,

    Im also looking forward for this implementation in next version.

    For now, is there a way (maybe a function) that we can use to check if the logged in user already submitted a review in a specific category?

    Thanks

Viewing 12 replies - 1 through 12 (of 12 total)