Pop up pages don't appear (v. 2.95)

In version 2.95, pop up pages were switched over to site blocks. That enables store owners to create and include widgets within their page, product or category descriptions. These widgets require a Code field, unlike Pop Up Pages, which should not.

However, in 2.95, there is a bug in which these pop up pages do not appear unless you add a Code field. To correct this, you can do one of the following:

Option 1: Add code values.

You do not need to make any changes to your core SiteBuilder files if you use this option.

  1. Select Site Blocks (in Advanced) and edit each block that does not have a code, adding a value to the Code field. This can be any text, but you cannot use the same code on more than one block.

  2. You can tell that a block already has a code by looking for %BLOCK_XXXX% next to the block name in the drop down box on the main Site Blocks page.

Option 2: Change the code.

If you do not want to add Codes to your site blocks, but you want these pop up pages to appear, open the openinfo.php file in the /enc/ folder and follow the steps below:

  1. Around line 513, change the code:

    $blockcresult = $dataconn->query("SELECT * FROM " .SB_DB_PREFIX ."_popups WHERE BlockCode<>''");

    to:

    $blockcresult = $dataconn->query("SELECT * FROM " .SB_DB_PREFIX ."_popups");
  2. Change the code:

    $blockcid = $blockcrow['ID'];
    $blockccode = trim(strtoupper($blockcrow['BlockCode']));
    $blockcontent = stripslashes($blockcrow['Content']);
    $blockclist[$blockccode] = $blockcontent;
    $blockcids[$blockcid] = $blockcontent;

    to:

    $blockcid = $blockcrow['ID'];
    if (!empty($blockcrow['BlockCode']))
    {
     $blockccode = trim(strtoupper($blockcrow['BlockCode']));
     $blockclist[$blockccode] = stripslashes($blockcrow['Content']);
    }
    $blockcids[$blockcid] = stripslashes($blockcrow['PageTitle']);
  3. Save and reload the file.