Miva Merchant Development by Scot's Scripts

MvASYNC: How to Use In a Module

Miva Random Code Trivia

Want to start an online store? We work with you from start to finish, from commerce platform to design to SEO.
Experience counts, and we have a lot.

WARNING:

This information is offered "AS IS" for internal reference only. Use at your own risk.
Does AI actually understand your Miva Merchant store? Our smart JSON-LD schema generator makes sure it does. Contact us to get started. (more info)
SEO Audit & Inquiries • News & Updates • SEO for Miva Merchant

MvASYNC: How to Use In a Module

THIS CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED;
THE AUTHOR DISCLAIMS ALL LIABILITY FOR ANY DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR STORE DISRUPTIONS ARISING FROM ITS USE.

Scot Ranney • April 10, 2024


MvASYNC creates a process in the background that is immune to timeouts for the most part. It runs a process that lasts 60 minutes according to miva.

Using it in a module is pretty easy - just make sure open_store() is at or near the top. For my modules I also call my module settings.

<MvASYNCHRONOUS>	
		<MvASSIGN NAME = "l.settings" VALUE = "{ config(l.module_settings) }" />		
		<MvASSIGN NAME = "l.ok" VALUE = "{ open_store() }" />
</MvASYNCHRONOUS>

https://www.scotsscripts.com/mvblog/mvasync-how-to-use-in-a-module.html

async