Jump to content

Web20cart To Show Available Domains in Green and Not Available in Red


Dan The Man

Recommended Posts

Hi everyone, please will someone help me with a quick Web20cart customisation.

 

Currently the Web20cart order form shows available domains and domains not available all in the same black font when ordering a product, but what is strange is that in the style sheet there is a green and red rule.

 

I have tried to get this right, but I haven't been able to succeed.

 

Files involved are: Orderforums, Web20cart

 

Stylesheet

configureproductdomain.tpl

 

Please can someone help me out with getting the colours right?

 

Thank you

Link to comment
Share on other sites

any chance of uploading a screenshot to show exactly where this is happening?

 

I had a quick play with this and when selecting a product that requires a domain, the available domains are showing up in green, unavailable in red... the only list I can see in black would be the list of alternative domains (and they'll all be available anyway).

Link to comment
Share on other sites

Hi Brian! Thank you for your reply, I would love some help yes please :)

 

Please make sure you are using a link to order a product, as this seems to be a specific part of the ordering process.

 

Here is a screenshot:

 

/http://s24.postimg.org/sy843cuxt/Screenshot_grey.jpg

Edited by Dan The Man
Link to comment
Share on other sites

apologies Dan, I was looking in ajaxcart - it's been a long day. :twisted:

 

I now see what you mean about textgreen and textred - there's probably a conflict somewhere, maybe the if statement itself, so we'll override it... I can think of two solutions to this - well the same solution, but two choices of where to make the changes - i'll give you both.

 

first option would be to use language overrides - http://docs.whmcs.com/Language_Overrides - if your site uses more than one language, then the second option might be better, or just make language overrides in all of your sites languages... remember that it will make all instances where the variables are called display the text in that colour... so if you are using a variety of different order forms and your template too, this method will affect how these variables are shown in all of them - but you may want that!

 

so in the "lang" folder (whmcs/lang), make a folder called "overrides" and create a file within it called english.php (or whatever your default language is) - inside which enter the following.

 

<?php

$_LANG['domainavailable'] = "<font class='textgreen'>Available! Order Now</font>";

$_LANG['domainunavailable'] = "<font class='textred'>Unavailable</font>";

?>

now the text inside the box in your image will be green if available and red if not.

 

the second solution involves the same changes as above, but by specifically editing configureproductdomain.tpl - so these changes will only affect that one page.

 

so find the following in the code - should be around line 114

 

{$LANG.domainavailable}{else}{$LANG.domainunavailable}{/if}

and replace with...

 

<font class='textgreen'>{$LANG.domainavailable}</font>{else}<font class='textred'>{$LANG.domainunavailable}</font>{/if}

 

the same line of code is also in adddomain.tpl too, so you may need to repeat the change their too if you want to be consistent.

 

hope that helps! :)

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