is there a possibility to use an external text file or html page on the product info page? Not from SQL.
is there a possibility to use an external text file or html page on the product info page? Not from SQL.
Using Zen Cart 1.5.1
Why? What's the business problem you're trying to solve here?
And how many products do you believe you need to do this with?
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Since I don't have the knowledge of SQL and php, I thought this would be the vest way.
It would up to 5 different text file or html pages for different products that needs to be changed periodically.
I tried using the following but, this would be consistent for all products. I need to pass the value of $var1 somehow.
Thank you.PHP Code:
<?php $var1 = 'red'; ?>
<?php
$Message1 = $var1 . '.html';
include $Message1;
?>
Last edited by Kevin205; 28 Apr 2013 at 01:54 AM.
Using Zen Cart 1.5.1
Kevin, Maybe I'm missing something. Is this something for a particular product or for a group of products? Can you please give more clarity to your problem, like what exactly you are trying to do? Depending on what is doing on you could create a new template for a different product type. What is in this file you are trying to add to the product_info page? Please describe more of what you are trying to do so we may provide the best solution
Sorry for not being precise, and thank you for replying.
- It would be for a group of products/categories, for certain manufacturers.
- File is formatted html. It is used to have more information, history, etc. It has to be separate from $products_description. It has to be placed at the bottom of the page above the footer area of the product info page.
At the moment, I am trying to find out how to pass $var1 in <?php $var1 = 'red'; ?> to the following. red.html is what I am trying to display. The value red is what I am trying to pass to the code.
I hope I am making sense. Thanks.PHP Code:
<?php
$Message1 = $var1 . '.html';
include $Message1;
?>
Last edited by Kevin205; 28 Apr 2013 at 02:30 AM.
Using Zen Cart 1.5.1
Yes, that's the way to do it. You must put the files into the root folder unless you're specifying the path to the file in your include() call. See the php.net site for proper syntax of the include() function.
Tip: Don't ever use user-supplied input to specify include() paths. Well, at least not without sanitizing the data first. Best just to never do that.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
If this is not possible, is there a way to have additional products fields for different products?
Using Zen Cart 1.5.1
In the product info page there should be a variable $manufacturers_name
you could then use that, as it describes the manufactures already and would be easy to remember which is which.
**If you want to do it a little bit more fancy**
Personally, I would add a column to the manufactures table and then call on that on the product info page. And allow it to be changed via manufacturers.php in the admin.
Or
You could us just add plan php file that you could do a switch
Does that make sense?
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Bookmarks