Rivyo Integration Guide

Rivyo app is build up with amazing features to boost any store sales & make online shop worthy. Here is our guide for Rivyo integration with Product Filter & Search app.


About Rivyo

1
App Information

2
Rivyo Integration Benefit

  • Given a solution for shoppers to find exact products along with displaying ratings/reviews in the product items as reference.

Demo

Here are some of our customers' stores with our app and Rivyo review integration.

Rivyo integration demo store


Instruction

Attention: The current document only works with the new front-end lib from Boost Commerce. Please read this document first to know if you are using the latest version.

Build Rating for the Product item

    1
    Edit your current theme.
    2
    Copy the following code snippet to your clipboard:

    //For boost-pfs-filter.js
    '<div class="wc_product_review_badge_boostcommerce" data-handle="{{itemHandle}}"></div>' + 
    
    //For boost-pfs-filter.js
    <div class="wc_product_review_badge_boostcommerce" data-handle="[[itemHandle]]"></div><br>
    	
    3
    Go to the boost-pfs-filter.js file, then find productGridItemHtml and paste the snippet to where you want the Ratings to appear, for example, under the product title:
    Code integration 1
    If  productGridItemHtml variable does not exist, please check the file boost-pfs-filter-html.liquidCode integration 2
    4
    Add the following script to the  ProductList.prototype.afterRender function
    if(jQ('.wc_product_review_badge_boostcommerce').length > 0){
    		var ajax_shop_badge_url = jQ('#th_shop_url').attr('content'), ajax_product_handle = new Array();
    		if(typeof ajax_shop_badge_url != 'undefined'){
    			ajax_shop_badge_url = ajax_shop_badge_url.replace(/^https?\:\/\//i, '');
    		}
    
    		jQ('.wc_product_review_badge_boostcommerce').each(function(idx, val){
    			ajax_product_handle.push(jQ(this).data('handle'));
    			if(idx === (jQ('.wc_product_review_badge_boostcommerce').length - 1)){
    				jQ.ajax({
    					url: '//thimatic-apps.com/product_review/get_review_rating_update.php',
    					type: 'post',
    					dataType: 'json',
    					data: {shop: ajax_shop_badge_url, product_handles: ajax_product_handle},
    					success: function(result){
    						jQ('.wc_product_review_badge_boostcommerce').html(result.empty.html);
    						jQ.each(result, function(key, value){
    						  jQ('.wc_product_review_badge_boostcommerce[data-handle="'+key+'"]').html(value.html);
    						});
    					},
    					error: function(XMLHttpRequest, textStatus){
    						console.log(XMLHttpRequest);
    					}
    				});
    			}
    		});
    	}
    	

Build a filter option by ratings/reviews

1
Please go to Product Filter & Search -> Tool -> Metafields
2
Add the new metafield like the image below:
Namespace: product_schema
Key: th_ratingValue

How to edit metafield to prepare for the integration

Namespace: product_schema

Key: th_ratingCount

How to edit metafield to prepare for the integration

3
Build a filter option by ratings/reviews.
Wait about 3 minutes for the syncs done before creating a filter option by review ratings: Go to the app's Homepage > Manage Filter tree > From a filter tree, click Add a filter option button > Choose Review Ratings > Click 2 Save buttons. Refer to  this article for more details.

Still need help? Contact Us Contact Us