Community Forums

Discuss, share and get help from our community of friendly WHMCS users

Close
Login to Your Account
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2014
    Location
    Wangaratta, Australia
    Posts
    9

    Default Modern Products Template MOD

    I think this should be a permanent change to the template.

    Description: Add's Sold Out to products so customers don't have to see the out of stock page.

    Before
    Click image for larger version. 

Name:	1493636481.png 
Views:	57 
Size:	636.7 KB 
ID:	13754
    After
    Click image for larger version. 

Name:	1493636506.png 
Views:	64 
Size:	637.8 KB 
ID:	13758


    Edit /public_html/whmcs/templates/orderforms/modern/products.tpl


    Remove (Line 65-69)
    Code:
                            {if $product.qty}
                                <span class="qty">
                                    ({$product.qty} {$LANG.orderavailable})
                                </span>
                            {/if}
    Replace
    Code:
                        <div class="text-right">
                            <a href="cart.php?a=add&{if $product.bid}bid={$product.bid}{else}pid={$product.pid}{/if}" class="btn btn-success btn-lg"><i class="fa fa-shopping-cart"></i> {$LANG.ordernowbutton}</a>
                        </div>
    
                    </div>
                </div>
    With
    Code:
                        <div class="text-right">
                        	<div class="name">
                                <span class="qty"><br>
                                    ({$product.qty} {$LANG.orderavailable})
                                </span>
                            </div>
                            <a href="cart.php?a=add&{if $product.bid}bid={$product.bid}{else}pid={$product.pid}{/if}" class="btn btn-success btn-lg {if $product.qty lt '1'} btn-danger disabled{/if}"><i class="fa fa-shopping-cart"></i>  {if $product.qty lt '1'} Sold Out{else}{$LANG.ordernowbutton} {/if}</a>
                        </div>
                    </div>
                </div>

  2. #2
    Join Date
    Feb 2013
    Location
    UK
    Posts
    7,179

    Default Re: Modern Products Template MOD

    I can still recall the original thread on this and it's recent update!

    https://forum.whmcs.com/showthread.p...966#post500966

    btw - not sure you need to both 0 Available and sold out - one's pretty obvious from the other.

  3. #3
    Join Date
    Nov 2015
    Posts
    6

    Default Re: Modern Products Template MOD

    Nice, I like it. Its a good little tweak if you sell game servers or similar. might have to check it out myself

  4. #4
    Join Date
    Sep 2014
    Location
    Wangaratta, Australia
    Posts
    9

    Default Re: Modern Products Template MOD

    Thanks Brian

Similar Threads

  1. products.tpl in modern order form customisation help
    By WebDevDors in forum Developer Corner
    Replies: 5
    Last Post: 07-23-14, 04:26 AM
  2. TAX Calculated twice on Modern Template
    By epaslv in forum Using WHMCS
    Replies: 1
    Last Post: 11-10-11, 04:38 PM
  3. V4.5.1 Modern Cart Template Issue
    By MikeDVB in forum General Discussion
    Replies: 4
    Last Post: 06-01-11, 11:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •