Please select a customer for this transfer. Error occurred when import review from magento dataflow

magento.stackexchange https://magento.stackexchange.com/questions/3027

سؤال

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.

هل كانت مفيدة؟

المحلول

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().

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top