Miva Merchant Development by Scot's Scripts

COUNT: Get Total Number Of Product, Categories, and More

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

COUNT: Get Total Number Of Product, Categories, and More

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 • March 31, 2026 (updated: April 01, 2026)


Miva merchant has a bunch of built in api functions to find various kinds of totals, such as how many products in a category and other related things.

<mvt:do file="g.Module_Library_DB" name="l.void" value="Runtime_ProductList_Count_Category( l.cat_id, l.count )" />

<MvASSIGN NAME = "l.ok" VALUE = "{ [ g.Module_Library_DB ].Runtime_ProductList_Count_All( l.count ) }" />

---------------------------------------

[ g.Module_Library_DB ].Runtime_ProductList_Count_All( count var )

[ g.Module_Library_DB ].Runtime_ProductList_Count_Related( prod_id,count var )

[ g.Module_Library_DB ].BasketCharge_Count_Type( basket_id,type )

[ g.Module_Library_DB ].OrderItem_Count_Shipment( shpmnt_id,count var )

[ g.Module_Library_DB ].OrderItem_Count_Return( rma_id,count var )

[ g.Module_Root $ l.__module_quote:module ].Quote_Count_Customer( cust_id )

[ g.Module_Feature_PGR_DB ].PriceGroup_Count_Module( module_id,count var )

[ g.Module_Feature_WSH_DB ].WishList_Count_Customer( cust_id,count var )

[ g.Module_Feature_WSH_DB ].Runtime_WishListProduct_Count_WishList( wshlst_id,count var )

https://www.scotsscripts.com/mvblog/categories-get-total-number-of-product-in-category.html

categories smt count totals products