rob2 Posted January 18, 2016 Share Posted January 18, 2016 Hi, because i sell many difference products via whmcs, i have TOS link already, but i still hope to show some important message on ordering/checkout page, had better i can set different important message for different product or product Group, is it possible ? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 18, 2016 Share Posted January 18, 2016 it's possible, but how will depend on which order-form template you're using, where you want to display the message and when. as an example, if you were using standard_cart, you could modify the viewcart.tpl template to do this... all i've done is added a new tab, then it loops through the products in the cart and displays a specific message for each product (currently based on product group - but you could do it by groups or individual products or domains etc). <div class="view-cart-tabs"> <ul class="nav nav-tabs" role="tablist"> <li role="presentation" class="active"><a href="#furtherInfo" aria-controls="furtherInfo" role="tab" data-toggle="tab">{$LANG.information}</a></li> <li role="presentation"><a href="#applyPromo" aria-controls="applyPromo" role="tab" data-toggle="tab">{$LANG.orderForm.applyPromoCode}</a></li> {if $taxenabled && !$loggedin} <li role="presentation"><a href="#calcTaxes" aria-controls="calcTaxes" role="tab" data-toggle="tab">{$LANG.orderForm.estimateTaxes}</a></li> {/if} </ul> <div class="tab-content"> <div role="tabpanel" class="tab-pane active promo" id="furtherInfo"> <div class="nav-tabs"> {foreach $products as $num => $product} {if $product.productinfo.gid eq "10"}Congratulations, you have ordered from the {$product.productinfo.groupname} group - please remember to pay the invoice!<br /><br /> {elseif $product.productinfo.gid eq "9"}You've ordered {$product.productinfo.name} - check the configuation is correct.<br /><br />{/if} {/foreach} </div> </div> bear in mind that this is just a very basic example - so it doesn't currently check for multiple products from the same group (so you might get duplicate messages); it doesn't check for domains (it can do - it's just another loop to add); it doesn't output in the customer's language (but you can fix that by using Language Overrides)... it can easily be made more powerful, it's just a case of working out the logic and appropriate text to show. if you're using an order-form template other than standard_cart, then there might be other/better ways to do it - but this should be a good starting point for you. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.