Announcement

Collapse
No announcement yet.

Function Runtime_Product_Load_Code()

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

    Function Runtime_Product_Load_Code()

    I need to retreive the Custom Product fields.

    1. Will this function return all fields a just the main products fields?
    <MvDO FILE = "{ g.Module_Library_DB }" NAME = "l.found" VALUE = "{ Runtime_Product_Load_Code( g.Product_Code, l.settings ) }">
    2. If NOT what function do I need to call?
    Ray Yates
    "If I have seen further, it is by standing on the shoulders of giants."
    --- Sir Isaac Newton

    #2
    Re: Function Runtime_Product_Load_Code()

    According to my copy of the SDK, that function loads the fields from the Products table, and also inventory counts and settings, but not custom fields. I don't think Miva has released any documentation or source code on the custom fields. But I think it would be fairly easy to figure out what you need by creating a couple of fields, and looking at the databases to see the structure.
    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
      Re: Function Runtime_Product_Load_Code()

      That function is one of the wonders of MivaSQL. It's a beauty. And of course does what Kent says it does. One downside is that the stock version of the function will not return in-active products so we're using a "fixed" version.

      I couldn't find any stock functions in the source to handle the custom fields (it's handled by a module that as far as I know we don't have the source for) so we did what Kent suggests and wrote our own. The relevant tables are s01_CFM_CustValues and s01_CFM_CustFields.
      Michael Brock
      a viking, home port:
      =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
      http://www.vikingcoders.com
      =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

      Comment


        #4
        Re: Function Runtime_Product_Load_Code()

        What does the l.settings paramiter refer to?

        Runtime_Product_Load_Code( g.Product_Code, l.settings )
        Ray Yates
        "If I have seen further, it is by standing on the shoulders of giants."
        --- Sir Isaac Newton

        Comment


          #5
          Re: Function Runtime_Product_Load_Code()

          The return from that function fills the settings variable with the product info, eg settings:name, settings:code, etc
          Bill Weiland - Emporium Plus http://www.emporiumplus.com/store.mvc
          Online Documentation http://www.emporiumplus.com/tk3/v3/doc.htm
          Question http://www.emporiumplus.com/mivamodu...vc?Screen=SPTS
          Facebook http://www.facebook.com/EmporiumPlus
          Twitter http://twitter.com/emporiumplus

          Comment


            #6
            Re: Function Runtime_Product_Load_Code()

            Ok Thank Bill
            Ray Yates
            "If I have seen further, it is by standing on the shoulders of giants."
            --- Sir Isaac Newton

            Comment

            Working...
            X