Jump to content

Change user 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

Share this post


Link to post
Share on other sites

The module that creates invoices is not mine and to get it updated is going to cost hundreds of dollars.

I just needed an automated way to change the user group instead of doing it manually. Just need it change just to send the proforma then changed back to default. It is going to be a lot cheaper since this function is only used a couple of times and the rest pay by cc so they get the default

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More