Now go into Category 58 (Packaging) and edit the Product ... Does it show:
Quote:
Product Master Category: ID# 58 Packaging
Printable View
Now go into Category 58 (Packaging) and edit the Product ... Does it show:
Quote:
Product Master Category: ID# 58 Packaging
For giggles and grins ... can you change the code to show uncomment the echo:
and go to that Category/Product and what do you see?Code:// bof: show room only for master_categories_id 12
echo 'Products ID: ' . $product_id . ' Master Cat: ' . zen_get_products_category_id($product_id) . '<br>';
if (zen_get_products_category_id($product_id) == 12) {
return '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . TEXT_CALL_FOR_PRICE . '</a>';
}
// eof: show room only for master_categories_id 12
And the line:
you changed to:Code:if (zen_get_products_category_id($product_id) == 12) {
Code:if (zen_get_products_category_id($product_id) == 58) {
If you switch to the Classic Template ... does this work correctly?
Could you Zip and post as an attachment your file, from the server, for:
/includes/functions/functions_general.php
Attachment 12314
thanks
You have the code in the wrong place ... :eek:
Remove the new code that I gave you:
and go lower in the code and find the code that starts with:Code:// bof: show room only for master_categories_id 58
echo 'Products ID: ' . $product_id . ' Master Cat: ' . zen_get_products_category_id($product_id) . '<br>';
if (zen_get_products_category_id($product_id) == 58) {
return '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . TEXT_CALL_FOR_PRICE . '</a>';
}
// eof: show room only for master_categories_id 58
Put it just below the } and above the line starting with $button_check so it reads:Code:}
$button_check = $db->Execute("select product_is_call, products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'");
switch (true) {
// cannot be added to the cart
Code:}
// bof: show room only for master_categories_id 58
echo 'Products ID: ' . $product_id . ' Master Cat: ' . zen_get_products_category_id($product_id) . '<br>';
if (zen_get_products_category_id($product_id) == 58) {
return '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . TEXT_CALL_FOR_PRICE . '</a>';
}
// eof: show room only for master_categories_id 58
$button_check = $db->Execute("select product_is_call, products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . (int)$product_id . "'");
switch (true) {
// cannot be added to the cart