Page 3 of 3 FirstFirst 123
Results 21 to 30 of 30
  1. #21
    Join Date
    Dec 2008
    Posts
    7
    Plugin Contributions
    0

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

    Thanks for the code. Works great except it doesn't display Text Attributes.

    Anyone know how to modifiy it so text attributes display too?

  2. #22
    Join Date
    Jan 2009
    Location
    Macclesfield, South Australia
    Posts
    102
    Plugin Contributions
    0

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

    Yep, that works on my test site..... wonder why this is not standard code?

  3. #23
    Join Date
    Jan 2009
    Location
    Macclesfield, South Australia
    Posts
    102
    Plugin Contributions
    0

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

    And, to put a line space between each item in the shopping cart sidebox:
    $content .= '<ul><div style="font-size:75%;">&nbsp;&nbsp;&nbsp;' . "-" . $attributes->fields['products_options_values_name'] . '</div></ul><br/>';
    instead of
    $content .= '<ul><div style="font-size:75%;">&nbsp;&nbsp;&nbsp;' . "-" . $attributes->fields['products_options_values_name'] . '</div></ul>';

  4. #24
    Join Date
    Sep 2007
    Location
    Manchester, England
    Posts
    168
    Plugin Contributions
    0

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

    Thankyou for this, MASSIVE help with a module I've been developing.

    Thankyou

    THANKYOU!!!

  5. #25
    Join Date
    Feb 2005
    Posts
    5
    Plugin Contributions
    0

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

    I'd like also thank you !

    if a product have different ie. color AND qty attributes/options,
    I was problem to display the first attribute.
    Only the qty was displayed.

    After playing some hours with the code, I found the solution from php site:

    foreach ($products[$i]['attributes'] as $option => $value) {
    and
    while (list($option, $value) = each($products[$i]['attributes'])) {
    are functionally identical.

    so I commented out the //while - loop and now all attributes and their values are displayed correctly!

    I am not php guru, so maybe someone could confirm that this is correctly fixed.

    www.vmtarvike.com

  6. #26
    Join Date
    Jun 2007
    Location
    NJ
    Posts
    83
    Plugin Contributions
    0

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

    Is there a way to add products to a "temporary basket" sidebox and also show editable attributes in that basket that can be changed up until the user hits a button in that sidebox called add-to-cart. I guess it would be a sort of pseudo cart that must be confirmed by the user then they send it to the cart.[FONT=Times New Roman]
    [FONT=Verdana][/FONT]
    [/FONT]

  7. #27
    Join Date
    Jun 2011
    Posts
    9
    Plugin Contributions
    0

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

    I inserted the following code in tpl_shopping_cart.php as suggested in this thread. I managed to display in my shopping cart sidebox as follows:

    1ea - myproductname
    Model : mymodelnumber
    Colour : ?????
    Size : myattributesize

    How do I get the colour attribute to be displayed as well? Can someone help me with this?



    // 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 .= '<ul><div style="font-size: 12px; margin-left: -15px; color: #9f1c00;">' . 'Model : ' .$products[$i]['model'] .'<br>'. 'Colour : ' .'<br>'.'Size : ' .$attributes->fields['products_options_values_name'] . '</div></ul><br>';
    }
    }
    }
    // EOF Display Attributes //

  8. #28
    Join Date
    Jan 2012
    Posts
    1
    Plugin Contributions
    0

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

    Quote Originally Posted by tinamohd View Post
    I inserted the following code in tpl_shopping_cart.php as suggested in this thread. I managed to display in my shopping cart sidebox as follows:

    1ea - myproductname
    Model : mymodelnumber
    Colour : ?????
    Size : myattributesize

    How do I get the colour attribute to be displayed as well? Can someone help me with this?



    // 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 .= '<ul><div style="font-size: 12px; margin-left: -15px; color: #9f1c00;">' . 'Model : ' .$products[$i]['model'] .'<br>'. 'Colour : ' .'<br>'.'Size : ' .$attributes->fields['products_options_values_name'] . '</div></ul><br>';
    }
    }
    }
    // EOF Display Attributes //
    I know that reviving old threads is bad. But I cannot seem to get more than 1 attribute showing at a time. For some reason it wont show the other one. It shows the size of a product but not the color.

  9. #29
    Join Date
    Jul 2006
    Location
    Holland
    Posts
    27
    Plugin Contributions
    0

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

    Only shows te first attributes, anybody found a solution ?

    Tnx.

    Macbos

  10. #30

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

    Post number 25 addresses this issue. Just remove the while loop and both attributes are shown correctly.

 

 
Page 3 of 3 FirstFirst 123

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

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