Announcement

Collapse
No announcement yet.

Alternate_Display_Page API Function

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

    Alternate_Display_Page API Function

    What is the function to update the Alternate_Display_Page? I am not finding an API function call for updating the Alt Page for a category. The field is not included in the Category_Insert and Category_Update functions.

    BTW: JSON API Function for Category_Update works with a single category record update but overall doesn't work because I have too many records getting updated in the same session.

    Thanks,

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

    #2
    If you're talking about the alt page for a product, it's part of the product record itself, so use a product update function. It's the page_code column.
    M.A.D.* since 1997

    http://www.scotsscripts.com

    *miva application developers

    Comment


      #3
      You should be using the JSON API Category_Update function and specifying Category_Alternate_Display_Page field. I don't understand your issue where Category_Update doesn't work because you have "too many records getting updated in the same session" but another API function would work instead? Can you elaborate on the issue?
      David Carver
      Miva, Inc. | Software Developer

      Comment


        #4
        Hmmm, It's the category, but it's likely the same thing. I thought I tried that field and it didn't work. Maybe I had a typo or didn't include the field in the assignments.

        I'll take a look.

        YEP, I didn't have the correct field assigned to the page_code array member. That part is working now. Thanks, Scot.

        Scott


        Last edited by ids; 06-11-24, 12:35 PM.
        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


          #5
          Originally posted by dcarver View Post
          You should be using the JSON API Category_Update function and specifying Category_Alternate_Display_Page field. I don't understand your issue where Category_Update doesn't work because you have "too many records getting updated in the same session" but another API function would work instead? Can you elaborate on the issue?
          Thanks David. I would like to know why this isn't working also.

          When I run a single category update using the JSON API string, My category gets updated as expected. I'm able to update the title image, Alt page, and all the custom fields. However, after about 600+ categories, I am getting a gateway timeout.

          Background of the module: Using a 3rd party data service, their API, to MvCall the records in that database. This specific DB has ~4K records. Their API allows me to grab 100 rows at a time.
          At first, I was creating the complete JSON string. Calling json.mv would timeout. When I created a ticket, I was told 2000 records was the estimated current limit and should try to batch them somehow. I had the 100 record breakpoint already. Therefore I created the 100 record JSON string so submission would run ~40 times in this case. I asked about that, didn't get an answer. It still seemed to be working because I had errors/status written to a log file (because I was using Async). But, I found out that it was quitting somewhere but had no message in the log file.

          Note: JSON API key was working as expected and I have the proper permissions set up.
          Summary:
          MvCall to 3rd party, 40x to grab all the records
          Process all the records to a Miva structured array and convert to JSON API
          MvCall json.mvc and the won't complete.

          next method:

          MvCall to 3rd party to grab the records 100 at a time
          for every 100, Process the records to a Miva structured array and convert to JSON API
          MvCall json.mvc
          process doesn't complete.

          The current method,
          Grabbing the 100 records at a time
          process data into Miva structured array
          Check if category exists
          run the library Category Insert or Update function one record at a time. (ALL 3rd party records can process and insert/update)
          Run a JSON API category_update, one at a time to complete the update of Title Image and custom ctgy fields.
          Works great until the process gets a gateway timeout after roughly 600 records.

          So, 40 MvCalls to 3rd party site
          Each call gets 100 MvCalls to the store's json.mvc

          Looks like that's 4040 MvCalls.
          I could try to Asyc that loop I guess.

          I had been told a few years back that Provide XML can handle 1M records. Maybe I should switch to the XML structure?

          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


            #6
            ids Apologies as I thought the issue was resolved in the ticket. I will take a look and respond within the ticket.
            Nicholas Adkins
            Technical Training Specialist / Miva, Inc.
            [email protected]
            https://www.miva.com/mivalearn

            Comment


              #7
              Don't worry about that Nick. I may not have asked the questions in the same way. It's a big and complicated topic. I may have asked the question regarding a reset of the session.

              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


                #8
                David,

                Any thoughts/ideas from my explanation to your question?

                Thanks,

                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