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

Miva Knowledge Base
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.
Important Notice: This information is for internal reference only. Use at your own risk.

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

Scot Ranney • March 31, 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

mvkb_categories mvkb_smt mvkb_count mvkb_totals mvkb_products