daniel@servermule.com.au Posted June 13, 2013 Share Posted June 13, 2013 Hi, Is it possible to update the ordersummary.tpl so that includes discounts in the order summary? Where can I find a list of all variables that are available to be displayed or ised in the ordersummary.tpl and configureproduct.tpl pages? The problem I am trying to solve is this. 1) I've got a click through from a product site which passes the promotion code through on the URL. 2) When I get to the product configuration page the discount isn't shown but I would like it to be. 3) When I get through to the View cart the discount is correctly applied and the total show correctly however this is obviously confusing for the customer. As background I've used the slider template as the basis for my customisation. Any help or pointers in the right direction would be appreciated. Regards, Daniel 0 Quote Link to comment Share on other sites More sharing options...
redech Posted June 13, 2013 Share Posted June 13, 2013 You can give links out to users that will automatically apply a certain promotion code to their order if it applies. To do that, simply use a link like the one below: cart.php?promocode=TEST OR cart.php?a=add&pid=1&promocode=TEST Both of the above will apply the promotion code "TEST" to the order. With the first link, the user can choose the package they want and with the second they are taken straight to step 2 of the order process with product id 1 selected. More ways to link to WHMCS are detailed at Linking to WHMCS. 0 Quote Link to comment Share on other sites More sharing options...
daniel@servermule.com.au Posted October 21, 2013 Author Share Posted October 21, 2013 Hi Redech, Thanks for the comment and extremely sorry that it took so long for me to reply. I'm currently using your second method cart.php?a=add&pid=1&promocode=TEST to pass through the Promo code. Unfortunately it doesn't quite solve my problem. The discount code gets passed through however the discount VALUE doesnt get applied in the on the Product Configuration page it is only applied on the View Cart/Checkout page. The Product configuration page contains a price summary with a total cost in it without the discount. As a result I get questions from clients, why they can't see their discount on the Product Configuration page. I've had a look at the variables available in the page using {debug} and can't see the discounted value being available and also can't see the promo code itself anywhere so that I could manually go and figure it out. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted October 21, 2013 Share Posted October 21, 2013 I read one of the WHMCS guys (probably John) post not so long ago that discounts couldn't be shown on the config page (which is probably why it doesn't show up in debug). if your product doesn't need any config (i.e no domain or other settings), then it should go straight to viewcart (perhaps depending on your order form template)... you can also bypass the config page by adding "&skipconfig=1" to your links - I think if a domain is required with the product, then it may still go to config, but it should skip the step otherwise. your best bet maybe to tweak configureproduct.tpl to show a message that discounts will be displayed at checkout (i.e shown before they purchase). 0 Quote Link to comment Share on other sites More sharing options...
user101 Posted February 9, 2014 Share Posted February 9, 2014 Or you can use some PHP code (I know..) in configureproduct.tpl to fetch promotions from the database. Check if $_SESSION promo variable matches the one in database and product id, then modify the smarty variable. I'm horrified that this isn't included in whmcs already, as it confuses customers terribly. 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.