Jump to content

sclemance

Member
  • Posts

    5
  • Joined

  • Last visited

About sclemance

sclemance's Achievements

Junior Member

Junior Member (1/3)

0

Reputation

  1. After some testing, it seems if I use (or concatenate) a variable, such as $myUri, it prepends the base installation URL. Specifically, if I do this: $navItem->setUri('https://newsite.com'); It works, and I get a link that looks like this: 'https://newsite.com' This also seems to work fine: $moreStuff = '/support'; $navItem->setUri('https://newsite.com' . $moreStuff); ...and I get a link that looks like: 'https://newsite.com/supprt' But if I do this: $myUri = 'https://newsite.com/support?client=' . $clientName; $navItem->setUri($myUri); ...the link ends up looking like this: 'https://mywhmcsurl.com/https://newsite.com/support?client=MrCustomer' And if I do this: $navItem->setUri('noProtocolOrDomain'); ...I get a link that looks like this: 'https://mywhmcsurl.com/noProtocolOrDomain' Leading me to believe there is some sort of glitch with the way WHMCS is parsing the URL parameters before intelligently deciding if the base URL needs to be prepended. Any thoughts? UPDATE: As I was about to submit this, I realized that even though the link produced with the prepended base WHMCS URLs looked okay otherwise, (and even worked if I chopped off the prepended bit), I wasn't using urlencode on the variables. Individually using urlencode on each variable allowed WHMCS to parse the string correctly and it's working now. We'll chalk that up to my rusty coding and 'zen-less' disposition lately. I'll leave my mess above in the post in case it helps anyone else.
  2. Updated to v8.0.3 from .2 and it's still occurring. Could it have anything to do with the fact that our WHMCS installation is running on Nginx?
  3. I'm having the same (similar?) issue which happened after our version 8 update. My WHMCS's primary domain is being prepended to the URI as such: if (!is_null($primaryNavbar->getChild('Support')->getChild('Tickets'))) { $primaryNavbar->getChild('Support')->getChild('Tickets')->setUri('https://theintendeduri.com/targetpage'); $primaryNavbar->getChild('Support')->getChild('Tickets')->setAttribute("target", '_blank'); } Produces this link: https://ourwhmcsdomain.com/https://theintendeduri.com/targetpage This, of course, will produce a 404.
  4. Hi, I'm trying to link to a bundle and include a promotion code, but it doesn't seem to work, (the promo code isn't added): mysite.tld/cart.php?a=add&bid=4?promocode=FREE-TRIAL If I add the promo code after following the link, it works fine. Are promo codes not compatible with bundles?
  5. Here's what I'd like to accomplish: We have several products which we sell from WHMCS, (not domains or webhosting), that we would like to bundle together, configure, and drop in the customer's cart from a different website, (ie. using links). Basically a big "Buy Now" button on a different page. As far as I know, there is no way to configure a bundle, (?a=add&bid=01), even though you can configure a product, (?a=add&pid=01&configoption[01]=01&skipconfig=1), if you want to go straight to the checkout process (&skipconfig=1). Any thoughts on how we might configure two or more products and dump them in the cart with a single click on a remote site? I'm not opposed to using the API perhaps, but I was hoping to keep this uncomplicated...
×
×
  • 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