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

URGENT - Need to use PHP in html description

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-25-2009, 09:12 AM
 
loopsound loopsound is offline
 

Advanced Member
  
Join Date: Feb 2004
Posts: 85
 

Exclamation 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
__________________
xcartgold 4.5.4
xcartgold 4.5.5
Reply With Quote
  #2  
Old 03-25-2009, 10:05 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default 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.
Reply With Quote
  #3  
Old 03-25-2009, 11:03 PM
 
loopsound loopsound is offline
 

Advanced Member
  
Join Date: Feb 2004
Posts: 85
 

Default 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?
__________________
xcartgold 4.5.4
xcartgold 4.5.5
Reply With Quote
  #4  
Old 03-26-2009, 04:47 AM
  Victor D's Avatar 
Victor D Victor D is offline
 

X-Adept
  
Join Date: Aug 2008
Posts: 643
 

Default 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.
__________________
Regards,
Victor Dubiniuk

X-Cart Skins Store
- twenty two different skins for 4.1.x and 4.2.x;
- 4.3.x compatible versions are available;
- refresh you store now!

Smart menu X-Cart add-on for 4.1.8 - 4.3.x
Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x
Reply With Quote
  #5  
Old 03-26-2009, 05:49 AM
 
loopsound loopsound is offline
 

Advanced Member
  
Join Date: Feb 2004
Posts: 85
 

Default 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
__________________
xcartgold 4.5.4
xcartgold 4.5.5
Reply With Quote
  #6  
Old 03-26-2009, 06:06 AM
  Victor D's Avatar 
Victor D Victor D is offline
 

X-Adept
  
Join Date: Aug 2008
Posts: 643
 

Default 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.
__________________
Regards,
Victor Dubiniuk

X-Cart Skins Store
- twenty two different skins for 4.1.x and 4.2.x;
- 4.3.x compatible versions are available;
- refresh you store now!

Smart menu X-Cart add-on for 4.1.8 - 4.3.x
Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x
Reply With Quote
  #7  
Old 03-26-2009, 06:37 AM
 
loopsound loopsound is offline
 

Advanced Member
  
Join Date: Feb 2004
Posts: 85
 

Default 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.
__________________
xcartgold 4.5.4
xcartgold 4.5.5
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not 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 05:30 PM.

   

 
X-Cart forums © 2001-2020