SilverNodashi Posted May 30, 2011 Share Posted May 30, 2011 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: https://billing.softdux.com/http%3C/span%3E%3Cbr%20/%3E//www.rvsitebuilder.com/ 0 Quote Link to comment Share on other sites More sharing options...
SilverNodashi Posted May 30, 2011 Author Share Posted May 30, 2011 Doesn't anyone know what the correct syntax is? 0 Quote Link to comment Share on other sites More sharing options...
SilverNodashi Posted June 6, 2011 Author Share Posted June 6, 2011 Can anyone please help me with this? Matt? John? Anyone? 0 Quote Link to comment Share on other sites More sharing options...
Alistair Posted June 7, 2011 Share Posted June 7, 2011 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... 0 Quote Link to comment Share on other sites More sharing options...
SilverNodashi Posted June 7, 2011 Author Share Posted June 7, 2011 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? 0 Quote Link to comment Share on other sites More sharing options...
Alistair Posted June 7, 2011 Share Posted June 7, 2011 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? 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted June 7, 2011 Share Posted June 7, 2011 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 likeadding 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. 0 Quote Link to comment Share on other sites More sharing options...
SilverNodashi Posted June 8, 2011 Author Share Posted June 8, 2011 I would suggest that this is a bugAny 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? 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted June 8, 2011 Share Posted June 8, 2011 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. 0 Quote Link to comment Share on other sites More sharing options...
SilverNodashi Posted June 8, 2011 Author Share Posted June 8, 2011 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. 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted June 8, 2011 Share Posted June 8, 2011 (edited) 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 June 8, 2011 by sparky 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted June 13, 2011 Share Posted June 13, 2011 it's a "Bug" interpreting the colon : in your url - you need to remove the colon as a temporary measure and make the links relative not absolute 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted August 7, 2011 WHMCS CEO Share Posted August 7, 2011 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 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.