Jump to content

Display stock quantity on product/service


Recommended Posts

On 31/03/2020 at 01:25, Floatyfoot said:

How do I make stock quantity to display on the product/service so clients can see when stock is available or not and the quantity left. 

depending on what orderform template you're using, it might already do so - assuming stock control is enabled on the product.

for example, standard_cart will show stock quantities...

BYRq5Aj.png

Link to comment
Share on other sites

Hi Brian

I am using template six, and it doesn't show that. Is there a way to edit the product.tpl file to display that, and what code should I add. I saw on one of you post where you mentioned a code to be used. But I am confused in which line or file to put it.

Thanks.

Link to comment
Share on other sites

Hi @Floatyfoot

On 01/04/2020 at 16:54, Floatyfoot said:

I am using template six, and it doesn't show that.

it would be the standard_cart orderform template that shows it ? are you using that ??

i'm wondering if you're using WHMCS for IPTV and therefore already have a customised install ??

On 01/04/2020 at 16:54, Floatyfoot said:

Is there a way to edit the product.tpl file to display that, and what code should I add. I saw on one of you post where you mentioned a code to be used. But I am confused in which line or file to put it.

the latest version of standard_cartproducts.tpl is below, but if you're using an already customised version (as per above), then I wouldn't recommend overwriting the theme entirely, just alter the products.tpl template to suit your needs.

https://github.com/WHMCS/orderforms-standard_cart/blob/master/products.tpl

lines ~ 49 -53

                                    {if $product.qty}
                                        <span class="qty">
                                            {$product.qty} {$LANG.orderavailable}
                                        </span>
                                    {/if}

the code should work on most templates anyway, but perhaps not the span class css.

Link to comment
Share on other sites

Hi Brian

I am using template six, and it doesn't show that. Is there a way to edit the product.tpl file to display that, and what code should I add. I saw on one of you post where you mentioned a code to be used. But I am confused in which line or file to put it.

Thanks.

 

Thanks. I did that and its fine now. 

Link to comment
Share on other sites

  • 2 weeks later...
On 4/6/2020 at 9:41 PM, brian! said:

Hi @Floatyfoot

it would be the standard_cart orderform template that shows it ? are you using that ??

i'm wondering if you're using WHMCS for IPTV and therefore already have a customised install ??

the latest version of standard_cartproducts.tpl is below, but if you're using an already customised version (as per above), then I wouldn't recommend overwriting the theme entirely, just alter the products.tpl template to suit your needs.

https://github.com/WHMCS/orderforms-standard_cart/blob/master/products.tpl

lines ~ 49 -53


                                    {if $product.qty}
                                        <span class="qty">
                                            {$product.qty} {$LANG.orderavailable}
                                        </span>
                                    {/if}

the code should work on most templates anyway, but perhaps not the span class css.

I did not know that this is informational! 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • 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