As the title say is there a way we can setup that if the user is in the basic group and they purchase certain product automatically upgrade to next tier.
For example:
new account is group : general
purchase over $200 moves to : VIP
500 or more purchase moves to VVIP
etc
is there a way this can be configured or an extensions that do this?
Thanks!
You need to create observer on event
sales_order_place_after
In events.xml
<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd"> <event name="sales_order_place_after"> <observer name="vendor_modulename_observer_orderneo" instance="Neo\OrderComment\Observer\Orderneo" /> </event> </config>
With observer file:
<?php namespace Vendor\ModuleName\Observer; class Orderneo implements \Magento\Framework\Event\ObserverInterface { public function execute(\Magento\Framework\Event\Observer $observer) { // Get customer id from orderid or session , and update group of customer here. } }
After place order within this observer, you can check customer total purchase and update his account group according to your requirement.
It may help you!
Problem Solved? Please click on 'Kudos' & Accept as Solution!
Hi,
There are extension which are according to your requirement
https://magecomp.com/magento-2-auto-customer-group-switching.html
Problem Solved! Click Kudos & Accept as Solution!