Results 1 to 10 of 10
  1. #1
    Join Date
    Jan 2007
    Posts
    17
    Plugin Contributions
    0

    help question Shopping cart sidebox keeps showing random 'New Product' and no cart info :(

    My shopping cart sidebox does not show the totals etc even though that's what I chose in the admin. Instead it shows a random New Product.

    Is this how it should be or am I doing something wrong. I haven't messed with the template code. I am native to ASP so PHP is not so easy for me to read LOL. So I'll post the sidebox code. Maybe you can see easier than I can if there's something missing.

    Perhaps I am missing some step in Admin.

    PHP Code:
    <?php
    /**
     * Side Box Template
     *
     * @package templateSystem
     * @copyright Copyright 2003-2005 Zen Cartt Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    */
      
    $content ='';
      if (
    $_SESSION['cart']->count_contents() > 0) {
      
    $content .= '<div id="' str_replace('_''-'$box_id 'Content') . '" class="sideBoxContent">';
      
    $content .= '<div id="cartBoxListWrapper">' "\n" '<ul>' "\n";
        
    $products $_SESSION['cart']->get_products();
        for (
    $i=0$n=sizeof($products); $i<$n$i++) {
          
    $content .= '<li>';
          if ((
    $_SESSION['new_products_id_in_cart']) && ($_SESSION['new_products_id_in_cart'] == $products[$i]['id'])) {
            
    $content .= '<span class="cartNewItem">';
          } else {
            
    $content .= '<span class="cartOldItem">';
          }
          
    $content .= $products[$i]['quantity'] . BOX_SHOPPING_CART_DIVIDER '</span><a href="' zen_href_link(zen_get_info_page($products[$i]['id']), 'products_id=' $products[$i]['id']) . '">';
          if ((
    $_SESSION['new_products_id_in_cart']) && ($_SESSION['new_products_id_in_cart'] == $products[$i]['id'])) {
            
    $content .= '<span class="cartNewItem">';
          } else {
            
    $content .= '<span class="cartOldItem">';
          }
          
    $content .= $products[$i]['name'] . '</span></a></li>' "\n";
          if ((
    $_SESSION['new_products_id_in_cart']) && ($_SESSION['new_products_id_in_cart'] == $products[$i]['id'])) {
            
    $_SESSION['new_products_id_in_cart'] = '';
          }
        }
        
    $content .= '</ul>' "\n" '</div>';
      } else {
        
    $content '<div class="sideBoxContent center bold">' BOX_SHOPPING_CART_EMPTY '</div>';
      }
      if (
    $_SESSION['cart']->count_contents() > 0) {
        
    $content .= '<hr />';
        
    $content .= '<div class="cartBoxTotal">' $currencies->format($_SESSION['cart']->show_total()) . '</div>';
        
    $content .= '<br class="clearBoth" />';
      }
      if (isset(
    $_SESSION['customer_id'])) {
        
    $gv_query "select amount
                     from " 
    TABLE_COUPON_GV_CUSTOMER "
                     where customer_id = '" 
    $_SESSION['customer_id'] . "'";
       
    $gv_result $db->Execute($gv_query);
        if (
    $gv_result->fields['amount'] > ) {
          
    $content .= '<div id="cartBoxGVButton"  class="sideBoxContent"><a href="' zen_href_link(FILENAME_GV_SEND'''SSL') . '">' zen_image_button(BUTTON_IMAGE_SEND_A_GIFT_CERT BUTTON_SEND_A_GIFT_CERT_ALT) . '</a></div>'
          
    $content .= '<div class="sideBoxContent center bold">' VOUCHER_BALANCE $currencies->format($gv_result->fields['amount']) . '</div>';
        }
      
    $content .= '';
      }
       
    $content_head tm_box_head(BOX_HEADING_SHOPPING_CART,FILENAME_SHOPPING_CART);
     
    $content_cont tm_box_cont($content_tm);
     
     
    $content $content_head.$content_cont;
    ?>

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Shopping cart sidebox keeps showing random 'New Product' and no cart info :(

    Check in the admin > tools > layoutboxes controller > that sideboxes/shopping_cart.php is enabled..

    Sounds like you are seeing the "Featured product" sidebox....

    Note you must have items in the cart to see this
    Zen-Venom Get Bitten

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

    Default Re: Shopping cart sidebox keeps showing random 'New Product' and no cart info :(

    What version of Zen Cart are you running ... 'cos that code isn't from the current version.
    Kuroi Web Design and Development | Twitter

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

  4. #4
    Join Date
    Jan 2007
    Posts
    17
    Plugin Contributions
    0

    Default Re: Shopping cart sidebox keeps showing random 'New Product' and no cart info :(

    Quote Originally Posted by kobra View Post
    Check in the admin > tools > layoutboxes controller > that sideboxes/shopping_cart.php is enabled..

    Sounds like you are seeing the "Featured product" sidebox....

    Note you must have items in the cart to see this
    I already have the New Products enabled on the left side. This shopping cart box is showing up on the right and is enabled. The product that is shows is always the same as what's on the left side...so it's the New Products that keep showing.

  5. #5
    Join Date
    Jan 2007
    Posts
    17
    Plugin Contributions
    0

    Default Re: Shopping cart sidebox keeps showing random 'New Product' and no cart info :(

    Quote Originally Posted by kuroi View Post
    What version of Zen Cart are you running ... 'cos that code isn't from the current version.
    Intersting...
    It's the latest version that I am running. I only downloaded it and installed it last week on about Thursday I believe.

    The template is from Template Monster. For the price you'd think it would be up to date.


  6. #6
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Shopping cart sidebox keeps showing random 'New Product' and no cart info :(

    Sorry that you got duped into a TM Template, these are full of issues.

    Check that file against the one in includes/templates/template_default/sideboxes
    Zen-Venom Get Bitten

  7. #7
    Join Date
    Jan 2007
    Posts
    17
    Plugin Contributions
    0

    Default Re: Shopping cart sidebox keeps showing random 'New Product' and no cart info :(

    OK, well I just pasted the default template shopping cart side box page over the current and I see it. Now I just need to get it looking like my current template.

    Ok, here goes....


  8. #8
    Join Date
    Jan 2007
    Posts
    17
    Plugin Contributions
    0

    Default Re: Shopping cart sidebox keeps showing random 'New Product' and no cart info :(

    Quote Originally Posted by kobra View Post
    Sorry that you got duped into a TM Template, these are full of issues.
    Yes they are and they refuse to believe it. I loaded them up with over 2 dozen problems in a support ticket and all they could reply was:

    "Read the instructions"

    If I didn't like the template so much, they'd have been looking at a chargeback.

  9. #9
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Shopping cart sidebox keeps showing random 'New Product' and no cart info :(

    You will grow to like it less and less as the problems compound
    Zen-Venom Get Bitten

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

    Default Re: Shopping cart sidebox keeps showing random 'New Product' and no cart info :(

    Quote Originally Posted by dandy View Post
    The template is from Template Monster. For the price you'd think it would be up to date.
    That just explains so much.

    I looked again at the code you posted and then in the last few lines throughs it away in favor of something generated by a couple of Template Monster functions.

    I suspect that the idea is that you can comment out the Template Monster routines which are probably designed specifically to make the template look good with the very specific design that they have given it, and revert to the more flexible Zen Cart code. The troble is that this is a routine that has gone through a few evolutions recently and they haven't kept the bit they're not using up-to-date.

    Your approach of replacing it with the one from the template_default, or better still simply deleting it from your template (in which case the template_default version will be used anyway) is exactly what I would have recommended.
    Kuroi Web Design and Development | Twitter

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

 

 

Similar Threads

  1. shopping cart - disable featured and new product lists
    By tparvaiz in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 11 Jul 2011, 04:29 AM
  2. Product Info Page - Aligning issues regarding Shopping Cart and Attributes.
    By Treasuresbycaz in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 5 Jul 2009, 01:56 PM
  3. Skipping the product info and shopping cart pages
    By jack7890 in forum General Questions
    Replies: 5
    Last Post: 14 May 2009, 11:38 AM
  4. Skip Product Info and go direct to shopping cart
    By simplemedia in forum Managing Customers and Orders
    Replies: 1
    Last Post: 25 Nov 2008, 06:49 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