Jump to content

joehcc

Members
  • Content count

    3
  • Joined

  • Last visited

Profile Information

  • Real Name
    Josh Hurst
  1. I had the same problem that Brock did on this forum. Once I added text features, the normal "radio" or "select" features would not show up in the shopping cart, yet showed up in the order and even in the packing slip,etc. Also, I would lose attributes when I logged in. I tried simon's fix and it did not seem to help me (Sorry simon - sounds like you grinded through this!). This is what worked - thank goodness I am lazy and it's really easy: First, some background. I am running oscommerce RC2a. Also, I have manually installed V3.0 of Option Type Feature. I also installed the June 22, 2008 contrib fix to \classes\shopping_cart.php, and post 663 on this forum from dracono about application_top.php fix- the '+++', I also have the famous line 87 uncommented in \catalog\shopping_cart.php, but this doesn't seem to matter either way. Simple fix to keep all attributes showing up In \catalog\shopping_cart.php - Find: else { $attr_value = $attributes_values['products_options_values_name'] . tep_draw_hidden_field('id[' . $products[$i]['id'] . '+++' . $i. '][' . $option . ']', $value); $attr_name = $attributes_values['products_options_name']; } Replace with: else { $attributes_values = tep_db_fetch_array($attributes); // Add this line and it solved the attribute carry over problem. $attr_value = $attributes_values['products_options_values_name'] . tep_draw_hidden_field('id[' . $products[$i]['id'] . '+++' . $i. '][' . $option . ']', $value); $attr_name = $attributes_values['products_options_name']; } To solve the logon/cart carryover problem I used desrog/rory's post below - It worked for me! FIX FOR: Attributes being mixed up after create account or logout. If you have a lot of attributes for a product, you will want to add this fix, so the attributes continue to stay in order after your customers create an account, or after they logout and then log back in. I had a hard time finding an answer to this fix and had to go back to posts from 2004. See the following posts for this fix or follow the instructions below: http://forums.oscommerce.com/index.php?s=&...st&p=275529 http://forums.oscommerce.com/index.php?s=&...st&p=275539 http://forums.oscommerce.com/index.php?s=&...st&p=275586 -------------------------------------------------------------- INSTRUCTIONS: Credit for this fix goes to matt (iiinetworks in the forum) FILE: includes/classes/order.php Find the following: if ($products[$i]['attributes']) { $subindex = 0; reset($products[$i]['attributes']); while (list($option, $value) = each($products[$i]['attributes'])) { Replace with: if ($products[$i]['attributes']) { $subindex = 0; ksort($products[$i]['attributes']); reset($products[$i]['attributes']); while (list($option, $value) = each($products[$i]['attributes'])) { -------------------------------------------------------------------------------------------- FILE: includes/classes/shopping_cart.php Find the following: if (isset($this->contents[$products_id]['attributes'])) { reset($this->contents[$products_id]['attributes']); while (list($option, $value) = each($this->contents[$products_id]['attributes'])) { Replace with: if (isset($this->contents[$products_id]['attributes'])) { ksort($this->contents[$products_id]['attributes']); reset($this->contents[$products_id]['attributes']); while (list($option, $value) = each($this->contents[$products_id]['attributes'])) { Find the following: $attributes_query = tep_db_query("select products_options_id, products_options_value_id, products_options_value_text from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products['products_id']) . "'"); Replace with: $attributes_query = tep_db_query("select products_options_id, products_options_value_id, products_options_value_text from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int)$customer_id . "' and products_id = '" . tep_db_input($products['products_id']) . "' order by products_options_id"); -------------------------------------------------- I can honestly say this works and I have tested it fairly thoroughly using "COD" upon checkout. I also have many other mods installed and it all works seemlessly. Hope this helps everyone!
×