If this is your first visit, check our documentation. To post, register or login.
Forums / Code Matters / Bug Reports / $show_info_page_ask_a_question

$show_info_page_ask_a_question

Started by yesaul on 6 Apr 2023, 5:59 PM · Views: 3,371

Results 1 to 3 of 3
6 Apr 2023, 5:59 PM
#1
yesaul avatar

yesaul

New Zenner

Join Date:
Apr 2011
Location:
Espoo, Finland
Posts:
73
Plugin Contributions:
0

Post #1 by yesaul

The following code appeared in "Ask a Question Page" header_php.php in newest 158a release:

// -----
// Check to see if the "Show Ask a Question" button is enabled for the product's
// type.  If not, redirect to the product's information page.
//
$info_page = zen_get_info_page($pid);
$show_info_page_ask_a_question = 'SHOW_' . strtoupper($info_page) . '_ASK_A_QUESTION';
if (!defined($show_info_page_ask_a_question) || constant($show_info_page_ask_a_question) === '0') {
    zen_redirect(zen_href_link($info_page, 'products_id=' . $_GET['pid']));
}

I have not found, where the $show_info_page_ask_a_question variable is currently being used

Also I cannot find, where SHOW_PRODUCT_INFO_ASK_A_QUESTION constant is defined

But this code is actually blocking any access to "Ask a Question"-Page

Sorry, if I do understand something wrong... (I only support my own store, I am not a pro)

6 Apr 2023, 8:31 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,144
Plugin Contributions:
56

Post #2 by lat9

yesaul:

The following code appeared in "Ask a Question Page" header_php.php in newest 158a release:

// -----
// Check to see if the "Show Ask a Question" button is enabled for the product's
// type. If not, redirect to the product's information page.
//
$info_page = zen_get_info_page($pid);
$show_info_page_ask_a_question = 'SHOW_' . strtoupper($info_page) . '_ASK_A_QUESTION';
if (!defined($show_info_page_ask_a_question) || constant($show_info_page_ask_a_question) === '0') {
zen_redirect(zen_href_link($info_page, 'products_id=' . $_GET['pid']));
}

> 
> I have not found, where the *$show_info_page_ask_a_question* variable is currently being used
> 
> Also I cannot find, where SHOW_PRODUCT_INFO_ASK_A_QUESTION constant is defined
> 
> But this code is actually blocking any access to "Ask a Question"-Page
> 
> Sorry, if I do understand something wrong... (I only support my own store, I am not a pro)
Check in the admin's Catalog :: Product Types.  For the 'normal' products (that use the product_info page for their detailed display), click the Layout Settings button associated with that product type, then set the setting that enables the use of 'Ask a Question' to indicate that it's allowed.
6 Apr 2023, 9:11 PM
#3
yesaul avatar

yesaul

New Zenner

Join Date:
Apr 2011
Location:
Espoo, Finland
Posts:
73
Plugin Contributions:
0

Post #3 by yesaul

lat9:

Check in the admin's Catalog...
Thank you for the hint
everything is Ok now
My mistake
This thread should probably be removed
Thank you again