Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Oct 2008
    Posts
    64
    Plugin Contributions
    0

    Default Turn Off Sidebox In 1.3.8a during checkout pages Tried A - Z Failed

    Can someone shed some light here for me.
    I have done everything according to the following threads

    http://www.zen-cart.com/forum/showthread.php?t=63813

    http://www.zen-cart.com/forum/showthread.php?t=58030

    And especially this one http://www.zen-cart.com/forum/showpo...94&postcount=3

    but

    All failed. Here is what I have in the files I need this working on

    First file includes/modules/column_left.php
    Code:
    // safety row stop
    $box_cnt=0;
    while (!$column_left_display->EOF and $box_cnt < 100) { 
      if (in_array($current_page_base,explode(",",'login,checkout_shipping,checkout_payment,checkout_confirmation')) && in_array($column_left_display->fields['layout_box_name'],explode(",",'search_header.php,categories.php,manufacturers.php,whats_new.php,featured.php,specials.php,currencies.php,aweber_sidebox')) ) { 
        // don't show anything 
        echo 'base ' . $current_page_base . ' vs ' . $column_left_display->fields['layout_box_name'] . '<br>'; 
      } else { 
      $box_cnt++;  
      
     if ( file_exists(DIR_WS_MODULES . 'sideboxes/' . $column_left_display->fields['layout_box_name']) or file_exists(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/' . $column_left_display->fields['layout_box_name']) ) {
    ?>
    <?php
    
    //$column_box_spacer = 'column_box_spacer_left';
    $column_width = BOX_WIDTH_LEFT;
    if ( file_exists(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/' . $column_left_display->fields['layout_box_name']) ) {
      $box_id = zen_get_box_id($column_left_display->fields['layout_box_name']);
      require(DIR_WS_MODULES . 'sideboxes/' . $template_dir . '/' . $column_left_display->fields['layout_box_name']);
    } else {
      $box_id = zen_get_box_id($column_left_display->fields['layout_box_name']);
      require(DIR_WS_MODULES . 'sideboxes/' . $column_left_display->fields['layout_box_name']);
    }
    
      } // file_exists
       } // skip sidebox on pages 
      $column_left_display->MoveNext();
    Did not work

    Next file

    includes/templates/MY_TEMPLATE/common/tpl_main_page.php
    Code:
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_main_page.php 7085 2007-09-22 04:56:31Z ajeh $
     */
    
    // the following IF statement can be duplicated/modified as needed to set additional flags
      if (in_array($current_page_base,explode(",",'login,product_info,product_music_info,document_general_info,product_free_shipping_info,document_product_info,aweber_sidebox,checkout_shipping,checkout_payment,checkout_confirmation'')) ) {
        $flag_disable_right = true;
      }
    Is there something different in 1.3.8a that stops this from working?

    We have placed them in the override folders and replaced the original files as well both failed.

    Maybe someone has experienced this and can help shine some magic on it to make it work.

    We want the left colum not to display during checkout better yet just one sidebox would work which is aweber but it failed to do so the left side will work for us if we can get it to do what we want it to do.

    Thanks in advance

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Turn Off Sidebox In 1.3.8a during checkout pages Tried A - Z Failed

    The approach documented in the thread that you have highlighted works fine when implemented properly. Your code doesn't quite match it. For example you have uncommented the line that starts "echo 'base ' ".

    Your code for the second approach is more accurate, but you have set the flag that disables the right column, rather than the left column, which you are targeting.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Oct 2008
    Posts
    64
    Plugin Contributions
    0

    Default Re: Turn Off Sidebox In 1.3.8a during checkout pages Tried A - Z Failed

    kuroi

    Thats only part of the code if you look in the includes/templates/MY_TEMPLATE/common/tpl_main_page.php it has four files set as true left, right center and so on.

    None of those worked either this has been a 3 day project and failed it is the reason I posted.

  4. #4
    Join Date
    Oct 2008
    Posts
    64
    Plugin Contributions
    0

    Default Re: Turn Off Sidebox In 1.3.8a during checkout pages Tried A - Z Failed

    I have attached the exact files i have if you want to look at them
    Last edited by bluedotted; 27 Nov 2008 at 01:04 AM.

  5. #5
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Turn Off Sidebox In 1.3.8a during checkout pages Tried A - Z Failed

    The code in your tpl_main_page.php template will disable the right column for the login and all product info pages. The reference to the aweber sidebox will be ignored since that's not a page.

    The code in your column_left.php template disables the specific sideboxes mentioned, i.e. search header, categories, manufacturers, currencies and the product sideboxes from the login and checkout pages. Again the aweber sidebox referecne will be ignored, though this time because it's incomplete (missing ".php" on the end).

    However, both of these outcomes seem to be close to opposite of that which you say you're trying to achieve, so I'm confused as to your objectives.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  6. #6
    Join Date
    Oct 2008
    Posts
    64
    Plugin Contributions
    0

    Default Re: Turn Off Sidebox In 1.3.8a during checkout pages Tried A - Z Failed

    The aweber sidebox causes ssl errors when loaded in ssl pages we just want this one side box not to load on any ssl required pages such as login, checkout etc.

    If we have to disable the complete column for these pages is fine we just cannot get it to work.

    The aweber java form is not ssl secured and thats causing the unsecured warning error.

  7. #7
    Join Date
    Oct 2008
    Posts
    64
    Plugin Contributions
    0

    Default Re: Turn Off Sidebox In 1.3.8a during checkout pages Tried A - Z Failed

    Here is one of the pages erroring if you like to see it

  8. #8
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Turn Off Sidebox In 1.3.8a during checkout pages Tried A - Z Failed

    You don't need to disable the whole column. You can disable individual boxes, as explained in this FAQ.

    The differences for you situation are that you would edit the aweber module file and use the following IF condition
    if ($request_type == 'SSL')
    though this does pre-suppose that the aweber sidebox module follows the normal Zen Cart conventions.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  9. #9
    Join Date
    Oct 2008
    Posts
    64
    Plugin Contributions
    0

    Default Re: Turn Off Sidebox In 1.3.8a during checkout pages Tried A - Z Failed

    This file is from includes/modules/sideboxes

    Do I add the if with the current if or under it or before?

    Original
    Code:
      $show_aweber_sidebox = true;
    
      if ($show_aweber_sidebox == true) {
          require($template->get_template_dir('tpl_aweber_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_aweber_sidebox.php');
          $title =  BOX_HEADING_AWEBER_SIDEBOX;
          $left_corner = false;
          $right_corner = false;
          $right_arrow = false;
          require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
     }
    ?>
    Possible replacement

    Code:
      $show_aweber_sidebox = true;
      if ($show_aweber_sidebox == true) 
      if ($request_type == 'SSL') {
          require($template->get_template_dir('tpl_aweber_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_aweber_sidebox.php');
          $title =  BOX_HEADING_AWEBER_SIDEBOX;
          $left_corner = false;
          $right_corner = false;
          $right_arrow = false;
          require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
     }
    ?>

  10. #10
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Turn Off Sidebox In 1.3.8a during checkout pages Tried A - Z Failed

    Code:
    if ($request_type == 'SSL') $show_aweber_sidebox = true;
    
    if ($show_aweber_sidebox == true) { 
      require($template->get_template_dir('tpl_aweber_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_aweber_sidebox.php');
          $title =  BOX_HEADING_AWEBER_SIDEBOX;
          $title_link = false;
          require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
     }
    ?>
    It's slightly more code than is strictly needed, but makes clear what's going on.
    Last edited by kuroi; 19 Oct 2008 at 10:22 AM. Reason: Convert to Zen Cart 1.3 standard
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 24
    Last Post: 16 Nov 2009, 04:20 PM
  2. Turn off side boxes during checkout?
    By Makoshark in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 15 Jun 2009, 10:09 AM
  3. Can I turn off a sidebox in the checkout and SSL pages?
    By mumzie in forum Basic Configuration
    Replies: 13
    Last Post: 7 Apr 2009, 02:19 AM
  4. Turn off product links...I KNOW THIS MUST BE EASY! But everything I've tried failed!
    By debtag in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 27 Feb 2008, 07:31 PM
  5. Turn Off Shopping cart sidebox during checkout pages
    By haredo in forum Templates, Stylesheets, Page Layout
    Replies: 11
    Last Post: 6 Oct 2007, 06:22 PM

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