That would depend on what limitations you choose to include in your php.
That would depend on what limitations you choose to include in your php.
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
I'm sorry, but to me that's a very vague answer.
Are you suggesting that in my mainpage php code I could write something along the lines of (roughly speaking):
if products_id=826;
include membership form;
else
don't;
endif
If that's the case, I think I'd rather get drunk :)
As I said, I have other options. However, my question has been raised hundreds of times by others on the Internet, so I hardly think I'm alone here.
Thanks for your reply.
There's a MUCH more important issue you're overlooking entirely.
Even if you were to add PHP code to the product description, Zen Cart isn't going to RUN that PHP code anyway. It'll just echo it out to your browser.
To make it execute the code, you'd need to edit the core code that outputs the description and have it check whether there's any embedded PHP, have it run that PHP, and include it in the output.
So, rather than beat your head against the wall about a fancy text editor, why not get your core PHP logic working first?
ie:
1. Turn OFF all your rich-text editors ... just use "Plain Text" or "NONE" as your product-description editor. Put your PHP in there. That way the editor is no longer a factor.
2. Work on the logic to make that PHP code actually run as you intend it.
3. Then you'll probably find that turning on the rich-text editor may actually have no negative impact at all.
I would suggest that maybe some alternative approaches be explored, as they would negate all issues related to FCKeditor or other editors:
a) some sort of boilerplate approach
b) a hard-coded approach such as you've been discussing with kuroi
c) maybe use product-attributes instead ... but that might necessitate a lot more coding, essentially building a custom product-type ...... which might not be a bad idea if you wanted to share it
d) or maybe rethink whether you want this done as a "product" at all ... cuz technically it really isn't a product, as far as I can tell.
.
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.
Hi DrByte.
I don't think I'm overlooking anything because I just don't know. All I was looking for was an alternative to Plan A, but it seems that the alternative - to include PHP code in FckEditor isn't an option.
Quite seriously, I really think I've wasted your time because Plan A is still acceptable, and the one I will use. Hopefully others with a similar need, will discover this thread and stop wasting their time, or follow the suggestions you have all come up with.
Thanks to all for taking time out to reply. it was very kind of you.