EngineWeb components

salla-review-order-item

Shows the customer's own review of one product inside an order: the review text, a "pending" note, the star rating, review factor tags and the attached photos and videos.

Used inside salla-reviews

<salla-reviews> renders this component for you. You rarely use it directly.

Shows the customer's own review of one product inside an order: the review text, a "pending" note, the star rating, review factor tags and the attached photos and videos. Use it on the order details page, once per product. The order is loaded by the current page id (page.id), so it only works on a page whose id is the order id. It renders nothing when the order has no review for that product. When the store setting store.settings.rating.allow_update is on, it also shows edit and delete buttons. They dispatch rating::edit (payload { type: 'product', feedback_id }) and rating::delete (payload { feedback_id }) through salla.event, and are disabled with an explanatory tooltip once the review can no longer be changed.

Use it

In HTML or JSX, use the tag <salla-review-order-item> with the Attribute names below. In React, the wrapper takes the Property names (camelCase).

import { SallaReviewOrderItem } from '@salla.sa/twilight-components-react/review-order-item';

Example

import { SallaReviewOrderItem } from '@salla.sa/twilight-components-react/review-order-item';

export function Example() {
  return (
    <SallaReviewOrderItem productId="123" />
  );
}

Properties

PropertyAttributeDescriptionTypeDefault
productIdproduct-idId of the product whose review to show, matched against the order items and the order's product ratings. Use product-id in markup. The order itself is fetched using page.id. Nothing is shown while it is empty. Changing it reloads the review.number | string

Renders: <salla-button>, <salla-rating-stars>, <salla-review-factors-tags>, <salla-attachments>.

On this page