Question

I am developing one extension import/export product review. I have create dataflow script so admin can run dataflow profile for import/export. export is working fine. but when i run import i got this error Please select a customer for this transfer.. this error only occurred when there is guest review for product. i have used this code for customer session.

 $_customer = Mage::getModel('customer/customer')->load($customerid);
$_session = Mage::getSingleton('customer/session')->setCustomer($_customer)->setCustomerAsLoggedIn($_customer);

So how we can resolve this error.

Was it helpful?

Solution

If you are importing guest review data, your script needs to test whether there is an associated customer record and determine if that record exists in your Magento instance. If not, it's a guest review.

For guests the customer_id should be set to null. You can debug this in Mage_Review_Model_Resource_Review::_afterSave().

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top