浏览文章

文章信息

Magento2 The store view is not in the associated website| 自动注册客户 | 自动生成客户 13308

验证customer所属店铺时未将customer分配到指定店铺,或者分配的店铺不存在

示例:

$customerData->setEmail($this->getPhoneEmail($customer['mobile']))
                    ->setCreatedAt(date('Y-m-d H:m:s', $customer['created_at']))
                    ->setCustomAttribute('phone_number', $customer['mobile'])
                    ->setFirstname('youzan')
                    ->setStoreId($store->getStore()->getId())
                    ->setWebsiteId($store->getStore()->getWebsiteId())
                    ->setData('youzan_account_id', $customer['yz_uid'])
                    ->setLastname($customer['show_name']);
                // 同步积分

一定要设置店铺和网站。且要设置正确

原创