2

I have created the newsletter subscriber group on customer group, so I can apply discount to them, is there anyway to make it automatic, if someone subscribe to newsletter he/she automatically assign to newsletter subscribers group that had created?

  • hello you there. please accept the answer if it helped you to resolve your problem. – Rajeev K Tomy Nov 8 '14 at 6:02
2

What you could do is listen to the event for customer save before customer_save_before, check to see if they are subscribing to the newsletter, If they are then you can update the group assigned to the customer and they will be saved into this new group.

The attribute for newsletter subscription is is_subscribed and you can call setCustomerGroupId on the customer object to update the group.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.