gjh42:
You shouldn't need to add that. PHP files do not require a ?> at the end - in fact, revised core Zen Cart files are often also changed to remove the ?>. No idea why adding it back would make a difference.
For the quotes, you're right :oops: PHP works fine simply embedded in javascript, but its result, unlike in HTML output, needs to be enclosed in quotes so js can handle it properly as a string and not try to treat it as a variable or something else. In researching your question, I came across a method (using json_encode() ) that should also avoid possible escaping issues, allowing end users to incorporate various quotes and symbols in the description without breaking javascript. I'll test that out and resubmit, with a real improvement instead of just a bugfix.
In the meantime, adding quotes around the PHP or else just embedding text directly will work.
Thanks Glen
Rechecked without the closing ?> and it still works (sorry).
Not sure about json, some earlier browsers don't support it.
I also used similar to
"index.php?main_page=products_new", "_self",
for the clickable url instead of similar to
"http://some-url.com", "_new",