Jump to content

Direct Order Link Preset Selections


AndyW

Recommended Posts

  • WHMCS CEO

You can set the billing cycle by simply appending &billingcycle=xxxx to the cart.php?a=add&pid=x links you already get from WHMCS. For example cart.php?a=add&pid=5&billingcycle=annually

 

And the simplest way of formulating an url for direct linking when wanting to set custom fields, configurable options and/or addons is to step through as normal to the product configuration step, then right click > view source and get the field names and value IDS from there.

 

There's already some linking info @ http://wiki.whmcs.com/Linking_to_WHMCS

 

Matt

Link to comment
Share on other sites

  • 4 weeks later...

Hello All:

 

I have a related question / issue:

 

In order to set language, currency, and layout we use order links like this:

https://domain.com/accounts/cart.php?systpl=default&a=add&pid=328&currency=2&language=French

... that is, adding, for example,

systpl=default

for the layout, and

&currency=2

for EURO, and

&language=French

for the language the customer will see.

 

Now, my question is this -- we ONLY use the "default" layout (systpl=default) -- as this looks in my opinion far nicer than that bluish dark design you see e.g. here http://demo.whmcs.com/.

Instead of adding "systpl=default" to the order links, is there a more elegant way to do this -- e.g. renaming some folders within the WHMCS install? Because many of the auto-created links within the email templates, if a customer follows them, will get the customer to the dark/blue design again, and not the one named "default".

 

Hope my description was not too confusing.

 

 

Frank

Link to comment
Share on other sites

  • 5 months later...
  • WHMCS Support Manager

The simplest way of formulating a url is to step through the order process as normal to the product configuration step, then right click > view source and get the field names and value IDS. These can then be used in your direct link URLs, for example:

 

http://demo.whmcs.com/cart.php?a=add&pid=1&configoption[X]=XX

Link to comment
Share on other sites

  • 2 months later...

I'm very disappointed in this whole linking and setup system. I've done web coding for years but it would be nice to get all information for new resellers in one step. I have yet to find in over 15 hours spent on this project how to get my cart integrated within my web pages. I've seen the videos, read the tutorials...I feel ripped off.

Link to comment
Share on other sites

  • 6 months later...
You can set the billing cycle by simply appending &billingcycle=xxxx to the cart.php?a=add&pid=x links you already get from WHMCS. For example cart.php?a=add&pid=5&billingcycle=annually

 

And the simplest way of formulating an url for direct linking when wanting to set custom fields, configurable options and/or addons is to step through as normal to the product configuration step, then right click > view source and get the field names and value IDS from there.

 

There's already some linking info @ http://wiki.whmcs.com/Linking_to_WHMCS

 

Matt

 

This method did not work with the AJAX cart so I fixed the variable in 'order/index.php:

 

Original: $billingcycle = $_REQUEST['billingcycle'];

 

New fixed: $billingcycle = 'annually';

 

Is this syntax correct?

 

Thanks!

Link to comment
Share on other sites

  • 3 months later...
  • 4 months later...
You can set the billing cycle by simply appending &billingcycle=xxxx to the cart.php?a=add&pid=x links you already get from WHMCS. For example cart.php?a=add&pid=5&billingcycle=annually

 

And the simplest way of formulating an url for direct linking when wanting to set custom fields, configurable options and/or addons is to step through as normal to the product configuration step, then right click > view source and get the field names and value IDS from there.

 

There's already some linking info @ http://wiki.whmcs.com/Linking_to_WHMCS

 

Matt

As already noted setting billingcycle from the URL doesn't work with the Ajax form.

 

Note: I'm using WHMCS 4.4.2 as I'm cautious about updates. Does anyone know if the issue is fixed by a later version?

 

If not this makes a real mess of the form for me as it has knock on effects for a user arriving from a special offer page. It means the "Order Summary" is a right mess (domain reg not free, discount not applied etc.).

 

Take a look here: https://managedwebsitehosting.net/clients/order/?pid=1&skip=1&billingcycle=annually&promocode=NEWS20

 

The user should see a £39.95 product discounted down to £19.95 including a free domain.

 

Instead they see: an "Order form" with input for domain name, alongside "Order Summary" with product and discount, but wrong billing cycle (monthly) and wrong price because the discount applies to annual not monthly.

 

When they provide a domain: this appears in the order summary at a cost of £23.95 (that's 2 years for a .co.uk domain) which is more than the total of £19.95 they are expecting! Domain reg should be listed at £0.00 because it is free. Aggh!

 

I'll lose every customer at this point!

 

If the billingcycle was correctly set to annual it all looks much better, although there's still one annoyance... the "Domain Configuration" form has DNS/Email unchecked even though they will be free, which is a pain too.

 

Is the billingcycle thing a bug?

Is it fixed since 4.4.2?)

Is there a workaround (e.g. editing order/index.php)?

Any solution to the annoyance with DNS/Email being unchecked?

 

Thanks guys,

 

Mark

Link to comment
Share on other sites

  • 1 year later...

Sorry to revive an old thread like this but I have a question about enabling/disabling ADDONS via URL. This is the config page URL:

 

http://dev.com/cart.php?a=confproduct&i=0

 

The only addon on this page has the following "name": addons[2]

 

I tried adding "addons[2]" to the URL but it does not pre-select it. I also tried "addons[]=2" but that doesn't work either.

 

Am I adding it to the wrong page? Someone please help me with this.

 

Thanks!

Link to comment
Share on other sites

So, apparently I was doing it wrong. The correct way to do it is to get the Direct Link from your WHMCS Admin and then add "&addon=XX" where XX is the ID of addon. As soon as you enter this URL, it will take you to the configpage URL I posted on the post right above this one.

 

Hope this helps someone.

 

Now if I could only find a way to add items to cart via Ajax without the visitor ever seeing the config page... hmm...

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