public interface ProductMgrIf
Modifier and Type | Method and Description |
---|---|
boolean |
cacheThisProduct(Product product)
Should this particular product be cached? The default implementation returns false for null
products and Bundle products (according to the setting of the configuration value) and simply
returns true for every other product.
|
java.lang.String |
createEncodedProductIdFromProductQuantityEncodedKey(int productId,
java.lang.String productQuantityEncodedKey)
Takes in a productQuantityEncodedKey and a productId and returns an encoded product Id.
|
OptionIf[] |
createOptionsFromProductQuantityEncodedKey(java.lang.String encodedKey)
Receives an encoded key from the products_quantity table in the format 3{4}4{6} and creates
an array of Option objects.
|
ProductQuantity |
createProductQuantityEncodedKeyFromEncodedProductId(java.lang.String encodedProductId)
Takes in an encodedProductId and returns an encoded key for the products_quantity table
The format of the encoded product id is 1{2}3{4}5 where the product id = 1, the first optionId / valueId pair have ids of 2,3 and the 2nd optionId / valueId pair have ids of 4,5. |
java.lang.String |
createProductQuantityEncodedKeyFromOptions(OptionIf[] opts)
Takes in an an array of options and returns an encoded key for the products_quantity table
The format of the encoded key for the products_quantitytable is 3{4}4{6} which means product_options of id==3 and product_options_values of id==4 followed by product_options of id==4 and product_options_values of id==6. |
boolean |
doesProductExist(int productId)
Figure out whether a product exists
|
void |
editDigitalDownload(DigitalDownloadIf digitalDownload)
Edits the digital download object.
|
void |
editDigitalDownload(java.lang.String sessionId,
DigitalDownloadIf digitalDownload)
Edits the digital download object and checks that it belongs to the customer identified by
the sessionId.
|
Address[] |
getAddressesPerProduct(int productId)
Gets an array of Address objects that have been defined for the product referenced by the
productId.
|
ProductRelationship[] |
getAllProductRelationships()
Returns all product relationships in a single call.
|
Products |
getAllProducts(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int languageId)
Returns all products
|
Products |
getAllProductsWithOptions(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int languageId,
FetchProductOptionsIf options)
Returns all products.
|
Products |
getAllSpecials(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int languageId)
Returns all special priced products
|
Product[] |
getAlsoPurchased(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int productId,
int languageId)
Find products that were in the same order as orders containing the product referenced by
productId.
|
Product[] |
getAlsoPurchasedWithOptions(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int productId,
int languageId,
FetchProductOptionsIf options)
Find products that were in the same order as orders containing the product referenced by
productId.
|
Product[] |
getBestSellers(DataDescriptorIf dataDesc,
int categoryId,
int languageId)
Returns an array of bestseller products for the category and its children.
|
Product[] |
getBestSellersWithOptions(DataDescriptorIf dataDesc,
int categoryId,
int languageId,
FetchProductOptionsIf options)
Returns an array of bestseller products for the category and its children.
|
Products |
getBundlesThatProductBelongsTo(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int productId,
int languageId,
FetchProductOptionsIf options)
The method fetches an array of bundles (products of type bundle), all of which contain the
product with id
productId as one of the bundled products. |
Products |
getBundlesThatProductsBelongTo(java.lang.String sessionId,
DataDescriptorIf dataDescriptor,
int[] productIds,
boolean exactMatch,
int languageId,
FetchProductOptionsIf options)
The method fetches an array of bundles (products of type bundle), all of which contain the
product ids
productIds as one or more of the bundled products. |
Catalog |
getCatalogPerKey(java.lang.String catalogKey)
Returns a catalog object for the catalog key.
|
ProdCustAttr[] |
getCustomAttrsFromXML(java.lang.String xml)
Create an array of custom attributes from the XML
|
DigitalDownload |
getDigitalDownloadById(int digitalDownloadId)
Returns a Digital Download object for the digital download id.
|
DigitalDownload |
getDigitalDownloadById(java.lang.String sessionId,
int digitalDownloadId)
Returns a Digital Download object for the digital download id.
|
DigitalDownload[] |
getDigitalDownloads(java.lang.String sessionId)
Returns an array of Digital Download objects for the customer identified by the
sessionId parameter. |
DigitalDownload[] |
getDigitalDownloadsWithOptions(java.lang.String sessionId,
int languageId,
FetchDigitalDownloadOptionsIf ddOptions,
FetchProductOptionsIf prodOptions)
Returns an array of Digital Download objects for the customer identified by the
sessionId parameter. |
Option |
getOption(int productId,
int optionId,
int optionValueId,
int priceId,
int languageId,
FetchProductOptionsIf options)
Finds a single Option object for the parameters passed in by reading from the
product_attributes, product_options and product_options_values tables.
|
Product[] |
getOrderHistory(DataDescriptorIf dataDesc,
java.lang.String sessionId,
int languageId)
Get a list of the products ordered by the customer referenced by the sessionId.
|
Product[] |
getOrderHistoryWithOptions(DataDescriptorIf dataDesc,
java.lang.String sessionId,
int languageId,
FetchProductOptionsIf options)
Get a list of the products ordered by the customer referenced by the sessionId.
|
int |
getPaymentScheduleId(int productId)
A utility method to return just the Payment Schedule Id from a product to determine whether
it requires recurring billing.
|
int |
getPriceId(Customer cust)
Get the priceId from the customer
|
Product |
getProduct(int customerId,
int productId,
int languageId)
Fetches a fully populated product object for a customer referenced by customerId.
|
Product |
getProduct(java.lang.String sessionId,
int productId,
int languageId)
Fetches a fully populated product object.
|
ProductImages |
getProductImages(ProductImagesOptionsIf options)
Get the image file names associated with the product whose id is specified.
|
Product |
getProductPerSku(java.lang.String sessionId,
java.lang.String sku,
int languageId)
Get a product from its SKU.
|
Product |
getProductPerSkuWithOptions(java.lang.String sessionId,
java.lang.String sku,
int languageId,
FetchProductOptionsIf options)
Get a product from its SKU.
|
ProductQuantityIf |
getProductQuantity(java.lang.String encodedProductId)
The stock level and date available of the product is returned.
|
ProductQuantityIf |
getProductQuantityWithOptions(java.lang.String encodedProductId,
FetchProductOptionsIf options)
The stock level of the product is returned.
|
int |
getProductReorderLevel(int productId)
Return the re-order level of the product.
|
Product[] |
getProductsFromIds(java.lang.String sessionId,
java.util.ArrayList<java.lang.Integer> prodIdList,
int languageId)
Returns an array of products referenced by the ids in prodIdList.
|
Product[] |
getProductsFromIdsWithOptions(java.lang.String sessionId,
java.util.ArrayList<java.lang.Integer> prodIdList,
int languageId,
FetchProductOptionsIf options)
Returns an array of products referenced by the ids in prodIdList.
|
Product[] |
getProductsFromIdsWithOptions(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int[] prodIdArray,
int languageId,
FetchProductOptionsIf options)
Returns an array of products referenced by the ids in prodIdArray.
|
Products |
getProductsPerCategory(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int categoryId,
boolean searchInSubCats,
int languageId)
Returns the products for a category
|
Products |
getProductsPerCategoryPerManufacturer(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int categoryId,
int manufacturerId,
int languageId)
Returns the products for a category and a manufacturer
|
Products |
getProductsPerCategoryPerManufacturerWithOptions(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int categoryId,
int manufacturerId,
int languageId,
FetchProductOptionsIf options)
Returns the products for a category and a manufacturer.
|
Products |
getProductsPerCategoryWithOptions(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int categoryId,
boolean searchInSubCats,
int languageId,
FetchProductOptionsIf options)
Returns the products for a category.An options object is passed in to customize from where
some of the product attributes (such as price and quantity) are fetched from.
|
Products |
getProductsPerManufacturer(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int manufacturerId,
int languageId)
Returns the products for a manufacturer
|
Products |
getProductsPerManufacturerWithOptions(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int manufacturerId,
int languageId,
FetchProductOptionsIf options)
Returns the products for a manufacturer.An options object is passed in to customize from
where some of the product attributes (such as price and quantity) are fetched from.
|
int |
getProductViewCountMaxRetries() |
Product |
getProductWithOptions(int customerId,
int productId,
int languageId,
FetchProductOptionsIf options)
Fetches a fully populated product object for a customer referenced by customerId.
|
Product |
getProductWithOptions(java.lang.String sessionId,
int productId,
int languageId,
FetchProductOptionsIf options)
Fetches a fully populated product object.
|
Products |
getRelatedProducts(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int productId,
int relationType,
int languageId)
Find products related to the product defined by the productId parameter.
|
Products |
getRelatedProductsWithOptions(java.lang.String sessionId,
DataDescriptorIf dataDesc,
int productId,
int relationType,
int languageId,
FetchProductOptionsIf options)
Find products related to the product defined by the productId parameter.
|
java.lang.String |
getSku(OrderProductIf orderProd)
Get the SKU for an orderProduct object.
|
Products |
getSpecialsPerCategory(java.lang.String sessionId,
DataDescriptorIf dataDescriptor,
int categoryId,
boolean searchInSubCats,
int languageId)
Returns all special priced products for a category
|
TagIf |
getTag(int tagId,
boolean getProdCount,
int languageId)
Returns a Tag object for the id passed in as a parameter.
|
TagGroupIf |
getTagGroup(int tagGroupId,
boolean getProdCount,
int languageId)
Returns a TagGroup object for the id passed in as a parameter.
|
TagGroup[] |
getTagGroupsPerCategory(int categoryId,
boolean getProdCount,
int languageId)
Return an array of TagGroup objects for a category.
|
TagGroup[] |
getTagGroupsPerCategoryWithOptions(int categoryId,
int languageId,
FetchTagGroupOptionsIf options)
Return an array of TagGroup objects for a category.
|
TagIf[] |
getTagsPerCategory(int categoryId,
boolean getProdCount,
int languageId)
Return an array of Tag objects for a category.
|
int |
getTaxClassId(int productId)
Returns the tax class id for a product
|
java.lang.String |
getXMLFromCustomAttrs(ProdCustAttrIf[] attrDescArray)
Create an XML structure for the custom attributes
|
int |
insertDigitalDownload(int customerId,
int productId)
Create and insert a digital download record for the product identified by the productId and
the customer identified by the customerId.
|
int |
insertDigitalDownload(java.lang.String sessionId,
int productId)
Create and insert a digital download record for the product identified by the productId and
the customer identified by the sessionId.
|
int |
insertGiftCertificateDigitalDownload(int customerId,
int productId,
java.lang.String filePath)
Create and insert a digital download record for the product identified by the productId and
the customer identified by the customerId.
|
void |
refreshConfigs()
Refresh the configuration of the product manager
|
int |
removeStockReservationsForBasketItems(int customerId,
BasketIf[] basketItems,
StockReservationOptionsIf options)
This API call is used to remove stock reservations.
|
int |
removeStockReservationsForBasketItems(java.lang.String sessionId,
BasketIf[] basketItems,
StockReservationOptionsIf options)
This API call is used to remove stock reservations.
|
int |
removeStockReservationsForIds(int customerId,
int[] idArray,
StockReservationOptionsIf options)
This API call is used to remove stock reservations.
|
int |
removeStockReservationsForIds(java.lang.String sessionId,
int[] idArray,
StockReservationOptionsIf options)
This API call is used to remove stock reservations.
|
int |
removeStockReservationsForOrderProducts(int customerId,
OrderProductIf[] orderProducts,
StockReservationOptionsIf options)
This API call is used to remove stock reservations.
|
int |
removeStockReservationsForOrderProducts(java.lang.String sessionId,
OrderProductIf[] orderProducts,
StockReservationOptionsIf options)
This API call is used to remove stock reservations.
|
Basket[] |
reserveStock(java.lang.String sessionId,
BasketIf[] basketItems,
StockReservationOptionsIf stockReservationOptions)
The purpose of this API call is to reserve stock in order to give a customer enough time to
checkout without risking that the products being ordered become unavailable while checking
out.
|
Products |
searchForProducts(java.lang.String sessionId,
DataDescriptorIf dataDesc,
ProductSearchIf prodSearch,
int languageId)
Returns products matching the search criteria.
|
Products |
searchForProductsWithOptions(java.lang.String sessionId,
DataDescriptorIf dataDesc,
ProductSearchIf prodSearch,
int languageId,
FetchProductOptionsIf options)
Returns products matching the search criteria.
|
void |
setProductViewCountMaxRetries(int productViewCountMaxRetries)
The maximum number of optimistic concurrency retries when setting the product viewed count
|
int |
updateDigitalDownloadCount(java.lang.String sessionId,
int productId)
Updates the count of the Digital Download that defines how many times it has been downloaded.
|
int |
updateDigitalDownloadCountById(java.lang.String sessionId,
int digitalDownloadId)
Updates the count of the Digital Download (identified by id) that defines how many times it
has been downloaded.
|
int |
updateProductLockItems(java.lang.String productId,
java.lang.String shopIds)
Lockes a Product for all shops in the ;-separated
shopIds |
int |
updateProductNotLockedItems(java.lang.String[] productIds)
Resets all Locked Products which are not in the List
productIds |
int |
updateProductQuantity(int productId,
OptionIf[] opts,
int quantitySold,
boolean setStatus)
The product quantity is updated by subtracting quantitySold from the current quantity.
|
int |
updateProductQuantity(int productId,
OptionIf[] opts,
java.lang.String encodedOptions,
int quantitySold,
boolean setStatus)
The product quantity is updated by subtracting quantitySold from the current quantity.
|
int |
updateProductQuantityWithOptions(int productId,
OptionIf[] opts,
java.lang.String encodedOptions,
int quantitySold,
boolean setStatus,
FetchProductOptionsIf options)
The product quantity is updated by subtracting quantitySold from the current quantity.
|
void |
updateProductReviewInfo(int productId)
The product referenced by the
productId parameter is updated with information
regarding the average rating and the number of reviews present for the product.It's normally called after a review is inserted. |
void |
updateProductsOrdered(OrderIf order)
Update the products ordered count for the products sold in an order
|
void |
updateProductViewedCount(int productId,
int languageId)
Increments the viewed count for the product.
|
Products getProductsPerCategory(java.lang.String sessionId, DataDescriptorIf dataDesc, int categoryId, boolean searchInSubCats, int languageId) throws java.lang.Exception
sessionId
- the sessionIddataDesc
- the dataDesccategoryId
- the categoryIdsearchInSubCats
- the searchInSubCatslanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionProducts getProductsPerCategoryWithOptions(java.lang.String sessionId, DataDescriptorIf dataDesc, int categoryId, boolean searchInSubCats, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
sessionId
- the sessionIddataDesc
- the dataDesccategoryId
- the categoryIdsearchInSubCats
- the searchInSubCatslanguageId
- the languageIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionProducts getProductsPerCategoryPerManufacturer(java.lang.String sessionId, DataDescriptorIf dataDesc, int categoryId, int manufacturerId, int languageId) throws java.lang.Exception
sessionId
- the sessionIddataDesc
- the dataDesccategoryId
- the categoryIdmanufacturerId
- the manufacturerIdlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionProducts getProductsPerCategoryPerManufacturerWithOptions(java.lang.String sessionId, DataDescriptorIf dataDesc, int categoryId, int manufacturerId, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
sessionId
- the sessionIddataDesc
- the dataDesccategoryId
- the categoryIdmanufacturerId
- the manufacturerIdlanguageId
- the languageIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionProducts getAllProducts(java.lang.String sessionId, DataDescriptorIf dataDesc, int languageId) throws java.lang.Exception
sessionId
- the sessionIddataDesc
- the dataDesclanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionProducts getAllProductsWithOptions(java.lang.String sessionId, DataDescriptorIf dataDesc, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
sessionId
- the sessionIddataDesc
- the dataDesclanguageId
- the languageIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionProducts getProductsPerManufacturer(java.lang.String sessionId, DataDescriptorIf dataDesc, int manufacturerId, int languageId) throws java.lang.Exception
sessionId
- the sessionIddataDesc
- the dataDescmanufacturerId
- the manufacturerIdlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionProducts getProductsPerManufacturerWithOptions(java.lang.String sessionId, DataDescriptorIf dataDesc, int manufacturerId, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
sessionId
- the sessionIddataDesc
- the dataDescmanufacturerId
- the manufacturerIdlanguageId
- the languageIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionint getTaxClassId(int productId) throws org.apache.torque.TorqueException, com.konakart.app.KKException, com.workingdogs.village.DataSetException
productId
- the productIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptioncom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)Product getProduct(java.lang.String sessionId, int productId, int languageId) throws java.lang.Exception
sessionId
- the sessionIdproductId
- the productIdlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionProduct getProductWithOptions(java.lang.String sessionId, int productId, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
sessionId
- the sessionIdproductId
- the productIdlanguageId
- the languageIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionProduct getProduct(int customerId, int productId, int languageId) throws java.lang.Exception
customerId
- the customerIdproductId
- the productIdlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionProduct getProductWithOptions(int customerId, int productId, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
customerId
- the customerIdproductId
- the productIdlanguageId
- the languageIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionvoid updateProductViewedCount(int productId, int languageId) throws java.lang.Exception
productId
- the productIdlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionProducts getAllSpecials(java.lang.String sessionId, DataDescriptorIf dataDesc, int languageId) throws java.lang.Exception
sessionId
- the sessionIddataDesc
- the dataDesclanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionProducts getSpecialsPerCategory(java.lang.String sessionId, DataDescriptorIf dataDescriptor, int categoryId, boolean searchInSubCats, int languageId) throws java.lang.Exception
sessionId
- the sessionIddataDescriptor
- the dataDescriptorcategoryId
- the categoryIdsearchInSubCats
- the searchInSubCatslanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionProduct[] getProductsFromIds(java.lang.String sessionId, java.util.ArrayList<java.lang.Integer> prodIdList, int languageId) throws java.lang.Exception
sessionId
- the sessionIdprodIdList
- the prodIdListlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionProduct[] getProductsFromIdsWithOptions(java.lang.String sessionId, java.util.ArrayList<java.lang.Integer> prodIdList, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
sessionId
- the sessionIdprodIdList
- the prodIdListlanguageId
- the languageIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionProduct[] getProductsFromIdsWithOptions(java.lang.String sessionId, DataDescriptorIf dataDesc, int[] prodIdArray, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
sessionId
- the sessionIddataDesc
- the dataDescprodIdArray
- the prodIdArraylanguageId
- the languageIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionProducts searchForProducts(java.lang.String sessionId, DataDescriptorIf dataDesc, ProductSearchIf prodSearch, int languageId) throws java.lang.Exception
sessionId
- the sessionIddataDesc
- the dataDescprodSearch
- the prodSearchlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionProducts searchForProductsWithOptions(java.lang.String sessionId, DataDescriptorIf dataDesc, ProductSearchIf prodSearch, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
sessionId
- the sessionIddataDesc
- the dataDescprodSearch
- the prodSearchlanguageId
- the languageIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionOption getOption(int productId, int optionId, int optionValueId, int priceId, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
productId
- the productIdoptionId
- the optionIdoptionValueId
- the optionValueIdpriceId
- the priceIdlanguageId
- the languageIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionProduct[] getBestSellers(DataDescriptorIf dataDesc, int categoryId, int languageId) throws java.lang.Exception
dataDesc
- the dataDesccategoryId
- the categoryIdlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionProduct[] getBestSellersWithOptions(DataDescriptorIf dataDesc, int categoryId, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
dataDesc
- the dataDesccategoryId
- the categoryIdlanguageId
- the languageIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionProduct[] getOrderHistory(DataDescriptorIf dataDesc, java.lang.String sessionId, int languageId) throws java.lang.Exception
dataDesc
- the dataDescsessionId
- the sessionIdlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionProduct[] getOrderHistoryWithOptions(DataDescriptorIf dataDesc, java.lang.String sessionId, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
dataDesc
- the dataDescsessionId
- the sessionIdlanguageId
- the languageIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionProduct[] getAlsoPurchased(java.lang.String sessionId, DataDescriptorIf dataDesc, int productId, int languageId) throws java.lang.Exception
sessionId
- the sessionIddataDesc
- the dataDescproductId
- the productIdlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionProduct[] getAlsoPurchasedWithOptions(java.lang.String sessionId, DataDescriptorIf dataDesc, int productId, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
sessionId
- the sessionIddataDesc
- the dataDescproductId
- the productIdlanguageId
- the languageIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionProducts getRelatedProducts(java.lang.String sessionId, DataDescriptorIf dataDesc, int productId, int relationType, int languageId) throws java.lang.Exception
sessionId
- the sessionIddataDesc
- the dataDescproductId
- the productIdrelationType
- the relationTypelanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionProducts getRelatedProductsWithOptions(java.lang.String sessionId, DataDescriptorIf dataDesc, int productId, int relationType, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
sessionId
- the sessionIddataDesc
- the dataDescproductId
- the productIdrelationType
- the relationTypelanguageId
- the languageIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionjava.lang.String getSku(OrderProductIf orderProd) throws com.konakart.app.KKException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
orderProd
- the orderProdcom.konakart.app.KKException
- an unexpected KKException exceptionorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)int updateProductQuantity(int productId, OptionIf[] opts, int quantitySold, boolean setStatus) throws java.lang.Exception
productId
- the productIdopts
- the optsquantitySold
- the quantitySoldsetStatus
- the setStatusjava.lang.Exception
- an unexpected exceptionint updateProductQuantity(int productId, OptionIf[] opts, java.lang.String encodedOptions, int quantitySold, boolean setStatus) throws java.lang.Exception
This method either uses opts or encodedOptions depending on which one isn't set to null.
productId
- the productIdopts
- the optsencodedOptions
- the encodedOptionsquantitySold
- the quantitySoldsetStatus
- the setStatusjava.lang.Exception
- an unexpected exceptionint updateProductQuantityWithOptions(int productId, OptionIf[] opts, java.lang.String encodedOptions, int quantitySold, boolean setStatus, FetchProductOptionsIf options) throws java.lang.Exception
This method either uses opts or encodedOptions depending on which one isn't set to null. An options object is passed in to customize where the quantity is stored. This could be in an external table.
productId
- the productIdopts
- the optsencodedOptions
- the encodedOptionsquantitySold
- the quantitySoldsetStatus
- the setStatusoptions
- the optionsjava.lang.Exception
- an unexpected exceptionProductQuantityIf getProductQuantity(java.lang.String encodedProductId) throws java.lang.Exception
encodedProductId
- the encodedProductIdjava.lang.Exception
- an unexpected exceptionint insertDigitalDownload(java.lang.String sessionId, int productId) throws java.lang.Exception
sessionId
- the sessionIdproductId
- the productIdjava.lang.Exception
- an unexpected exceptionint insertDigitalDownload(int customerId, int productId) throws java.lang.Exception
customerId
- the customerIdproductId
- the productIdjava.lang.Exception
- an unexpected exceptionDigitalDownload[] getDigitalDownloads(java.lang.String sessionId) throws java.lang.Exception
sessionId
parameter. The product attribute of the Digital Download objects is
not populated.
If the DD_DELETE_ON_EXPIRATION configuration variable is set to "true", then the objects read from the database that have expired, are automatically deleted. This avoids having to maintain the database table. Regardless of the setting of DD_DELETE_ON_EXPIRATION, only valid (not expired) objects are ever returned.
sessionId
- the sessionIdjava.lang.Exception
- an unexpected exceptionDigitalDownload[] getDigitalDownloadsWithOptions(java.lang.String sessionId, int languageId, FetchDigitalDownloadOptionsIf ddOptions, FetchProductOptionsIf prodOptions) throws java.lang.Exception
sessionId
parameter. The ddOptions
parameter allows you to define
whether the product attribute of the returned Digital Download objects is populated.
If the DD_DELETE_ON_EXPIRATION configuration variable is set to "true", then the objects read from the database that have expired, are automatically deleted. This avoids having to maintain the database table. Regardless of the setting of DD_DELETE_ON_EXPIRATION, only valid (not expired) objects are ever returned.
sessionId
- the sessionIdlanguageId
- the languageIdddOptions
- Options object that allows you to define whether the product attribute of the
returned Digital Download objects is populatedprodOptions
- the prodOptionsjava.lang.Exception
- an unexpected exceptioncom.konakart.app.KKException
- an unexpected KKException exceptionint updateDigitalDownloadCount(java.lang.String sessionId, int productId) throws java.lang.Exception
sessionId
- the sessionIdproductId
- the productIdjava.lang.Exception
- an unexpected exceptionint updateDigitalDownloadCountById(java.lang.String sessionId, int digitalDownloadId) throws java.lang.Exception
sessionId
- the sessionIddigitalDownloadId
- the digitalDownloadIdjava.lang.Exception
- an unexpected exceptionint getPriceId(Customer cust)
cust
- the custTagGroup[] getTagGroupsPerCategory(int categoryId, boolean getProdCount, int languageId) throws java.lang.Exception
categoryId
- - If set to -1 then all tag groups are returnedgetProdCount
- the getProdCountlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionTagGroup[] getTagGroupsPerCategoryWithOptions(int categoryId, int languageId, FetchTagGroupOptionsIf options) throws java.lang.Exception
categoryId
- - If set to -1 then all tag groups are returnedlanguageId
- the languageIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionTagIf[] getTagsPerCategory(int categoryId, boolean getProdCount, int languageId) throws java.lang.Exception
categoryId
- - If set to -1 then all tags are returnedgetProdCount
- the getProdCountlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionTagGroupIf getTagGroup(int tagGroupId, boolean getProdCount, int languageId) throws java.lang.Exception
tagGroupId
- the tagGroupIdgetProdCount
- the getProdCountlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionTagIf getTag(int tagId, boolean getProdCount, int languageId) throws java.lang.Exception
tagId
- the tagIdgetProdCount
- the getProdCountlanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionjava.lang.String createEncodedProductIdFromProductQuantityEncodedKey(int productId, java.lang.String productQuantityEncodedKey)
productId
- the productIdproductQuantityEncodedKey
- the productQuantityEncodedKeyProductQuantity createProductQuantityEncodedKeyFromEncodedProductId(java.lang.String encodedProductId) throws com.konakart.app.KKException
encodedProductId
- the encodedProductIdcom.konakart.app.KKException
- an unexpected KKException exceptionjava.lang.String createProductQuantityEncodedKeyFromOptions(OptionIf[] opts)
opts
- the optsint getProductReorderLevel(int productId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
productId
- the productIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptionProductQuantityIf getProductQuantityWithOptions(java.lang.String encodedProductId, FetchProductOptionsIf options) throws java.lang.Exception
encodedProductId
- the encodedProductIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionboolean doesProductExist(int productId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, com.konakart.app.KKException
productId
- the productIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptionint insertGiftCertificateDigitalDownload(int customerId, int productId, java.lang.String filePath) throws java.lang.Exception
customerId
- the customerIdproductId
- the productIdfilePath
- the filePathjava.lang.Exception
- an unexpected exceptionint getPaymentScheduleId(int productId) throws org.apache.torque.TorqueException, com.konakart.app.KKException, com.workingdogs.village.DataSetException
productId
- the productIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.konakart.app.KKException
- an unexpected KKException exceptioncom.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)Product getProductPerSkuWithOptions(java.lang.String sessionId, java.lang.String sku, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
sessionId
- the sessionIdsku
- the skulanguageId
- the languageIdoptions
- the optionsjava.lang.Exception
- an unexpected exceptionProduct getProductPerSku(java.lang.String sessionId, java.lang.String sku, int languageId) throws java.lang.Exception
sessionId
- the sessionIdsku
- the skulanguageId
- the languageIdjava.lang.Exception
- an unexpected exceptionvoid editDigitalDownload(java.lang.String sessionId, DigitalDownloadIf digitalDownload) throws java.lang.Exception
sessionId
- the sessionIddigitalDownload
- the digitalDownloadjava.lang.Exception
- an unexpected exceptionvoid editDigitalDownload(DigitalDownloadIf digitalDownload) throws com.konakart.app.KKException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
digitalDownload
- the digitalDownloadcom.konakart.app.KKException
- an unexpected KKException exceptionorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)DigitalDownload getDigitalDownloadById(java.lang.String sessionId, int digitalDownloadId) throws java.lang.Exception
sessionId
- the sessionIddigitalDownloadId
- the digitalDownloadIdjava.lang.Exception
- an unexpected exceptionDigitalDownload getDigitalDownloadById(int digitalDownloadId) throws com.konakart.app.KKException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
digitalDownloadId
- the digitalDownloadIdcom.konakart.app.KKException
- an unexpected KKException exceptionorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)Address[] getAddressesPerProduct(int productId) throws java.lang.Exception
productId
- the productIdjava.lang.Exception
- an unexpected exceptionvoid refreshConfigs() throws java.lang.Exception
java.lang.Exception
- an unexpected exceptionOptionIf[] createOptionsFromProductQuantityEncodedKey(java.lang.String encodedKey)
encodedKey
- the encodedKeyvoid updateProductReviewInfo(int productId) throws java.lang.Exception
productId
parameter is updated with information
regarding the average rating and the number of reviews present for the product.productId
- the productIdjava.lang.Exception
- an unexpected exceptionProducts getBundlesThatProductBelongsTo(java.lang.String sessionId, DataDescriptorIf dataDesc, int productId, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
productId
as one of the bundled products. Each of the returned
products has the bundledProducts
attribute populated with all of the bundled
products. The quantity
attribute of each bundled product determines the number
of instances of the product within the bundle and the encodedOptionValues
attribute of each bundled product contains a string with the encoded option values
determining the configuration of the product (e.g size, color etc.).sessionId
- the sessionIddataDesc
- the dataDescproductId
- the productIdlanguageId
- the languageIdoptions
- the optionsbundledProducts
attribute containing the products within the bundle.java.lang.Exception
- an unexpected exceptionProducts getBundlesThatProductsBelongTo(java.lang.String sessionId, DataDescriptorIf dataDescriptor, int[] productIds, boolean exactMatch, int languageId, FetchProductOptionsIf options) throws java.lang.Exception
productIds
as one or more of the bundled products. Each of the
returned products has the bundledProducts
attribute populated with all of the
bundled products. The quantity
attribute of each bundled product determines the
number of instances of the product within the bundle and the encodedOptionValues
attribute of each bundled product contains a string with the encoded option values
determining the configuration of the product (e.g size, color etc.).sessionId
- the sessionIddataDescriptor
- the dataDescriptorproductIds
- the productIdsexactMatch
- determines whether the call should return only bundles which contain exactly the
products sent in the array of product IDs, or return all the bundles which contain
at least all the products in the passed product IDs.languageId
- the languageIdoptions
- the optionsbundledProducts
attribute containing the products within the bundle.java.lang.Exception
- an unexpected exceptionProductImages getProductImages(ProductImagesOptionsIf options) throws com.konakart.app.KKException
options
- a ProductImagesOptions object for specifying the criteria used to define which
product images should be returned. Within this search object you can specify
productId and a file name filter (which is a regular expression).com.konakart.app.KKException
- if options is null or if no product with the specified productId can be found.void updateProductsOrdered(OrderIf order) throws java.lang.Exception
order
- the orderjava.lang.Exception
- an unexpected exceptionboolean cacheThisProduct(Product product) throws com.konakart.app.KKException
Only relevant in the Enterprise version.
product
- the product to be considered for cachingcom.konakart.app.KKException
- in unexpected circumstancesint removeStockReservationsForBasketItems(java.lang.String sessionId, BasketIf[] basketItems, StockReservationOptionsIf options) throws java.lang.Exception
sessionId
- the sessionIdbasketItems
- the basketItemsoptions
- the optionsjava.lang.Exception
- an unexpected exceptionint removeStockReservationsForBasketItems(int customerId, BasketIf[] basketItems, StockReservationOptionsIf options) throws java.lang.Exception
customerId
- the customerIdbasketItems
- the basketItemsoptions
- the optionsjava.lang.Exception
- an unexpected exceptionint removeStockReservationsForOrderProducts(java.lang.String sessionId, OrderProductIf[] orderProducts, StockReservationOptionsIf options) throws java.lang.Exception
sessionId
- the sessionIdorderProducts
- the orderProductsoptions
- the optionsjava.lang.Exception
- an unexpected exceptionint removeStockReservationsForOrderProducts(int customerId, OrderProductIf[] orderProducts, StockReservationOptionsIf options) throws java.lang.Exception
customerId
- the customerIdorderProducts
- the orderProductsoptions
- the optionsjava.lang.Exception
- an unexpected exceptionint removeStockReservationsForIds(java.lang.String sessionId, int[] idArray, StockReservationOptionsIf options) throws java.lang.Exception
sessionId
- the sessionIdidArray
- the idArrayoptions
- the optionsjava.lang.Exception
- an unexpected exceptionint removeStockReservationsForIds(int customerId, int[] idArray, StockReservationOptionsIf options) throws java.lang.Exception
customerId
- the customerIdidArray
- the idArrayoptions
- the optionsjava.lang.Exception
- an unexpected exceptionBasket[] reserveStock(java.lang.String sessionId, BasketIf[] basketItems, StockReservationOptionsIf stockReservationOptions) throws java.lang.Exception
The options allow you to:
quantityInStock
attribute. The reservation information is also persisted in the
database.
If any of the Basket items contain products or product variations no longer in the catalog then they are not included in the return array.
sessionId
- the sessionIdbasketItems
- the basketItemsstockReservationOptions
- the stockReservationOptionsreservationId
,
qtyResrvdForResId
and reservationExpiryDate
populated. The
reservationId
is set to -1 if the reservation could not be made because
the stock was not available or for any other reason.java.lang.Exception
- an unexpected exceptionCatalog getCatalogPerKey(java.lang.String catalogKey) throws java.lang.Exception
catalogKey
- the catalogKeyjava.lang.Exception
- an unexpected exceptionint getProductViewCountMaxRetries()
void setProductViewCountMaxRetries(int productViewCountMaxRetries)
productViewCountMaxRetries
- the productViewCountMaxRetriesProdCustAttr[] getCustomAttrsFromXML(java.lang.String xml)
xml
- The custom attribute data in xml formatjava.lang.String getXMLFromCustomAttrs(ProdCustAttrIf[] attrDescArray)
attrDescArray
- Array of custom attributesProductRelationship[] getAllProductRelationships() throws java.lang.Exception
java.lang.Exception
- an unexpected exceptionint updateProductLockItems(java.lang.String productId, java.lang.String shopIds) throws java.lang.Exception
shopIds
productId
- Product-ID for which the Lock should be setshopIds
- ;-Separated-List with shop-Ids where the Product should be lockedjava.lang.Exception
- an unexpected KKException exceptionint updateProductNotLockedItems(java.lang.String[] productIds) throws java.lang.Exception
productIds
productIds
- List with acutaly Locked Productsjava.lang.Exception
- an unexpected KKException exceptionCopyright © 2018 DS Data Systems UK Ltd.