Documentation or information on spScUtil?

ericjackson
Tera Guru

Is anyone aware of documentation on the use and functionality of spScUtil? I'm working on some tweaks to the new SC Catalog Item (v2) widget and I can't seem to find anything about it...

function postCatalogFormRequest() {
		console.log("Start postCatalogFormRequest()");
		$scope.submitting = true;
		if ($scope.data.is_wishlist_item) {
			$scope.is_update_wishlist = false;
			$scope.data.show_wishlist_msg = false;
			if ($scope.data.sc_cat_item.sys_class_name === "sc_cat_item_producer")
				return spScUtil.submitWishlistedProducer($scope.data.sc_cat_item.sys_id, getVarData($scope.data.sc_cat_item._fields), $scope.data._generatedItemGUID);
			else if ($scope.data.sc_cat_item.item_action === "order")
				return spScUtil.orderWishlistedItem($scope.data.sc_cat_item.sys_id, $scope.data.sc_cat_item.quantity, getVarData($scope.data.sc_cat_item._fields), $scope.data._generatedItemGUID);
			else if ($scope.data.sc_cat_item.item_action === "add_to_cart")
				return spScUtil.addWishlistedItemToCart($scope.data.sc_cat_item.sys_id, $scope.data.sc_cat_item.quantity, getVarData($scope.data.sc_cat_item._fields), $scope.data._generatedItemGUID);
		}
		else if ($scope.data.is_cart_item)
			return spScUtil.updateCart($scope.data._generatedItemGUID, $scope.data.sc_cat_item.quantity, getVarData($scope.data.sc_cat_item._fields));
		else if ($scope.data.sc_cat_item.sys_class_name === "sc_cat_item_producer")
			return spScUtil.submitProducer($scope.data.sc_cat_item.sys_id, getVarData($scope.data.sc_cat_item._fields), $scope.data._generatedItemGUID);
		else if ($scope.data.sc_cat_item.item_action === "order")
			return spScUtil.orderNow($scope.data.sc_cat_item.sys_id, $scope.data.sc_cat_item.quantity, getVarData($scope.data.sc_cat_item._fields), $scope.data._generatedItemGUID);
		else if ($scope.data.sc_cat_item.item_action === "add_to_cart")
			return spScUtil.addToCart($scope.data.sc_cat_item.sys_id, $scope.data.sc_cat_item.quantity, getVarData($scope.data.sc_cat_item._fields), $scope.data._generatedItemGUID);
	}
1 ACCEPTED SOLUTION
6 REPLIES 6

Hi

Seems the links are no more accessible. Do you have another repo holding this info?

Sails
ServiceNow Consultant
United Kingdom

kedler
Kilo Guru

Why is that my instance is not able find spScUtil? I am getting an error 'TypeError: spScUtil.isRegexDone is not a function' when submitting an item in the portal