Jump to content

PaymentModule Class


PeteST

Recommended Posts

Hi,

 

I am having some difficulty with developing a new payment module and I will be grateful for any assistance that can be provided.

 

I am attempting to find the PaymentModule class in order to see what happens to the parameters sent to a parent class method, but this class doesn't seem to exist. It must do, since all payment modules seem to extend from the class. However, having done a full file and folder search in my base PrestaShop directory for 'PaymentModule' and 'extends PaymentModule', I cannot find it! I'm sure it will be one of those "of course..." moments when I realize the extremely obvious thing I have overlooked. Any ideas?

 

Now, just to push my luck...

 

In my hookPayment() method I am setting a template with $this->display(__FILE__ . 'mymodulename'). However, the front-end displays a DIFFERENT module's template file. When changing 'mymodulename' to a non-existent filename I get an error telling me that no template file exists; I therefore conclude it must be loading my template file. What is happening, I don't know.

 

Any help with either problems would be brilliant; if any more information is required of me, please let me know.

 

Thank you.

Link to comment
Share on other sites

Problem Solved

 

I knew it would be something simple... caching. I can't believe I didn't think of that sooner!

 

On a side note, I still don't know where the class 'PaymentModule' comes from. I could only find 'PaymentModuleCore', and it is this class's display() method that seemed to be called by my module. Ah, well, it works, so I won't worry about that now.

 

Please excuse this thread. Thank you.

Link to comment
Share on other sites

  • 1 year later...

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...