please excuse my very basic Knowledge but I have a dataset linked to my product page which shows the quantity in stock. Due to the custom nature of the product it shows that I have 170 “in stock” were as there are is only 1 but 170 variations of that product. There is no way to change this in the back end so I would like some code to divide the number displayed through the dataset to be divided by 170 to give the correct stock quantity.
First of all, you can use an afterQuery hook on the backend (recommended).
But if you want to do it on the front-end, then it depends if you work directly with your collection or with a dataset. In that case (i.e. if you go for the front-end solution) it also depends on whether it’s a single item or a repeater with several/many items.
Hi JD thanks for getting back to me so quickly I think i would have to add it on the front end ( in the code panel?) because my product pages are custom built, not linked in to the wix store. it will be a single product page with the data linked to one txt box on each page.