Skip to main content

system.kanoa.item.addItemAttribute

This function requires KanoaOPS module

Description

Adds an item attribute. If it already exists, it will update it (kanoaOPS).

Syntax

addItemAttribute(itemInfo, userId)
  • Parameters
      itemInfo (Dictionary) - Dictionary containing item attribute information (e.g., {'itemAttrName': 'weight', 'itemId': 1, 'itemAttrValue': 57.4}).
      userId (Integer) - User ID.
  • Returns
      itemAttrId (Integer) - ID of the added/updated item attribute.
  • Code Examples

    # Example Usage:
    newItemAttrId = system.kanoa.item.addItemAttribute({'itemAttrName': 'weight', 'itemId': 1, 'itemAttrValue': 57.4}, 123)