Jump to content

How can I find out the number of products in stock?


Kodelabs

Recommended Posts

Hello WHMCS Family,
I am selling a server from a hosting site and I need to show the number of servers that the client has staked out.
I am writing the inventory name from the admin panel, but it does not appear on the system What should I follow in order to be able to show it? http://prntscr.com/ilenh8

I need to show it in the red blog here: http://prntscr.com/ileog2
how do you rate the number of products in stock?

 

Quote

Note: I hope this is the correct categorie opened, if the subject is wrong place apologize :(

 

 

Link to comment
Share on other sites

20 hours ago, Kodelabs said:

how do you rate the number of products in stock?

so you want to do something like the image below - either show it's out of stock (Tükenmiş Durumda) or the quantity available ?

JEUbDls.png

if you were inside the cart, the variable would already exist {$product.qty} and you would just edit the products.tpl template to display it (or an out of stock message)... but looking at your website, this is occurring outside of the cart and you are using Data Feeds to display this information.

that being the case, I would just tweak the code within productsinfo.php data feed - even better to avoid it being overwritten during an update, create a new .php file in the feeds directory, copy the entire code but change...

    $description = str_replace(array("\r", "\n", "\r\n"), "", nl2br($description));

to...

    $description = str_replace(array("\r", "\n", "\r\n"), "", nl2br($description));
    $description .= '<br>Adet : '.$data['qty'];

and then call that new data feed for any product that you want to show a stock quantity for...

aSRfAIO.png

for any product, you don't want to show stock quantity for, just use the productsinfo.php data feed as you are now. :idea:

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated