Announcement

Collapse
No announcement yet.

help with miva script codes <MvDO>

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

    #16
    Re: help with miva script codes &lt;MvDO&gt;

    Is there a thread here that we can post any questions related to miva script codes? I feel like there is no need for me to start a new thread each time, because my question can be answer in 1-2 replies... but then again, it is easier for other users to search for that specific question/topic without going through all the pages to track down the answer.

    But my question is, where can I find the admin_log_action()? It is used in the shipping modules, and I can't find it in the LSK documentation link: http://www.pcinet.com/docs/MM5_LSK_F...st_PR8_u4.html that you gave me.

    Oh, would the toolbelt help me understand how to create custom modules? I don't know if I'm just bad at do research, but I can't find much help on miva script at all. Maybe I should stop by barnes and noble later...

    Comment


      #17
      Re: help with miva script codes &lt;MvDO&gt;

      You should start a new thread when you want to ask a new question. This forum is the best place for Miva Script questions. The most up to day documentation is Mivascript.com


      What are you trying to do?


      A. Write MivaScript programs.
      If you download Miva Mia, you can run Miva Script locally to start learning the syntax.


      B. Customize page templates in Miva Merchant
      Use Toolbelt. It exposes much of Mivascript making it available in your page templates.
      Many things that once required a module can be better scripted with toolbelt in a page template


      B. Write a Miva Merchant module.
      On the resources page look for Miva Merchant API Documentation you will find this
      Miva Merchant 5.5 API -- PR8 v1.1


      Writing a module means download the compiler, having a test environment, understanding the API and so on. If you are determined to do so Theis form is the best place to ask question.
      Ray Yates
      "If I have seen further, it is by standing on the shoulders of giants."
      --- Sir Isaac Newton

      Comment


        #18
        Re: help with miva script codes &lt;MvDO&gt;

        I have a few things that I want to try. Nothing too complicated, just creating very simple module that will give the customer a discount depend on where they live.., and maybe along the road create a custom module that will take in the width, height, length that the customer input in the textfields and generate a dimension and price for them.

        If I create a discount.mv that give the customer a discount if the city/state is the same as the one I put on my list, how can I get the discount percent to display below the "ship via", and "pay with" on the checkout page?

        So far I'm learning from the shipping mv files. I'm making some comparison with flatrate.mv and minunit.mv file. they both call for similar functions. The problem is that there are so many functions from the LSK. I don't know which one to call, and what they do or where they go. I want to get a basic template of how to write, store, and retrieve from a shipping module.

        I do have a test website, and I have also downloaded the compiler, miva merchant mia, and the LSK. I not sure how to work the miva mia so I do all my testing through my miva test store.

        Sorry, after your reply I will make a new thread for other questions.

        Comment


          #19
          Re: help with miva script codes &lt;MvDO&gt;

          You probably want to make sure your module is also a component module. Feature 'component'

          Then you can assign the items to you page.

          ComponentModule_Initialize() is called when the page loads. You can setup your variable in l.all_settings:myvariable

          and print it to the screen: &mvt:myvariable;

          Or

          ComponentModule_Render_Start() is called when you have assigned an item to the page script.

          mvt:item name="you_module_code" param="" />

          You can have it output something to the screen
          Ray Yates
          "If I have seen further, it is by standing on the shoulders of giants."
          --- Sir Isaac Newton

          Comment


            #20
            Re: help with miva script codes &lt;MvDO&gt;

            Originally posted by RayYates View Post
            If you have the Toolbelt module you can add this to a page template. It will display all global variables.

            Code:
            <mvt:item name="ry_toolbelt" param="eval|varlist('g', '', l.all_settings)" />
            The newest version on Miva also includes a utility module called Token List. You can use it to display the variables available on any page.
            where exactly is the page template located in?

            Comment


              #21
              Re: help with miva script codes &lt;MvDO&gt;

              also, its the PCI Net Tool Belt right?

              Comment


                #22
                Re: help with miva script codes &lt;MvDO&gt;

                nevermind, i figure it out.

                Comment


                  #23
                  Re: help with miva script codes &lt;MvDO&gt;

                  I don't want to dissuade you from writing your module. We need more module developers and I'm very glad to see you posting here.
                  However...
                  Warning: Blatant self promotion.

                  Toolbelt:
                  http://www.pcinet.com/miva-modules/ry_toolbelt.html

                  T
                  oolbelt turns Merchant page templates into a robust scripting language. All Miva Merchant build in functions are available to you.
                  I also provides a very rich set of Shopping cart specific tools for the basket, categories, products, file system, database access and has the unique ability to call external MivaScript functions directly.

                  Toolbelt contains the do command (equivalent to the <MvDo> tag)

                  It might be simpler to write the command that you need to execute your discount in a couple of compiled functions then call it directly within your page template with Toolbelt.

                  Alternatively Emporium Plus has a boat load of discount modules.
                  Ray Yates
                  "If I have seen further, it is by standing on the shoulders of giants."
                  --- Sir Isaac Newton

                  Comment

                  Working...
                  X