POST
get_reviews
This allows you to export reviews from your shop system to the Shopgate Reviews XML Format.
Query parameters
Response
application/json
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>