POST

get_reviews

This allows you to export reviews from your shop system to the Shopgate Reviews XML Format.

Query parameters

action
string

Requested method

required
default : get_reviews
shop_number
string

Your shop number. Example: “11413”

required
trace_id
string

Unique request trace ID. Example: “sma-9412”

required
offset
integer

Number of items (not item number, etc) to be skipped in the export.

limit
integer

Maximum number of items to be exported.

uids
array[string]

The ids of products that should not be included in exported file. Example: [“10001”,“10002”]

required

Response

application/json
file

Plugin Example

    class MyPlugin extends ShopgatePlugin
    {
        ......

        protected function createReviews($limit = null, $offset = null, array $uids = array ())
        {
            /**
             * init review model
             */
            $reviewItem = new Shopgate_Model_Review();

            $reviewItem->setUid(10);									                        /** required */
            $reviewItem->setItemUid(312);	                            					    /** required */
            $reviewItem->setScore(6);								                            /** required */
            $reviewItem->setReviewerName('John Doe');								            /** required */
            $reviewItem->setDate('2007-08-25');                                                 /** optional */
            $reviewItem->setTitle('Great Product');								                /** optional */
            $reviewItem->setText('I would highly recommend to buy this product because...');    /** optional */

            $this->addReviewModel($reviewItem);
        }
Plugin Example Result
<reviews xsi:noNamespaceSchemaLocation="http://files.shopgate.com/xml/xsd/catalog/reviews.xsd">
    <review uid="10">
        <item_uid>312</item_uid>
        <score>6</score>
        <reviewer_name>
            <![CDATA[
            John Doe
            ]]>
        </reviewer_name>
        <date>2007-08-25</date>
        <title>
            <![CDATA[
            Great Product
            ]]>
        </title>
        <text>
        <![CDATA[
            I would highly recommend to buy this product because...
            ]]>
        </text>
    </review>
</reviews>