Forums / Templates, Stylesheets, Page Layout / Shopping Cart Sidebox in both columns

Shopping Cart Sidebox in both columns

Views: 765

Results 1 to 5 of 5
8 Dec 2011, 2:20 PM
#1
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Shopping Cart Sidebox in both columns

Ok, I've looked at the FAQs and posts to try and resolve this issue. But can't see what is probably obvious.

With v1.50rc2 on local server:

I have the shopping cart sidebox turned on in the left column on most pages.

The left column is turned off on product info pages. On these pages I would like to show the shopping cart side box in the right column (which is turned on).

Played around with:

tpl_main_page.php, the beginning of which is:

 if (in_array($current_page_base,explode(",",'product_info,shopping_cart')) ) {
    $flag_disable_left = true;
  }
  
   if (in_array($current_page_base,explode(",",'shopping_cart')) ) {
    $flag_disable_right = true;
  }
      
if ($this_is_home_page) {
     $flag_disable_right = true;
  }
  

and shopping_cart.php in \modules\sideboxes\my-template, the code of which is:

 switch (true) {
    case (SHOW_SHOPPING_CART_BOX_STATUS == '0'):
      $show_shopping_cart_box = true;
      break;
    case (SHOW_SHOPPING_CART_BOX_STATUS == '1'):
      if ($_SESSION['cart']->count_contents() > 0 || (isset($_SESSION['customer_id']) && zen_user_has_gv_account($_SESSION['customer_id']) > 0)) {
        $show_shopping_cart_box = true;
      } else {
        $show_shopping_cart_box = false;
      }
      break;
    case (SHOW_SHOPPING_CART_BOX_STATUS == '2'):
      if ( ( (isset($_SESSION['cart']) && $_SESSION['cart']->count_contents() > 0) || (isset($_SESSION['customer_id']) && zen_user_has_gv_account($_SESSION['customer_id']) > 0) ) && ($_GET['main_page'] != FILENAME_SHOPPING_CART) ) {
        $show_shopping_cart_box = true;
      } else {
        $show_shopping_cart_box = false;
      }
      break;
    }


  if ($show_shopping_cart_box == true) {
    require($template->get_template_dir('tpl_shopping_cart.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_shopping_cart.php');
    $title =  BOX_HEADING_SHOPPING_CART;
    $title_link = false;
    $title_link = FILENAME_SHOPPING_CART;

    require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
  }

I'm pretty sure I need to edit the latter, as an FAQ suggests - but nothing I do seems to work.

Thanks
(off out for a couple of hours)

Simon

8 Dec 2011, 2:33 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shopping Cart Sidebox in both columns

You would need to customize the code in the modules for the column_left.php and column_right.php as those are set to pull the sideboxes based on the settings in the layout box controller ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

8 Dec 2011, 2:35 PM
#3
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Shopping Cart Sidebox in both columns

Thanks Ajeh, that makes sense. I can do that.

Cheers
(now I'm going out)

Simon

8 Dec 2011, 7:53 PM
#4
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: Shopping Cart Sidebox in both columns

I managed to avoid altering the code in the column_left & right .php files by adding an extra line in the Layout_Boxes table in the database.

It seemed to do the trick, hopefully without side-effects.

Simon

8 Dec 2011, 11:42 PM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shopping Cart Sidebox in both columns

Thanks for the update that this is working now ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!