Displaying Product Stock Level Outside Store Directory

Hi guys,

Could I get some help on an issue im interested in…Im wondering how to go about simply calling the stock level number for a particular product and display them on my homepage which is seperate from the store?

So if i have 100 items left of a product, I want to be able to simply get the stock value for that particular product, and print it between my content on my home page which will be outside my store directory, my store will probably be located at something like domain.com/offer/

Im thinking i’ll need to call a script somehow in my homepage and then use the variable that displays the number of stock left for that item? Any idea how I could put this into a simple few lines of code? It shouldn’t be difficult.

Thanks guys, If i can figure out how to do this then I can test things better and look into purchasing my copy soon.

thanks in advance, hope i can get a quick answer also so i can progress my site’s other work.

Use PHP to pull the variable out of the MySQL Database.

Table is [COLOR=blue]cscart_products[/COLOR]

Inventory is under variable [COLOR=blue]amount[/COLOR]

Thanks alot for that. Dont know a thing about how to write one of these peices of code, im guessing Best thing might be to google how to open and read a mysql database and see if I can get it to work, unless somebody shares what code i need to write to get this variable read in the meantime.

Many thanks for that, this should help me just fine :slight_smile: Cheers bud!

Just reporting in to say thank you, i found the code to connect to the db and login, and select the value into an array and print it out, was getting resource id #2 errors otherwise.

Many thanks, works like a charm!