Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

php include in produc descriptions


MR.T

Recommended Posts

Hi

 

On som of my products I need to have som standard info and instead of typing it in on every product I would like to use for instance:

 

<?php include './info.txt'; ?>

 

I tried to use this by typing directly into the html code (show html code) on the edit product, but it seems like it disapears when I use preview.

 

Are there any solutions to how to implement a certain file for some of the products?

 

/Mr.T

Link to comment
Share on other sites

Have you actually gone past the preview then checked the product in the catalog? I don't think the php gets included in the preview part.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Yes - I have gone past the preview, and it doesn't show up in the Shop either...

 

It looks like the "show html code" don't like <?php include './info.txt'; ?> . Test it in your own administration module and you'll se that it is removed..

 

/MR.T

Link to comment
Share on other sites

I have a client who sells clothes, he uses a link to make a pop up for his size chart, maybe trying something like that would work?

 

Or using an iframe would work. I have done that on several sites as well.

Wendy James

 

Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.

Link to comment
Share on other sites

Hi

 

On som of my products I need to have som standard info and instead of typing it in on every product I would like to use for instance:

 

<?php include './info.txt'; ?>

 

I tried to use this by typing directly into the html code (show html code) on the edit product, but it seems like it disapears when I use preview.

 

Are there any solutions to how to implement a certain file for some of the products?

 

/Mr.T

 

I think I understand your Q but its not very clear. You are talking on the admin side?

you are adding an include statement in the description field and expect it to show up in the preview? nope...never....

 

if this is information you want to appear for EVERY product, edit your product_info.php and make the changes there. the include command won't display anythign to the screen.... if your info.txt file includes a define statement, then use an echo command where you want it. if your info.txt is just plain text, you can do a popupwindow or display it using a css layer..... both work well. I used to do popups and ditched them for css layers...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...