Jump to content

how to add URL's to product descriptions in WHMCS 4.5.1?


SilverNodashi

Recommended Posts

Does anyone know what the correct syntax is to now add a URL to product descriptions to products (WHM Admin > Setup > Product / Services > Edit Product > Details > Product Descriptions)?

 

 

In the past I had something like this:

 

<a href="http://www.cpanel.net" target="_blank">cPanel</a> Control Panel

<a href="http://netenberg.com/fantastico_scripts.php" target="_blank">Fantastico De Luxe</a> script installer

<a href="http://www.rvsitebuilder.com/" target="_blank">RVSiteBuilder</a>

 

 

But when I view the order form it only shows the last entry, aka "RVSiteBuilder" and the link doesn't work properly either.

 

 

You can see it here: https://billing.softdux.com/cart.php

 

When you click on the RVSiteBuilder link, it opens up the URL as follows:

 

Link to comment
Share on other sites

This looks like it is a bug with the modern cart...

 

A temporary solution would be to use the Link Tracking facility under the Utilities menu. Create a link to cPanel.net. The URL of this link will then be http://www.yoursite.com/whmcs/link.php?id=1 - then add this to your product description:

 

<a href="link.php?id=1" target="_blank">cPanel</a> Control Panel

 

I know it is not ideal, but it is a temporary solution. For some reason, the system URL is being put in front of the a href link...

Link to comment
Share on other sites

 

I know it is not ideal, but it is a temporary solution. For some reason, the system URL is being put in front of the a href link...

 

This is the one problem. The other problem is that it cuts-off the first URL(s) and only displays the last one. So if you have 3, URL1 & URL2 is cutt-off.

 

 

But, is this actually a bug, or has this changed and the documentation hasn't been updated yet?

Link to comment
Share on other sites

This is the one problem. The other problem is that it cuts-off the first URL(s) and only displays the last one. So if you have 3, URL1 & URL2 is cutt-off.

 

 

But, is this actually a bug, or has this changed and the documentation hasn't been updated yet?

 

Well I would say it is a bug because HTML is supposed to be accepted in that field - it shouldn't depend on which cart you are using.

 

Why don't you "report" this thread and see if you can get Bear or someone to move it to Bug Reports - where hopefully you will get a better answer?

Link to comment
Share on other sites

I would suggest that this is a bug

Any link to a different url has a colon (:) in it and the description looks to be reading line by line and splitting on the colon

as per the docs

For example, on shared hosting products you might create a description like this:

Disk Space: 1000MB Bandwidth: 5GB Email Accounts: 5 Subdomains: 3 Addon Domains: 1 And a further text description can go here to be displayed below the highlights...

I would suggest that the options should be entered in some other way like

adding them like this

[[Disk Space: 1000MB]]

then simply remove anything between and including the [[ and ]] in the main cart.php file.

That way it doesn't affect the html code within the description.

Link to comment
Share on other sites

I would suggest that this is a bug

Any link to a different url has a colon (:) in it and the description looks to be reading line by line and splitting on the colon

as per the docsI would suggest that the options should be entered in some other way like

adding them like this

[[Disk Space: 1000MB]]

then simply remove anything between and including the [[ and ]] in the main cart.php file.

That way it doesn't affect the html code within the description.

 

Sparky, I'm not even following you on this one, at all.

 

Where do you see a clear reference to how HTML should be entered?

Link to comment
Share on other sites

Ok... by the looks with the new functionality with the comparison/modern/slider cart templates this type of code is needed

Disk Space: 1000MB
Bandwidth: 5GB
Email Accounts: 5
Subdomains: 3
Addon Domains: 1

(The other one I posted wrapped the lines)

 

It appears that each line is split on the colon( : ) to get the variables for some functions in the new cart templates and each line it checks a <br /> is also added.

 

Any other html should work as normal except that the <br /> that is added almost destroyes the normal html that is entered into the description. Also because any line that has a colon in it gets split so that also destroys any links that you may have entered.

 

To the suggestion I made:

By using double square brackets to add the extra code above, anything that is within those brackets is not added to the description at all. So then the description should work as it normally would have and not have any extra line breaks added and not destroying any links.

 

Hope that has made it clearer for you... if not I'll try to give some examples.

Link to comment
Share on other sites

Ok... by the looks with the new functionality with the comparison/modern/slider cart templates this type of code is needed

Disk Space: 1000MB
Bandwidth: 5GB
Email Accounts: 5
Subdomains: 3
Addon Domains: 1

(The other one I posted wrapped the lines)

 

It appears that each line is split on the colon( : ) to get the variables for some functions in the new cart templates and each line it checks a <br /> is also added.

 

Any other html should work as normal except that the <br /> that is added almost destroyes the normal html that is entered into the description. Also because any line that has a colon in it gets split so that also destroys any links that you may have entered.

 

To the suggestion I made:

By using double square brackets to add the extra code above, anything that is within those brackets is not added to the description at all. So then the description should work as it normally would have and not have any extra line breaks added and not destroying any links.

 

Hope that has made it clearer for you... if not I'll try to give some examples.

 

Sparky, you completely missed my original request.

 

 

How do I actually add URL's to that description box?

 

 

i.e. let's say I have:

 

 

Disk Space: 1000MB
Bandwidth: 5GB
Email Accounts: 5
Subdomains: 3
Addon Domains: 1
<a href="http://www.cpanel.net" target="_new">cPanel Control Panel</a>
<a href="http://www.rvsitebuilder.com" target="_new">RVSiteBuilder</a>
<a href="http://www.Softaculous" target="_new">Softaculous</a>

 

Then you'll see that the firs 2 URL's are ignored, and the 3rd URL is used, but appended to the WHMCS billing portal (i.e. where you install WHMCS)'s URL.

 

 

 

So, I'm, asking what the correct syntax is to add URL's.

Link to comment
Share on other sites

Sparky, you completely missed my original request.

 

 

How do I actually add URL's to that description box?

 

 

i.e. let's say I have:

 

 

Disk Space: 1000MB

Bandwidth: 5GB

Email Accounts: 5

Subdomains: 3

Addon Domains: 1

<a href="http://www.cpanel.net" target="_new">cPanel Control Panel</a>

<a href="http://www.rvsitebuilder.com" target="_new">RVSiteBuilder</a>

<a href="http://www.Softaculous" target="_new">Softaculous</a>

Then you'll see that the firs 2 URL's are ignored, and the 3rd URL is used, but appended to the WHMCS billing portal (i.e. where you install WHMCS)'s URL.

 

 

 

So, I'm, asking what the correct syntax is to add URL's.

I am saying that it is almost not possible to make adding links work how it is!

 

I believe that this is a bug and should be rectified.

 

As Alister suggested using the link way should work as there wont be a colon in the url... it would be something like

Disk Space: 1000MB 
Bandwidth: 5GB 
Email Accounts: 5 
Subdomains: 3 
Addon Domains: 1 
<a href="link.php?id=1" target="_new">cPanel Control Panel</a>
<a href="link.php?id=2" target="_new">RVSiteBuilder</a> 
<a href="link.php?id=3" target="_new">Softaculous</a>

Edited by sparky
Link to comment
Share on other sites

  • 1 month later...
  • WHMCS CEO

The : (colon) in a line denotes feature:value syntax for the new feature highlighting (http://docs.whmcs.com/Standard_Order_Form_Templates) and hence why you can't use those in the description if you use a cart template that utilises that new feature. It's not a bug. But there's 2 solutions:

 

1. Use the WHMCS link tracking - http://docs.whmcs.com/System_Utilities#Link_Tracking - create your full urls as links, then in the description simply link to <a href="link.php?id=xxx">xxx</a> - no problem

 

or

 

2. If you don't want to change your links, then you can simply edit the products.tpl template file in your order form template of choice and change the {$product.featuresdesc} variable to {$product.description} and then the feature highlighting functionality is ignored and the description will display exactly as entered.

 

Hope that helps.

 

Matt

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