cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

in stock quantity is not displaying on PDP page

Former Member
0 Likes
1,146

Hi All, We are not able to see in stock quantity on PDP page. Below is the impex file code snippet: INSERT_UPDATE StockLevel;available;warehouse(code)[unique=true];inStockStatus(code);maxPreOrder;maxStockLevelHistoryCount;overSelling;preOrder;productCode[unique=true];reserved ;100;warehouse_c;forceInStock;0;-1;0;0;CCAP00001;0 Thanks!

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Likes

Any other suggestion Please. Available stock quantity not coming.

VinayKumarS
Active Contributor
0 Likes

Hello Asif Bhai,

Just adding stock in stocklevel is not enough. We need to associate the stocklevel to the product. i am not sure which product catalog you are using. just update the catalog version variables and follow the script.

Correct the catalog version according to your application and After running the below script you pleas do the synchronization.

 $productCatalog=powertoolsProductCatalog
 $productCatalogName=Powertools Product Catalog
 $catalogVersion=catalogversion(catalog(id[default=$productCatalog]),version[default='Staged'])[unique=true,default=$productCatalog:Staged]
 $vendor=powertools
 
 INSERT_UPDATE StockLevel;productCode[unique=true];warehouse(code)[unique=true,default=default];available;inStockStatus(code);maxPreOrder[default=1];maxStockLevelHistoryCount[default=-1];overSelling[default=0];preOrder[default=0];reserved[default=0]
 ;CCAP00001;warehouse_c;1000;forceInStock
 
 INSERT_UPDATE Product;code[unique=true];stockLevels(productCode,warehouse(code));vendors(code)[default=$vendor];$catalogVersion
 ;CCAP00001;CCAP00001:warehouse_c
 
Former Member
0 Likes

Hi Vinay, Yes, I also associated the stocklevel with product. I ran ur script also by updating catalog & vendor but no success.

VinayKumarS
Active Contributor
0 Likes

synchronize and run the full index. can u also attach what exactly you are seeing in the screen???

Former Member
0 Likes
Former Member
0 Likes

Hi,Attached herewith is the screenshot. Yes, I synchronize and run full index. I am able to see available stock in BO.. But on debug found stock level is coming empty in frontend. Thanks!

VinayKumarS
Active Contributor
0 Likes

Add to Cart Button enabled means. you are getting the stock. I am not sure where and which debug you are not seeing the value. But frontned it is fine. i think you might be seeing the wrong place in debug

Former Member
0 Likes

Hi Vinay, If you check screenshot. The available stock count(100) before 'In stock' is not coming on page. Its just showing In stock text. Not the available stock of product.

VinayKumarS
Active Contributor
0 Likes

There is some logic behind to display available .. 100 available check in the .tag files

Former Member
0 Likes

It comes based on stocklevel property of StockData.java and its coming empty. I chked the .tag file and also debug the code. stocklevel is empty. While in BO i can see available count. While for powertool storefront stock level value is cod displaying on PDP page. What could be the cause that quantity is there in BO while coming empty in frontend.? Stock statuc "Instock" & "out of stock" is refelecting based on my changes. Issue is only with quantity.

Former Member
0 Likes

try changing forceInStock with 'notSpecified' and import the impex.

Let me know how you go.

Former Member
0 Likes

Hi, product became out of stock after changing stock status to notSpecified. I also ran full index but no success. What else we can try