Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Can't use HTML in the description section of Payment Settings

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 03-21-2016, 05:26 AM
  GlasPak's Avatar 
GlasPak GlasPak is offline
 

eXpert
  
Join Date: May 2015
Posts: 241
 

Default Can't use HTML in the description section of Payment Settings

I am trying to modify the payment description and would like to add 2 <br> to the description but x-cart keeps removing the html from the description. Anyway to use html in the description box?
__________________
Business License
https://glaspak.com
GoDaddy VPS - Apache with WHM
2GB ECC DDR3 1600MHz
2x Intel E5-2630L v2 Hex Core 2.4/2.8ghz
15 MB proc cache
60 GB 10k RPM hdd
PHP 7.0.15
MariaDB 10.1.21 with InnoDB engine
Reply With Quote
  #2  
Old 03-21-2016, 04:27 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Can't use HTML in the description section of Payment Settings

Is it removing it from the admin side, like taking it away from the input box, or is it just not rendering it on the front of the site?

2 different issues, for the first you would need to allow html in that field on the admin side, probably require some PHP decorating of that class, for the second you would need to edit the template. Both tasks are fairly easy to do if you are an experienced developer, but it would be tough otherwise.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #3  
Old 03-28-2016, 12:45 AM
  razortw's Avatar 
razortw razortw is offline
 

X-Cart team
  
Join Date: Feb 2015
Posts: 807
 

Default Re: Can't use HTML in the description section of Payment Settings

Quote:
Originally Posted by GlasPak
I am trying to modify the payment description and would like to add 2 <br> to the description but x-cart keeps removing the html from the description. Anyway to use html in the description box?
Hi there.
You will need to modify the default/en/checkout/steps/shipping/parts/paymentMethod.tpl template and add the ":h" modifier to the {method.getDescription()} expression as follows.
Code:
<div IF="{method.getDescription()}" class="payment-description">{method.getDescription():h}</div>
This will apply to offline payments only. If you need to use HTML in PayPal's description or other online payment, you will need to modify their own templates. Use Webmaster mode to identify the exact template to be edited.
__________________
Best regards,
Igor Pudovkin
X-Cart hosting team
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 08:21 PM.

   

 
X-Cart forums © 2001-2020