Jump to content

Update customers group from module


Recommended Posts

I am new to coding in prestashop and need a simple task done in module but cant seem to find out how.

I am using a module pay by invoice which just puts the order in waiting for payment.

I need to change a users group from default to another I created eg proforma group after a user presses on confirm order in this module but before any actions are done to finalize payment and then change users group back to default.

The reason is I am using an invoice module that sends out specific invoices based on group they are in, default for all paid invoices and proforma for non paid invoices.

 

so when a user orders from cart and clicks invoice payment they would then get a proforma invoice first then later when payment accepted they would get a normal invoice like other default users.

I just need to know how to update the groups for this customer before process and then back to the default group after process.

I have attached pay by invoice module to show what I am using

Any help appreciated

invoicepayment.zip

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...