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

How do I include contents of a php page into a product's detail page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-22-2011, 12:15 AM
 
imageizeverything imageizeverything is offline
 

eXpert
  
Join Date: Mar 2005
Location: Manhattan, New York City
Posts: 250
 

Question How do I include contents of a php page into a product's detail page

How do I include the contents of a php page into a product's "Detailed description" area?

I'd like to be able to paste an include statement in the "Detailed description" section of a Product's Details, and have it post the html contents of the php page.

I uploaded a php page to my server, then pasted various include statements in "Detailed description" section of a product, but it didn't show on the product's page.

These are what I tried:

<? include('https://www.websitedomain.com/filename.php') ?>

{include file="https://www.websitedomain.com/filename.php"}

I'm using X-Cart Gold Version 4.4.3

* Do anyone know the solution?
Thanks in advance.
__________________
Using
*Upgrading Dev Copy of 4.4.3 to 4.6.3 (currently at 4.5.4)
X-Cart Gold Version 4.6.3 (Fresh Install)
X-Cart Gold Version 4.4.4
X-Cart Gold Version 4.4.3
Godaddy Shared Linux Hosting
PHP 5.3.24
MySQL server 5.5.33-log
MySQL client 5.5.19
-----------------------------------------------
Reply With Quote
  #2  
Old 07-22-2011, 03:11 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: How do I include contents of a php page into a product's detail page

You can't do that. You can include smarty code in the description if you want to and then use 'eval' smarty to show description. If you want to include php code in smarty you have to use
{php}
php code here
{/php}
in the template (not in the description) but this is not recommended at all
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
imageizeverything (07-22-2011)
  #3  
Old 07-22-2011, 11:48 AM
 
imageizeverything imageizeverything is offline
 

eXpert
  
Join Date: Mar 2005
Location: Manhattan, New York City
Posts: 250
 

Question Re: How do I include contents of a php page into a product's detail page

Quote:
Originally Posted by cflsystems
You can't do that. You can include smarty code in the description if you want to and then use 'eval' smarty to show description. If you want to include php code in smarty you have to use
{php}
php code here
{/php}
in the template (not in the description) but this is not recommended at all

Is it safe to Embed the php page into the description area of a product?

I have a php page with some sizing & measurement info & a image diagram on it, that I want to post on some products pages. But to save time from having to retype it each time, I figured i could embed it. That way if i wanted to update the sizing info, I could change one page to have it change on the product pages i put it on.
__________________
Using
*Upgrading Dev Copy of 4.4.3 to 4.6.3 (currently at 4.5.4)
X-Cart Gold Version 4.6.3 (Fresh Install)
X-Cart Gold Version 4.4.4
X-Cart Gold Version 4.4.3
Godaddy Shared Linux Hosting
PHP 5.3.24
MySQL server 5.5.33-log
MySQL client 5.5.19
-----------------------------------------------
Reply With Quote
  #4  
Old 07-22-2011, 01:00 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: How do I include contents of a php page into a product's detail page

Just include that php page in product.php and assign its result to smarty, then you can use it on the template
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #5  
Old 07-22-2011, 03:30 PM
 
imageizeverything imageizeverything is offline
 

eXpert
  
Join Date: Mar 2005
Location: Manhattan, New York City
Posts: 250
 

Question Re: How do I include contents of a php page into a product's detail page

Quote:
Originally Posted by cflsystems
Just include that php page in product.php and assign its result to smarty, then you can use it on the template

Umm ok. Will that appear on All the Product pages?? Because I Do Not want it on all product pages, only on certain product pages.
__________________
Using
*Upgrading Dev Copy of 4.4.3 to 4.6.3 (currently at 4.5.4)
X-Cart Gold Version 4.6.3 (Fresh Install)
X-Cart Gold Version 4.4.4
X-Cart Gold Version 4.4.3
Godaddy Shared Linux Hosting
PHP 5.3.24
MySQL server 5.5.33-log
MySQL client 5.5.19
-----------------------------------------------
Reply With Quote
  #6  
Old 07-23-2011, 05:36 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: How do I include contents of a php page into a product's detail page

It will be on all product pages yes unless you specify some kind of flag to include it on specific pages only
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
GMarler (07-24-2011)
  #7  
Old 07-24-2011, 11:30 AM
 
imageizeverything imageizeverything is offline
 

eXpert
  
Join Date: Mar 2005
Location: Manhattan, New York City
Posts: 250
 

Default Re: How do I include contents of a php page into a product's detail page

Quote:
Originally Posted by cflsystems
It will be on all product pages yes unless you specify some kind of flag to include it on specific pages only

I stated before I wanted it on "some" specific pages, Not all pages.
__________________
Using
*Upgrading Dev Copy of 4.4.3 to 4.6.3 (currently at 4.5.4)
X-Cart Gold Version 4.6.3 (Fresh Install)
X-Cart Gold Version 4.4.4
X-Cart Gold Version 4.4.3
Godaddy Shared Linux Hosting
PHP 5.3.24
MySQL server 5.5.33-log
MySQL client 5.5.19
-----------------------------------------------
Reply With Quote
  #8  
Old 07-24-2011, 06:19 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: How do I include contents of a php page into a product's detail page

YOu have to use conditional statement to show it on specific pages only
__________________
Steve Stoyanov
CFLSystems.com
Web Development
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 06:19 PM.

   

 
X-Cart forums © 2001-2020