Now, i want to add some records(`title`,`name`,`content`) to my site by php script. the following way is adding one record:
when i want to add more records the way i thought is creating three text file(`title`,`name`,`content`). the title text file content like this:Code:$comment = Mage::getModel('review/review'); $comment->setEntityPkValue(147);//product id $comment->setTitle("the title"); $comment->setDetail("the content"); $comment>setNickname("the name"); $comment->setReviewId($review->getId()); $comment->setStores(array(Mage::app()->getStore()->getId())); $comment->save(); $comment->aggregate();
titleone test,titletwo test,titlthree test,titlefour test
the name txt file content like this:
the content like this:Code:name1, name2, name3, name4
Code:hello,test1.{content}hello,test2.{content}hello,test3.{content}hello,test4.
then use `file_get_contents() and explode()`. but i don't know how to put those results into
then loop them out. thank youCode:$comment->setTitle("the title"); $comment->setDetail("the content"); $comment>setNickname("the name");



Reply With Quote


Bookmarks