Page 1 of 3 123 LastLast
Results 1 to 10 of 30
  1. #1
    Join Date
    Mar 2008
    Posts
    51
    Plugin Contributions
    0

    Default Show attributes in shopping cart sidebox?

    Attributes are displayed as bullet tabs when viewed from the shopping cart, but are not displayed in the shopping cart sidebox. Would it be possible to add code to the tpl_shopping_cart.php file to display product attributes in the shopping cart sidebox?

  2. #2
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,196
    Plugin Contributions
    0

    Default Re: How to show attributes in shopping cart sidebox?

    Ht,
    check out this thread on your poblem.

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

  3. #3
    Join Date
    Mar 2008
    Posts
    51
    Plugin Contributions
    0

    Default Re: How to show attributes in shopping cart sidebox?

    Thank you for that post, I think I may have found what I was looking for in that thread. In order to add model numbers to the shopping cart sidebox, you would find this code:

    PHP Code:
    $content .= $products[$i]['name'] . '</span></a></li>' "\n"
    and replace to this:

    PHP Code:
    $content .= $products[$i]['name'] . ' (' $products[$i]['model'] . ')</span></a></li>' "\n"
    It seems like all I would have to do was find the variable for product attributes and add it on like $products[$i]['attributes']. Anyone know?

  4. #4
    Join Date
    Mar 2008
    Posts
    51
    Plugin Contributions
    0

    Default Re: How to show attributes in shopping cart sidebox?

    bump.

    I'm still trying to figure out how to get user-picked attributes to display in the shopping cart sidebox. Similar to the style that attributes display in the normal shopping cart.

  5. #5
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,196
    Plugin Contributions
    0

    Default Re: How to show attributes in shopping cart sidebox?

    Ht,
    only after scanning through 9 pages
    Check this out my friend:

    http://www.zen-cart.com/forum/showth...add+attributes

  6. #6
    Join Date
    Mar 2008
    Posts
    51
    Plugin Contributions
    0

    Default Re: How to show attributes in shopping cart sidebox?

    thx for the response haredo, the question sounds about the same, which is that i want the product's chosen attributes to appear next to the product name in the shopping cart sidebox.

    kobra's answer didn't explain how to display a product's attributes along with the product in the shopping cart sidebox, like it does in the normal shopping cart, though. For example:

    Brown Jacket
    -XL
    -w/ hood

    but in the shopping cart sidebox, it will display as:

    1 ea.- Brown Jacket

    with no viewable attributes. I would like it to display in the sidebox as:

    1 ea.- Brown Jacket
    -XL
    -w/ hood

  7. #7
    Join Date
    Mar 2008
    Posts
    51
    Plugin Contributions
    0

    Default Re: How to show attributes in shopping cart sidebox?

    i'll pay someone to code this for me if the price is reasonable.. if i don't get this done, i'm gonna get canned.

    I think it would be a great addition to the downloads section too.

  8. #8
    Join Date
    Mar 2008
    Posts
    1
    Plugin Contributions
    0

    Default Re: How to show attributes in shopping cart sidebox?

    I would like this feature too.

    It would be great if it would update after each attribute was selected.

    For example, if I were selling t-shirts... when the user clicked a radio button to select the size, it would show that attribute in the sidebar. When they selected a color, the sidebar would update, and so on.

    Thanks everyone. I just joined this site and I love it!

  9. #9
    Join Date
    Jul 2007
    Posts
    17
    Plugin Contributions
    0

    Default Re: How to show attributes in shopping cart sidebox?

    I think I've got it!
    I've got my cart showing the option values in the shoppingcart sidebox.

    Edit includes/templates/your_template/sideboxes/tpl_shopping_cart.php

    Line 34, replace:

    Code:
    $content .= $products[$i]['name'] . '</span></a></li>' . "\n";
    With:

    Code:
    $content .= $products[$i]['model'] . '</span></a>';	//or $products[$i]['name']   
    // BOF Display Attributes //	   
      if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
        reset($products[$i]['attributes']);	
        foreach ($products[$i]['attributes'] as $option => $value) {
            while (list($option, $value) = each($products[$i]['attributes'])) {
              $attributes_query = "select popt.products_options_name, poval.products_options_values_name,
                                              pa.options_values_price, pa.price_prefix
                                       from " . TABLE_PRODUCTS_OPTIONS . " popt,
                                            " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval,
                                            " . TABLE_PRODUCTS_ATTRIBUTES . " pa
                                       where pa.products_id = '" . (int)$products[$i]['id'] . "'
                                       and pa.options_id = '" . (int)$option . "'
                                       and pa.options_id = popt.products_options_id
                                       and pa.options_values_id = '" . (int)$value . "'
                                       and pa.options_values_id = poval.products_options_values_id
                                       and popt.language_id = '" . (int)$_SESSION['languages_id'] . "'
                                       and poval.language_id = '" . (int)$_SESSION['languages_id'] . "'";
    
              $attributes = $db->Execute($attributes_query);
    
              $content .= ','. $attributes->fields['products_options_values_name'];  
    		  }    
         }
      }
    // EOF Display Attributes //	  
    	  $content .= '</li>' . "\n";
    I'm not a programmer so there may be a more elegant solution but it works and I'm happy.

    Alane

  10. #10
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,196
    Plugin Contributions
    0

    Default Re: How to show attributes in shopping cart sidebox?

    A,
    Can we see a link to a site with this killer .php code please...

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. v139h Need to show attributes in shopping cart
    By 4jDesigns in forum General Questions
    Replies: 2
    Last Post: 17 May 2012, 02:06 PM
  2. Remove right sidebox shopping cart from when on shopping cart page
    By alterego55 in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 2 Oct 2010, 01:45 AM
  3. Always show shopping cart sidebox
    By numinix in forum Customization from the Admin
    Replies: 3
    Last Post: 9 Mar 2009, 05:39 PM
  4. Show prices of attributes on shopping cart
    By erezw in forum General Questions
    Replies: 1
    Last Post: 4 Mar 2009, 05:56 PM
  5. Show selected attributes in Shopping Cart Box?
    By bigmom in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 16 Oct 2007, 04:40 AM

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