I want to add product reviews programatically with some custom fields defined on my code below
$review = Mage::getModel('review/review')
->setEntityPkValue(intval($pressquote->product_id)) //product id
->setStatusId(intval($pressquote->status))
->setDetail($pressquote->text)
->setTitle('')
->setEntityId(1)
->setStatusId(intval($pressquote->status)) //approved
->setCustomerId(null) //null is for administrator
->setNickname($pressquote->source)
->setLink($pressquote->link) //custom field
->setLinktext($pressquote->linktext) //custom field
->setYear($pressquote->year) //custom field
->setStoreId(1)
->setStores(array('base'))
->save();
but it doesn't work for me.. I checked my code and it stops on save()
. What went wrong?
I tried already removing the custom fields but nothing happened
var
.