Product Page Reviews Overview (JudgeMe)

const productId = Superfans.variables.product.id;

function viewAllReviews() {
  Superfans.actions.openCustomBlock({
    id: "cbk_xxxxx",
    type: "full_screen",
    params: { productId }
  }).catch(() => {
    Superfans.actions.showAlert({ title: "Error", message: "Could not open reviews." });
  });
}

function writeAReview() {
  Superfans.actions.openCustomBlock({
    id: "cbk_xxxxx",
    type: "popup_bottom",
    params: { productId }
  }).catch((err) => {
    Superfans.actions.showAlert({ title: "Error", message: JSON.stringify(err) });
  });
}

Did this page help you?