Announcement

Collapse
No announcement yet.

Unable to locate form for inventory attributes -- Again

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

    Unable to locate form for inventory attributes -- Again

    Getting this error on a product page using I & W theme. Wasn't expecting this error at all. Getting this potential solution out of the way, a search of this problem had this:
    <script>
    var ignore_error = true;
    </script>
    Was hoping for something easy like this, but it didn't solve it.

    I have a section of code that loads products very similar to how related products work. In fact, the template code for related products was the basis. The main difference is the data source. IOW, In my change, I am replacing the related prods array with a different array of product codes. This error is triggered when the loop runs and loads each product. Using Runtime_product_load_code function doesn't solve the issue either.

    The product loaded doesn't contain any inventory attributes. The product code I am loading does contain inventory attributes. Not tested is the opposite scenario. Doesn't matter as far as I can tell.

    Other posts about this refer to the attribute machine looking for the form -- which doesn't exist for the specific product loaded when the popup is rendered. Maybe the question is: How can I inform the attribute machine to NOT check for the form for this product load?

    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
    More information from further testing:

    Main product -- no variants, loaded product from the array -- no variants == no error message
    Main product -- has variants, loaded product from the array -- no variants == no error message
    Conclusion: Main product has no effect

    Main product -- no variants, loaded product from the array -- has variants == error message
    Main product -- has variants, loaded product from the array -- has variants == error message
    Conclusion: loaded product from the array that has variants triggers the error message

    So, it looks like I need to be able to load these products, on a product page, that won't trigger an error, when I actually don't care about the inventory attribute status. Any ideas?
    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


      #3
      You may need to post the snippet of code.
      Leslie Kirk
      Miva Certified Developer
      Miva Merchant Specialist since 1997
      Previously of Webs Your Way
      (aka Leslie Nord leslienord)

      Email me: [email protected]
      www.lesliekirk.com

      Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

      Comment


        #4
        Per Leslie's suggestion.

        When using the related products template code for rendering the products, this is how the array is being replaced.

        Code:
        <mvt:item name="customfields" param="Read_Product_Code( g.Product_Code, 'my_prods_cf', l.settings:my_prodscf_string)" />
        <mvt:do file="g.Module_Library_Utilities" name="l.success" value="SplitStringAndTrim(l.settings:my_prodscf_string, ',', l.settings:my_prodscf_array)" />
        <mvt:foreach iterator="my_prodscf_item" array="my_prodscf_array">
           <mvt:do name="l.return" file="g.Module_Library_DB" value="Runtime_Product_Load_Code( tolower(l.settings:my_prodscf_item), l.settings:product )" />
        So, getting the comma-delimited list of products from the products custom field,
        Parsing the string into an array,
        Looping thru the array and loading each product's info.

        The only differences I can detect are the way I'm loading the product data and when? Doesn't help me in figuring out why products with inventory attributes are being flagged (as I described prev).

        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