JamesN Posted October 21, 2021 Share Posted October 21, 2021 Greetings, all! I am having some issues after I upgraded to whmcs8. The orderform I used before (modern, now known as legacy_modern) used to work great when I did a direct checkout link using the &skipconfig=1 on the checkout link. This means - my customers clicked on my wordpress on the product they want, so they were taken directly to the checkout, with the product pre-loaded in cart. After moving to WHMCS 8 - I tried using the legacy_modern and it no longer works. When a customer clicks on the direct checkout link, that contains &skipconfig=1 - they go to Review & Checkout page. Which is not ideal, as my customers (as its probably the case with most) are kinda lazy, and I am missing on potential sales, as they need to click on an additional button. I kinda figured out how to fix this, and added a hook that I found on here by @brian! and added it. Here is the hook: <?php # ViewCart For Clients Only Hook # Written by brian! function viewcart_for_clients_only_hook($vars) { $client = Menu::context('client'); if (!$client && $vars['templatefile'] === 'viewcart' && $vars['checkout'] !== true) { header("Location: cart.php?a=checkout"); exit; } } add_hook("ClientAreaPageCart", 1, "viewcart_for_clients_only_hook"); It is a great hook, however that leaves the customer without an option to empty the cart, in case they added more than one product by mistake. Another thing that is missing from the old Modern template is the order summary - where it shows what has been added to the cart, pricing, etc. So I was wondering - can anyone help me out with: 1. add a hook that adds "empty cart" category and button to the checkout.tpl sidebar; 2. add a hook or something else? that will show the order summary on the checkout.tpl, so customers know what has been added to cart when they click on the direct checkout link? I am a bit lost, and sad that its no longer working the way it used to. Hopefully some of your smart and experienced people can help me out with this :-) Thank you very much for your time and help! 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.