Announcement

Collapse
No announcement yet.

losing a charge description on OPAY error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    losing a charge description on OPAY error

    Working on a custom module that modifies the shipping charge description. Description in the array is adjusted in the LOG screen function. I'm using the API to facilitate the mod in the structured array. The description is correct when OPAY renders. However, if there is an error for CC info the new description reverts to the default description.

    Any ideas.

    I think it could be related somehow. I decided to use Tokenlist to track variable values. I must be missing a function in my module because Tokenlist doesn't like it with a Token query error. If I've ever had the issue and fixed it I don't remember what the solution was. Need some guidance here too.

    Thanks,

    Scott
    Last edited by ids; 07-18-23, 09:09 AM.
    Need to offer Shipping Insurance?
    Interactive Design Solutions https://www.myids.net
    MivaMerchant Business Partner | Certified MivaMerchant Web Developer
    Competitive Rates, Custom Modules and Integrations, Store Integration
    AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
    My T-shirt Collection is mostly MivaCon T-shirts!!

    #2
    What g.Screen are you using to trigger your module?

    What "structured array" are you modifying?
    Kent Multer
    Magic Metal Productions
    http://TheMagicM.com
    * Web developer/designer
    * E-commerce and Miva
    * Author, The Official Miva Web Scripting Book -- available on-line:
    http://www.amazon.com/exec/obidos/IS...icmetalproducA

    Comment


      #3
      basket:charges

      Solved the Tokenlist issue. Had to do with old code used in this module and looks like some missing component functions.

      I thought that some of the newer functions wouldn't be a required function. I may have misunderstood. It was years ago. Adding them in and returning a "1" seems to have fixed the module's component item added to the OSEL. Tokenlist finally ran. So, If there was an announcement on required functions I have missed it.

      And Tokenlist must have some checking, or doesn't handle gracefully, the mveval statements (my old debug code). So Tokenlist doesn't like printing variable values in the Systemmodule_screen, Logmodule_screen, and Componentmodule_initialize because the output renders above the doctype declaration. Wondering now if there are other functions that will output above Doctype? I'm also wondering if the same issue affects the output value of miva_getvarlist? Seems like it would because isn't that what the Tokenlist module uses to grab the data?

      Scott



      Last edited by ids; 07-18-23, 10:14 AM.
      Need to offer Shipping Insurance?
      Interactive Design Solutions https://www.myids.net
      MivaMerchant Business Partner | Certified MivaMerchant Web Developer
      Competitive Rates, Custom Modules and Integrations, Store Integration
      AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
      My T-shirt Collection is mostly MivaCon T-shirts!!

      Comment


        #4
        Sorry, I'm not sure if I understand exactly what your code is doing. The l.settings variables, such as basket:charges, don't have values until the page is initialized. I don't think you can access them from LogModule_Screen, since they are in a local variable that isn't passed to that function; and also, by the time LogModule_Screen is called, the entire page has already been rendered. You may need to use LogModule_Action triggered by the SHIP action, and make it update the DB, preferably by calling a library function such as BasketCharge_Update. Depending on the situation, you may also need code to make sure that the change doesn't happen twice when a customer goes part-way through checkout and then goes back to the shopping pages -- or, as you noticed, if the customer gets an error and has to try again.

        Hope that's helpful --
        Kent Multer
        Magic Metal Productions
        http://TheMagicM.com
        * Web developer/designer
        * E-commerce and Miva
        * Author, The Official Miva Web Scripting Book -- available on-line:
        http://www.amazon.com/exec/obidos/IS...icmetalproducA

        Comment


          #5
          I misspoke about the OSEL LogModule_screen. I am actually populating the BasketInfo array and not updating the basket charges. I will need to follow up using the LogModule_action.

          Thanks Kent.

          Scott
          Need to offer Shipping Insurance?
          Interactive Design Solutions https://www.myids.net
          MivaMerchant Business Partner | Certified MivaMerchant Web Developer
          Competitive Rates, Custom Modules and Integrations, Store Integration
          AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
          My T-shirt Collection is mostly MivaCon T-shirts!!

          Comment

          Working...
          X