Jump to content

extra message on ordering page ?


rob2

Recommended Posts

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 ?

Link to comment
Share on other sites

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...

 

ButirAE.png

 

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. :idea:

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