Documentation ¶
Overview ¶
Package magento contains helper functions to handle the different versions.
Distinguish between Magento 1 and Magento 2.
Magento is a trademark of MAGENTO, INC.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Version ¶
type Version int
Version specific type which defines the current installed version of database tables.
Version* defines the return values of Version() function.
func DetectVersion ¶
DetectVersion detects the running version by reading the list of tables. It searches for the tables core_store, core_website, core_store_group and api_user for Magento v1. It searches for the tables integration, store_website, store_group and authorization_role for Magento v2. Prefix is the prefix for each table. Returns zero if the version cannot be detected.