Jump to content

Initialization of payment module

Recommended Posts


I'm writing a payment module. I noticed that it is initialized only when adding a product to cart. Is there any way to initialize the module before that? In fact, I need my code to run when in product info page and even in the index with product listing. That means before adding any product to the cart.


Share this post

Link to post
Share on other sites

I have added a log printing to the initialization routine and saw it called when opening shopping cart (adding to cart) and there's also some code that relates to payment modules and initialization in shopping_cart.php. So I was saying that based on this.

Anyway, what I need to do is to add some JS code to the product info page. Let's say we need to enable social sharing of a product.

After looking at the modules available maybe the solution will be to add another module to header tags. Then I will be able to do what I need, I guess.

What do you think?


Edited by fimkap
adding some more info

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