Thanks for that - the code is NEARLY working as it's only showing 1 link now - but it is showing the ASK_A_QUESTION link all the time and not showing the ASK_A_QUESTION_SAMPLE link on "phone for price" items?
I guess it doesn't understand the IF statement and is defaulting to the ELSE ?
Close ...
But no cigar ...
See if this helps you out as php is fussy about brackets and parens and mixing them up etc. etc. etc.
PHP Code:if(zen_products_lookup($_GET['products_id'], 'product_is_call')) {
echo 'I am CALL!!';
} else {
echo 'I am NOT CALL!!';
}
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Closer, but no cigar for you either
PHP Code:if(zen_products_lookup($_GET['products_id'], 'product_is_call'))
echo '<a href="'. zen_href_link(FILENAME_ASK_A_QUESTION_SAMPLE, 'products_id=' . $_GET['products_id']) . '">' . ASK_A_QUESTION_SAMPLE . '</a>';
else
echo '<a href="' . zen_href_link(FILENAME_ASK_A_QUESTION, 'products_id=' . $_GET['products_id']) . '">' . ASK_A_QUESTION . '</a>';
Thanks hem - that cracked it! :)
I like to make 'em work for it ...... makes them understand the code better in the end, along with the reasons for it.
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Good work![]()