Jump to content

Infused-Hosting

Retired Forum Member
  • Posts

    7
  • Joined

  • Last visited

About Infused-Hosting

Infused-Hosting's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. Hi Brian The main reason is so any potential customer has to sign up before being able to proceed with the order so if they decide not to finish the order for some reason, we still have their details so we can send them an automatic email to try and get them back. We seem to see a lot of potential customers going through the checkout system but then not finalising a purchase for some unknown reason hence the idea above. If its not feasible or doable then we'll leave it as normal but I'm seeing more and more companies asking for login/sign up before the cart system Thanks
  2. Hi Brian, Thanks for the info. The code for the hook I'm using it the following: <?php add_hook("ClientAreaPageCart",1,function($vars){ $client = Menu::context("client"); $clientid = (int) $client->id; if ($clientid===0){ header("Location: login.php"); exit; } }); ?> All I want really is so when people click through our website using a direct link to the product ordering, it asks them to login or register first then redirect them back to continue with the product ordering. Thanks Alec
  3. Hi, I am looking to achieve the following when ordering on our WHMCS. All of our items are ordered through our main website - Each item links directly into the cart / item configuration on WHMCS. We do not allow browsing or selecting products within WHMCS itself. I googled and found a hook that allows me to redirect anyone who accesses the cart to the login/registration page. This is great but once registered or logged in, they are redirected to the client area and not the cart so they can continue with their order. Id prefer if possible that the client is then redirected back to complete their order rather than having to start over again going back to the main website to click on a new product to start again. Thanks Alec
  4. Good spot. I thought something was missing but never checked the original. Thank you
  5. Edit sorry I am using the following hook to redirect store menu items to various pages. It was working but now has randomly stopped working. This is the code: <?php # Change Store Navbar Links Hook # Written by brian! use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimaryNavbar', 1, function(MenuItem $primaryNavbar) { $Store = $primaryNavbar->getChild("Store"); if (empty($Store)) { return; } $StoreChildren = $Store->getChildren(); $kidslinks = array("Website Hosting", "Reseller Hosting", "Virtual Servers", "Dedicated Servers", "VPN",); foreach($StoreChildren as $key => $Store_details_child) { if (in_array($key, $kidslinks)) { if ($key === "Website Hosting"){$newlink = "https://infusedhosting.co.uk/website-hosting/";} elseif ($key === "Reseller Hosting"){$newlink = "https://infusedhosting.co.uk/reseller-hosting/";} elseif ($key === "Virtual Servers"){$newlink = "https://infusedhosting.co.uk/virtual-servers/";} elseif ($key === "Dedicated Servers"){$newlink = "https://infusedhosting.co.uk/dedicated-servers/";} elseif ($key === "VPN"){$newlink = "https://infusedhosting.co.uk/vpn/";} } } });
  6. Actually fixed this now. I had missed one of the titles off the redirect hook for Order New Services. This now works. There was also a livehelp.php hook adding the chat now navbar item, once removed this is now gone. Thanks
  7. Hi, I am trying to remove / edit the navbar items on our WHMCS installation. So far when not logged in, I've used a hook to redirect store menu links to the appropriate page on our main website. I'm now trying to edit the navbar once signed in by either A) Redirect "Order new services" to the main website OR B) Remove "Order new servers" completely from the dropdown. Reason being, I don't want customers being able to access the cart.php file unless processing an order. I've already enabled the redirect home to login page to reduce the chance of accessing the order cart manually. Our navbar also shows "Chat Now" but we dont have the live chat function installed. I tried the following hook in a new file but doesnt seem to work <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { if (!is_null($primaryNavbar->getChild('Chat Now'))) { $primaryNavbar->removeChild('Chat Now'); } }); Thanks Alec
×
×
  • 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