Announcement

Collapse
No announcement yet.

Category_Load_Code does not return anything

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

    Category_Load_Code does not return anything

    The following code supposed display category information, but it is all blank.

    Code:
    <mvt:assign name="g.feacat" value=" '01-bands-1_leather' " />
    <mvt:do name="l.result" file="g.Module_Library_DB" value="Category_Load_Code( g.feacat, l.current_category )" />
    Name: &mvt:current_category:name;<br>
    Image: &mvt:current_category:image;
    version: 9.12 cssui

    s there anything I have to do before I can use library module functions?

    Thanks in advance
    Daniel Kim, Compu-Mate
    Developer

    #2
    looks correct to me but do not use hyphen in codes.
    01-bands-1_leather change to
    01_bands_1_leather and try again
    Andreas Toman
    PCINET, LLC

    Miva Merchant Design, Development, Integration & Support
    We built over 200 Miva Merchant stores!
    Miva shopping cart design & integration service and see our Portfolio!


    e-mail: [email protected]
    web: www.pcinet.com
    LinkedIn: Andreas Toman
    phone: (786) 250-2056 (Miami, FL)

    Comment


      #3
      A simple mistake: your call to Category_Load_Code is storing its results in l.current_category. That's a local variable; I don't think you can reference those with &mvt: entities. Try changing it to l.settings:current_category, and I think it will work.
      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


        #4
        P.S. to Miva: actually, there are times when it would be helpful to be able to use local variables this way. I'd like to have "&mvt:local:xxxxx" entities that work like"&mvt:global:xxxxx." Please put that on the wish list.
        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
          Thank you, Kent.
          That was it.
          Last edited by compumate99; 04-05-19, 12:08 PM.
          Daniel Kim, Compu-Mate
          Developer

          Comment

          Working...
          X