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)
-   -   How do I include contents of a php page into a product's detail page (https://forum.x-cart.com/showthread.php?t=60263)

imageizeverything 07-22-2011 12:15 AM

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.

cflsystems 07-22-2011 03:11 AM

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

imageizeverything 07-22-2011 11:48 AM

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.

cflsystems 07-22-2011 01:00 PM

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

imageizeverything 07-22-2011 03:30 PM

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.

cflsystems 07-23-2011 05:36 AM

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

imageizeverything 07-24-2011 11:30 AM

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.

cflsystems 07-24-2011 06:19 PM

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


All times are GMT -8. The time now is 06:49 AM.

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