Ajax Products Stock
This section describes all the methods available within the "Product Stock" family of Ajax methods. From these methods you can access product stock data.
Ajax Method Group: Ajax_Products_Stock
checkStock
Overview
Permission Required: None
Method Call: /ajax/Ajax_Products_Stock/checkStock
Aurora Demo Example URL: https://demo.auroracommerce.com/ajax/Ajax\_Products\_Stock/checkStock?argument\[0\]\[product\_id\]=1
Example JavaScript:
$.ajax({
url: '/ajax/Ajax_Products_Stock/checkStock',
data: {'argument[]': {
product_id: 42486,
store_id: 123
}},
success: function(response) {
if (typeof response.error_code == 'undefined') {
alert(response.product_id+" = "+response.product_stock);
} else {
alert(response.error_detail);
}
},
dataType: 'json'
});
Method Description
Request Parameters
Parameter | Values | Description | Required |
---|---|---|---|
product_id | Integer | The Internal ID Aurora uses to identify a Product. | Yes, when variation_id is not specified |
variation_id | Integer | The Internal ID Aurora uses to identify a Variation. | Yes, when product_id is not specified |
store_id | Integer | The Internal ID Aurora uses to identify a Shipping Store. | No |
internal_store_id | String | The "Internal #" as specified on the Orders > Shipping > Store > Edit Store page. | No |
Updated over 2 years ago