X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   URGENT - Need to use PHP in html description (https://forum.x-cart.com/showthread.php?t=46541)

loopsound 03-25-2009 09:12 AM

URGENT - Need to use PHP in html description
 
I am trying to use a php script to hash urls in my product description but it requires that I use this as a link in the HTML description.....

<a href="<?php linkurl('demo.mp3');?>">Download Here</a>

But it doesn't seem to work. Can someone tell what php/tpl to edit to allow the html description field to accept php tags. the developer of the script seems to think that the html description is not accepting the open php tag ie <

I am desperately trying to get this to work so all help is greatfully receieved

Jon 03-25-2009 10:05 PM

Re: URGENT - Need to use PHP in html description
 
You can't use php code in html description. Suggesting you do so leads me to wonder how much x-cart experience your developer has.

loopsound 03-25-2009 11:03 PM

Re: URGENT - Need to use PHP in html description
 
The developer is not an X-cart developer, he is the writer of link protection code and suspected that his code wouldn't work because the field didn't accept php.

Do you think X-cart tech support will be able to make the HTML description accept php or is it one of those things that can't be done?

Victor D 03-26-2009 04:47 AM

Re: URGENT - Need to use PHP in html description
 
For php execution inside template you can use
Code:

<a href="{php}include("/path/to/custom_php.php"); linkurl('demo.mp3');{/php}">Download Here</a>

But I consider it to be not so good idea.

loopsound 03-26-2009 05:49 AM

Re: URGENT - Need to use PHP in html description
 
Sorry, this doesn't seem to work inside the HTML description field. You mentioned this for execution inside a template not the HTML description field.

Anyone? Before I take up technical support who have said they can tell me the way to put php in the html description. Or is this what they are going to give me?

Thanks for the reply anyway

Let me know if you come up with anything else

Victor D 03-26-2009 06:06 AM

Re: URGENT - Need to use PHP in html description
 
Why not to hash url in product.php and pass it to template as variable?
It has more sense to my mind.

loopsound 03-26-2009 06:37 AM

Re: URGENT - Need to use PHP in html description
 
That's what the script I am using does but externally. It allows me to hash paricular urls in my product description, that is why I need to put the php tag in the html description.


All times are GMT -8. The time now is 06:48 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.