magento_api : internal methods

Last updated on
30 April 2025

_magento_api_get_session()

Return value: session ID
Description: Function returns ID of XML-RPC session if it has already been established.
If session has not been established yet or it has expired, function establishes it and returns its ID.

_magento_api_get_host()

Return value: Hostname
Description: Function returns hostname for connection to Magento via XML-RPC.

_magento_api_check_no_errors()

Description: Function checks for errors of connection via XML-RPC.

_magento_api_check_session_expire_error()

Description: Function checks if XML-RPC session is expired.

_magento_api_clear_session()

Description: Function nulls XML-RPC session.

magento_api_synchronize_catalog()

Description: Function retrieves tree of Magento catalogues and forwards it to magento_api_synchronize_tree function.

magento_api_synchronize_tree($tree)

Arguments: $tree is categories tree
Description: Function synchronizes forwarded tree to Drupal taxonomy.
Basing on forwarded tree of categories, function figures made changes and performs appropriate changes in Drupal taxonomy.

magento_api_synchronize_to_delete($value, $key, $cid)

Arguments: $value is the ID of category for Drupal taxonomy term
$key is the key
$cid is the ID of Magento category
Description: Function compares Drupal taxonomy with Magento catalogue and checks which terms have been removed from Magento.

magento_api_synchronize_walk_catalog_recurse($categories)

Arguments: $categories is category data array
Description: Function recursively looks through Magento catalogue and figures changes to be made within Drupal.

magento_api_get_taxonomy_term_by_catalog_id($cid)

Arguments: $cid is the ID of Magento category
Return value: ID of Drupal term
Description: Function defines the ID of term corresponded to current Magento category.

magento_api_get_catalog_id_by_taxonomy_term($tid)

Arguments: $tid is the ID of term
Return value: ID of Magento category
Description: Function defines the ID of Magento category corresponded to current ID of term.

Help improve this page

Page status: Not set

You can: