Jump to content

sparkly

Members
  • Content count

    23
  • Joined

  • Last visited

Profile Information

  • Real Name
    Maria Lundstrom
  • Location
    South Australia
  1. missed out one word; I have installed the contribution and google has now indexed some of my pages however not my index page (which holds many of my keywords)
  2. Hi and thanks for a great contribution! Probably a stupid question but shouldn't the index.php be included in the xml files? I have installed the contribution and google has now indexed some of my pages however my index page (which holds many of my keywords). What do I do to fix this, is it possible to include my main page (index.php) manually in the sitemapindex.xml file or do I need to do something else? Any thoughts appreciated Maria
  3. Hi I have added the option type feature contribution so I can collect customization/personalization information for a product from the end user in text fields. Here is a ink to contribution: http://www.oscommerce.com/community/contributions,160. My problem that the orders are added to the orders table but it does not seem to go into the customers_basket_attributes and the customers_basket table. To get the contribution working I needed to change the catalog/includes/classes/shopping_cart.php and I think something is wrong in the function add_cart, can someone please give some hints on where I'm going wrong. I would really appreciate the help since I am not a big php coder. thanks heaps! Maria here is my function: function add_cart($products_id, $qty = '1', $attributes = '', $notify = true) { global $new_products_id_in_cart, $customer_id; //$products_id_string = tep_get_uprid($products_id, $attributes); //$products_id = tep_get_prid($products_id_string); if (is_numeric($products_id) && is_numeric($qty)) { $check_product_query = tep_db_query("select products_status from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); $check_product = tep_db_fetch_array($check_product_query); if (($check_product !== false) && ($check_product['products_status'] == '1')) { if ($notify == true) { $new_products_id_in_cart = $products_id; tep_session_register('new_products_id_in_cart'); } // OTF contrib begins //if ($this->in_cart($products_id_string)) { // $this->update_quantity($products_id_string, $qty, $attributes); //} else { // $this->contents[$products_id_string] = array('qty' => $qty); if ($this->in_cart($products_id)) { $this->update_quantity($products_id, $qty, $attributes); } else { $this->contents[] = array($products_id); $this->contents[$products_id] = array('qty' => $qty); // OTF contrib ends // insert into database // OTF contrib begins //if (tep_session_is_registered('customer_id')) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET . " (customers_id, products_id, customers_basket_quantity, customers_basket_date_added) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id_string) . "', '" . (int)$qty . "', '" . date('Ymd') . "')"); if (tep_session_is_registered('customer_id')) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET . " (customers_id, products_id, customers_basket_quantity, customers_basket_date_added) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id) . "', '" . $qty . "', '" . date('Ymd') . "')"); // OTF contrib ends //if (is_array($attributes)) { // reset($attributes); //while (list($option, $value) = each($attributes)) { //OTF contrib begins //$this->contents[$products_id]['attributes'][$option] = $value; $attr_value = NULL; $blank_value = FALSE; if (strstr($option, TEXT_PREFIX)) { if (trim($value) == NULL) { $blank_value = TRUE; } else { $option = substr($option, strlen(TEXT_PREFIX)); $attr_value = htmlspecialchars(stripslashes($value), ENT_QUOTES); $value = PRODUCTS_OPTIONS_VALUE_TEXT_ID; $this->contents[$products_id]['attributes_values'][$option] = $attr_value; } } if (!$blank_value) { $this->contents[$products_id]['attributes'][$option] = $value; // OTF contrib ends // insert into database // OTF contrib begins //if (tep_session_is_registered('customer_id')) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, products_id, products_options_id, products_options_value_id) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id_string) . "', '" . (int)$option . "', '" . (int)$value . "')"); if (tep_session_is_registered('customer_id')) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, products_id, products_options_id, products_options_value_id, products_options_value_text) values ('" . (int)$customer_id . "', '" . tep_db_input($products_id) . "', '" . (int)$option . "', '" . (int)$value . "', '" . tep_db_input($attr_value) . "')"); } // OTF contrib ends } } } $this->cleanup(); // assign a temporary unique ID to the order contents to prevent hack attempts during the checkout procedure // OTF contrib begins // $this->cartID = $this->generate_cart_id(); // } // } //} $this->cartID = $this->generate_cart_id(); } //} // OTF contrib ends
×