Jump to content


  • Content count

  • Joined

  • Last visited

Profile Information

  • Real Name
    Efim Polevoi
  1. fimkap

    Initialization of payment module

    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? thanks
  2. fimkap

    Initialization of payment module

    Hello, 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. Thanks
  3. Thanks, I will take a look at this.
  4. I'm writing my own payment module for OSCommerce. We use asynchronous callbacks from our payment gateway. It means that I need to create the order while handling such a callback. I understand that I should use checkout_process.php for that. But the problem is that there's no session context since the callback is asynchronous. So tep_session_is_registered will fail. From the code of other payment modules it looks like mostly they are based on the existing session context. So what's the best strategy in that case? In fact, the idea is that we have all the necessary information returned in the data with the callback. So in theory I can create a new order out of the session context, but I don't want to rewrite the already existing logic and it has a lot of dependencies. On the other hand, I can try to restore the session from the database (create a kind of dummy session with the necessary context to call checkout_process.php), but that doesn't seem easy at the moment. Nor does it seem the right thing to do. Maybe some plugins use the same pattern? Thanks