Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2006
    Posts
    111
    Plugin Contributions
    0

    Default Totally stumped: sidebox in root, store in subdirectory

    Hi - I'm trying to display the featured product sidebox in the root of my site. My store is in a subdirectory (root: http://dichroicjewelry.net and store: http://dichroicjewelry.net/glass).

    I'm using 1.3.7. I renamed application_top.php and config.php as was suggested in another thread. I'm attempting to call the following file (which is located in my store's base directory, /glass) from the root directory, and I'm getting a blank page.

    Without any error messages, I don't know what to search for, and I'm really stumped. Can someone please help me?

    PHP Code:
    <? 
      require('blogfiles/application_topb.php'); 
    // Return a random row from a database query 
      function zen_random_select($query) { 
        global $db; 
          if (!is_object($db)) { 
            //PHP 5.2.0 bug workaround ...  
            $db = new queryFactory(); 
            $db->connect(DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE, USE_PCONNECT, false); 
        $random_product = ''; 
        $random_query = $db->Execute($query); 
        $num_rows = $random_query->RecordCount(); 
        if ($num_rows > 1) { 
          $random_row = zen_rand(0, ($num_rows - 1)); 
          $random_query->Move($random_row); 
        } 
        } 
        } 
        return $random_query; 
     $sidebox_name = 'featured.php';  
    //which sidebox template to use:  
    $column_box_default='tpl_box_default_left.php';  
    $column_width = BOX_WIDTH_LEFT;  
    /**  
     * Load required functions and processing to generate the sidebox:  
     */  
      $language_page_directory = DIR_WS_LANGUAGES . $_SESSION['language'] . '/';  
      $box_id = zen_get_box_id($sidebox_name);  
      if ( file_exists(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/' . $sidebox_name) ) {  
        require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/' . $sidebox_name);  
      } else {  
        require(DIR_WS_MODULES . 'sideboxes/' . $sidebox_name);  
      }   
      ?>

  2. #2
    Join Date
    Jun 2006
    Posts
    111
    Plugin Contributions
    0

    Default Re: Totally stumped: sidebox in root, store in subdirectory

    Anyone? Please?

 

 

Similar Threads

  1. Replies: 2
    Last Post: 4 Sep 2014, 01:55 PM
  2. v153 Root or subdirectory?
    By robbie269 in forum Basic Configuration
    Replies: 27
    Last Post: 17 Aug 2014, 12:16 AM
  3. Layout / Sidebox issue .... Totally Stumped!
    By EC web in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 5 Jan 2013, 07:40 PM
  4. root or subdirectory?
    By fakeDecoy in forum General Questions
    Replies: 8
    Last Post: 25 Apr 2011, 06:03 PM
  5. Totally Stumped-Product Display
    By giffmann in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 29 Oct 2009, 02:23 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR