Create Product Review in Magento

I am trying to import product reviews from an older site to our new Magento site.

I am having problems trying to create a product overview in a script. Has anyone tried to do this before and know how to do it?

Surveys seem to be using entity models, and I can't get the survey object to do what I want. Here is what I tried to do so far and threw away some error regarding foreign keys that are not respected. Not sure how to do this. Any help would be appreciated.

$review = Mage::getModel('review/review');
$review->setEntityPkValue(141292);
$review->setStatusId(1);
$review->setTitle("This is an inserted title");
$review->setDetail("This is an inserted detail");
$review->setNickname("First Last");
$review->save();
+3
source share
1 answer

, , . sql ( app/code/core/Mage/Review/sql/, , :

  • core_store
  • catalog_product_entity
  • review_status
  • review_entity

, , JD

+3

Source: https://habr.com/ru/post/1754489/


All Articles