virgule Posted November 24, 2003 Share Posted November 24, 2003 Hi all B) I 've put both name and model of a desired product on the shopping cart info box. Now below that, I'd like to put the chosen options of a product in this box when added to the shopping cart...i tried to sort it out but here is what i obtain: 1 x D?licatesse (< name) [bLUE-LILAC] (< model) Array (< options) why an array?? --------------------------------- 12,00 ? (<price) here is my code (\webspace\includes\boxes\shopping_cart.php): $cart_contents_string .= $products[$i]['name']. ' <br>[' . $products[$i]['model']. ']<br>' . $products[$i]['attributes'] .'</span></td></tr></a>'; Thank you in advance for both your help & time ;) Enjoy ben Link to comment Share on other sites More sharing options...
virgule Posted November 24, 2003 Author Share Posted November 24, 2003 Sorry if i put this post on the wrong section :( :o enjoy ben Link to comment Share on other sites More sharing options...
Guest Posted November 24, 2003 Share Posted November 24, 2003 Array (< options) why an array??$products[$i]['attributes'] is (potentially) a list, so it is stored in an array. I've seen products with as many as 15 options. You can find an example traversing the array in checkout_process.php Hth, Matt Link to comment Share on other sites More sharing options...
virgule Posted November 24, 2003 Author Share Posted November 24, 2003 Cheerz m8 for your message! I tried it and now it works properly ;) thks again :) enjoy ben Link to comment Share on other sites More sharing options...
virgule Posted November 25, 2003 Author Share Posted November 25, 2003 No it doesn 't work...i dunno how to put that list in this array :'( erf..i follow the same thing in checkout_process.php! Need more help plz ;) enjoy ben Link to comment Share on other sites More sharing options...
MzBeanz Posted June 28, 2004 Share Posted June 28, 2004 Good day I am trying to do thids also.... I did as you listed bu t this is what I get in the shopping cart info box USING $cart_contents_string .= $products[$i]['name']. ' <br>[' . $products[$i]['model']. ']<br>' . $products[$i]['attributes'] .'</span></td></tr></a>'; YEILDS Deco Slide Mounts [PPsldmt] Deco Slide Mounts the shopping cart page to the right shows this (which is what I want in the info box for shopping cart) Deco Slide Mounts - Color Mocha Creme what do I need to change here $products[$i]['attributes'] .' for this color to show up on the left in the box? I tried Option Value in place of attributes but it did not work. Can anyone help? Link to comment Share on other sites More sharing options...
MzBeanz Posted June 28, 2004 Share Posted June 28, 2004 I found the code that writes what i want if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) { reset($products[$i]['attributes']); while (list($option, $value) = each($products[$i]['attributes'])) { $products_name .= '<br><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>'; } } but I do not know how to integrate it into Shopping_cart $cart_contents_string .= $products[$i]['quantity'] . ' x </span></td><td valign="top" class="infoBoxContents"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">'; Link to comment Share on other sites More sharing options...
MzBeanz Posted July 7, 2004 Share Posted July 7, 2004 Anyone have a guess> thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.