Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

sefu

Pioneers
  • Posts

    200
  • Joined

  • Last visited

Everything posted by sefu

  1. Great Mod Kenny, I'm trying to use it to export it to some comparison sites but I am running into a small problem. It is giving me this error The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. -------------------------------------------------------------------------------- An invalid character was found in text content. Error processing resource 'http://www.minidisc.com.au/xml.php'. Line 1, Po... TDK Bitclubs 2003 80 Min 3 Pack Yellow</NAME><PRICE>19</PRICE><MANUFACTURER>TDK</MANUFACTURER>... I am getting a similar error with xml2.php What are the invalid characters? Any help is appriciated
  2. Sorry for bringing up a old thread but does anyone know how to make it auto select the credit card if the customer enters details into the cc field. I already have the auto cc select on load but some customers accidentely select other payment options and then decide to enter cc details which results in no cc details being received.
  3. Hi All, I have a number of customers who are entering their cc details into the cc feild but accidentely selecting another form of payment therefore we never receive their CC details. I am wondering if anyone can help me put a piece of javascript which will automatically select the CC payment option when they enter the cc number. I am using MS1 loaded. Please let me know what code you need to see to help if needed Thanks heaps!! Wing
  4. I am having a similar problem. We just moved our site to a dedicated server. Its a rare problem which I found happening with my PC. When ever I choose credit card and enter the details it will return saying to select a payment method although it is clearly selected as CC. I have narrowed down the problem to the SSL. If you take away the SSL it submits fine. I have found any forms in the SSL does not submit properly. Weird thing is it only affects a small amount of computers and I am not too sure what is setting it off. I have tested it with other PCs and no problems. I used Mozilla on the problem PC and no problems.
  5. I had a similar problem, look a few pages back. I would not get any bin information, but I found that my free account had a license number which I entered in and I get all the information now
  6. Yes everything is working perfectly now :) Thanks for the excellent mod! I am thinking about going for a paid service, I'm not sure if its a restriction of the free service but it doesnt show all the bin names, previously the free service would should 99% of the BIN names. Now with some of the request it would only show the BIN country and match. ANyone else experience this?
  7. Ok thanks everyone for helping, I have seperated the first 6 numbers from the encyption script. I had a problem with the BIN details displaying. I discovered that I do need to enter a license number to get these details. I found that my free account which allows me 1000 queries per month to have a license key. To find it go to the log in form http://www.maxmind.com/app/ccv2_login After you have logged in, there is a link near the bottom of the page called http interface, click it. Look for the heading License Key, and in bold there is your license key :)
  8. Great mod!! I had no problem installing it on MS1, so far so good! I currently have a mod installed which is prohibiting the BIN search to work. I have a mod which encryptes the cc number into the DB and requires a line of code to decrypt it. The mod is found here http://www.oscommerce.com/community/contri...arch,encryption I have a feeling that the cc is be encrypted and then being sent to maxmind, and of course it will not work as they are not valid cc numbers being sent. Does anyone know how to solve this problem?
  9. I have it working in MS1, it shows up fine in the customers part of the admin but I am getting $0 and no results in the reports section. Could this be something to do with orders_total table?
  10. You may need to change the DB to allow for those additional 2 digits
  11. Leave it at 3, you will need to change the CVV field to accept 4 characters. In catalog>includes>modules>payments>cc.php On about line 124 or 125 you should something like 'field' => tep_draw_input_field('cc_cvv', '', 'size=3 maxlength=3')))); Change the number from 3 to 4
  12. I got the programmer to fix the problem, there was some code missing in the version I have
  13. You will need to set up tax zones to be able to offer free shipping to a single country. Once you have set the zone, go into the free shipping module and change the zone option. It should work
  14. I've been using this great mod for the last few months, its great! Anyway I just recently discovered a small problem. SOme customers were receicing "the first 4 digits are not accepted" error even though the card is accepted. I have found that if you enter a card in with the spaces this error will pop up. The reason is that the script test the first 6 digits, obviously if there is a space in there it will fail. I've changed the error message to ask the customer to type in the card number without the spaces for the meantime until I get the script to delete the spaces before it submits. If anyone has any ideas on how to do this please feel free to let me know
  15. I had the same problem, I just downloaded the latest version and it fixed it
  16. Im having a similar problem as uurbana If I select 4 feature products max, it doesnt seem to register. It will display whatever I have active. How can i fix it?
  17. It looks like im the only person having a problem installing the code :( I am getting the following error Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /home/virtual/site4/fst/var/www/html/shop2/includes/classes/shopping_cart.php on line 321 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/virtual/site4/fst/var/www/html/shop2/includes/classes/shopping_cart.php:321) in /home/virtual/site4/fst/var/www/html/shop2/includes/functions/sessions.php on line 67 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/virtual/site4/fst/var/www/html/shop2/includes/classes/shopping_cart.php:321) in /home/virtual/site4/fst/var/www/html/shop2/includes/functions/sessions.php on line 67 Fatal error: Cannot instantiate non-existent class: shoppingcart in /home/virtual/site4/fst/var/www/html/shop2/includes/application_top.php on line 381 Looks Like I have done something wrong in the shopping_cart.php class file, I followed the instructions, but i guess theres a syntax prob someone that might conflict with another mod. Can someone help me out please? My shopping cart code follows <?php /* $Id: shopping_cart.php,v 1.2 2003/01/15 20:23:38 wilt Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ class shoppingCart { var $contents, $total, $weight, $cartID, $content_type; // mod indvship var $shiptotal; // end indvship function shoppingCart() { $this->reset(); } function restore_contents() { global $customer_id; if (!$customer_id) return 0; // insert current cart contents in database if ($this->contents) { reset($this->contents); while (list($products_id, ) = each($this->contents)) { $qty = $this->contents[$products_id]['qty']; $product_query = tep_db_query("select products_id from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . $customer_id . "' and products_id = '" . $products_id . "'"); if (!tep_db_num_rows($product_query)) { tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET . " (customers_id, products_id, customers_basket_quantity, customers_basket_date_added) values ('" . $customer_id . "', '" . $products_id . "', '" . $qty . "', '" . date('Ymd') . "')"); if ($this->contents[$products_id]['attributes']) { reset($this->contents[$products_id]['attributes']); while (list($option, $value) = each($this->contents[$products_id]['attributes'])) { tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, products_id, products_options_id, products_options_value_id) values ('" . $customer_id . "', '" . $products_id . "', '" . $option . "', '" . $value . "')"); } } } else { tep_db_query("update " . TABLE_CUSTOMERS_BASKET . " set customers_basket_quantity = '" . $qty . "' where customers_id = '" . $customer_id . "' and products_id = '" . $products_id . "'"); } } } // reset per-session cart contents, but not the database contents $this->reset(FALSE); $products_query = tep_db_query("select products_id, customers_basket_quantity from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . $customer_id . "'"); while ($products = tep_db_fetch_array($products_query)) { $this->contents[$products['products_id']] = array('qty' => $products['customers_basket_quantity']); // attributes $attributes_query = tep_db_query("select products_options_id, products_options_value_id from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . $customer_id . "' and products_id = '" . $products['products_id'] . "'"); while ($attributes = tep_db_fetch_array($attributes_query)) { $this->contents[$products['products_id']]['attributes'][$attributes['products_options_id']] = $attributes['products_options_value_id']; } } $this->cleanup(); } function reset($reset_database = FALSE) { global $customer_id; $this->contents = array(); $this->total = 0; $this->weight = 0; $this->content_type = false; // mod indvship $this->shiptotal = 0; // end indvship if ($customer_id && $reset_database) { tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . $customer_id . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . $customer_id . "'"); } unset($this->cartID); if (tep_session_is_registered('cartID')) tep_session_unregister('cartID'); } function add_cart($products_id, $qty = '', $attributes = '', $notify = true) { global $new_products_id_in_cart, $customer_id; $products_id = tep_get_uprid($products_id, $attributes); if ($notify == true) { $new_products_id_in_cart = $products_id; tep_session_register('new_products_id_in_cart'); } if ($this->in_cart($products_id)) { $this->update_quantity($products_id, $qty, $attributes); } else { if ($qty == '') $qty = '1'; // if no quantity is supplied, then add '1' to the customers basket $this->contents[] = array($products_id); $this->contents[$products_id] = array('qty' => $qty); // insert into database if ($customer_id) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET . " (customers_id, products_id, customers_basket_quantity, customers_basket_date_added) values ('" . $customer_id . "', '" . $products_id . "', '" . $qty . "', '" . date('Ymd') . "')"); if (is_array($attributes)) { reset($attributes); while (list($option, $value) = each($attributes)) { $this->contents[$products_id]['attributes'][$option] = $value; // insert into database if ($customer_id) tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " (customers_id, products_id, products_options_id, products_options_value_id) values ('" . $customer_id . "', '" . $products_id . "', '" . $option . "', '" . $value . "')"); } } } $this->cleanup(); // assign a temporary unique ID to the order contents to prevent hack attempts during the checkout procedure $this->cartID = $this->generate_cart_id(); } function update_quantity($products_id, $quantity = '', $attributes = '') { global $customer_id; if ($quantity == '') return true; // nothing needs to be updated if theres no quantity, so we return true.. $this->contents[$products_id] = array('qty' => $quantity); // update database if ($customer_id) tep_db_query("update " . TABLE_CUSTOMERS_BASKET . " set customers_basket_quantity = '" . $quantity . "' where customers_id = '" . $customer_id . "' and products_id = '" . $products_id . "'"); if (is_array($attributes)) { reset($attributes); while (list($option, $value) = each($attributes)) { $this->contents[$products_id]['attributes'][$option] = $value; // update database if ($customer_id) tep_db_query("update " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " set products_options_value_id = '" . $value . "' where customers_id = '" . $customer_id . "' and products_id = '" . $products_id . "' and products_options_id = '" . $option . "'"); } } } function cleanup() { global $customer_id; reset($this->contents); while (list($key,) = each($this->contents)) { if ($this->contents[$key]['qty'] < 1) { unset($this->contents[$key]); // remove from database if ($customer_id) { tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . $customer_id . "' and products_id = '" . $key . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . $customer_id . "' and products_id = '" . $key . "'"); } } } } function count_contents() { // get total number of items in cart $total_items = 0; if (is_array($this->contents)) { reset($this->contents); while (list($products_id, ) = each($this->contents)) { $total_items += $this->get_quantity($products_id); } } return $total_items; } function get_quantity($products_id) { if ($this->contents[$products_id]) { return $this->contents[$products_id]['qty']; } else { return 0; } } function in_cart($products_id) { if ($this->contents[$products_id]) { return true; } else { return false; } } function remove($products_id) { global $customer_id; unset($this->contents[$products_id]); // remove from database if ($customer_id) { tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . $customer_id . "' and products_id = '" . $products_id . "'"); tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . $customer_id . "' and products_id = '" . $products_id . "'"); } // assign a temporary unique ID to the order contents to prevent hack attempts during the checkout procedure $this->cartID = $this->generate_cart_id(); } function remove_all() { $this->reset(); } function get_product_id_list() { $product_id_list = ''; if (is_array($this->contents)) { reset($this->contents); while (list($products_id, ) = each($this->contents)) { $product_id_list .= ', ' . $products_id; } } return substr($product_id_list, 2); } function calculate() { $this->total_virtual = 0; $this->total = 0; $this->weight = 0; // mod indvship $this->shiptotal = 0; // end indvship if (!is_array($this->contents)) return 0; reset($this->contents); while (list($products_id, ) = each($this->contents)) { $qty = $this->contents[$products_id]['qty']; // products price $product_query = tep_db_query("select products_id, products_price, products_ship_price, products_tax_class_id, products_weight from " . TABLE_PRODUCTS . " where products_id='" . tep_get_prid($products_id) . "'"); if ($product = tep_db_fetch_array($product_query)) { // ICW ORDER TOTAL CREDIT CLASS Start Amendment $no_count=1; $gv_query=tep_db_query("select products_model from ".TABLE_PRODUCTS." where products_id='".$products_id."'"); $gv_result=tep_db_fetch_array($gv_query); if (ereg('^GIFT', $gv_result['products_model'])) { $no_count=0; } // ICW ORDER TOTAL CREDIT CLASS End Amendment $prid = $product['products_id']; $products_tax = tep_get_tax_rate($product['products_tax_class_id']); $products_price = $product['products_price']; $products_weight = $product['products_weight']; // mod indvship $products_ship_price = $product['products_ship_price']; // end indvship $special_price = tep_get_products_special_price($prid); if ($special_price) { $products_price = $special_price; } $this->total_virtual += tep_add_tax($products_price, $products_tax) * $qty*$no_count;// CREDIT CLASS; $this->weight_virtual += ($qty * $products_weight)*$no_count;// CREDIT CLASS; $this->total += tep_add_tax($products_price, $products_tax) * $qty; // mod indvship $this->shiptotal += ($products_ship_price * $qty); // end indvship $this->weight += ($qty * $products_weight); } // attributes price if ($this->contents[$products_id]['attributes']) { reset($this->contents[$products_id]['attributes']); while (list($option, $value) = each($this->contents[$products_id]['attributes'])) { $attribute_price_query = tep_db_query("select options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . $prid . "' and options_id = '" . $option . "' and options_values_id = '" . $value . "'"); $attribute_price = tep_db_fetch_array($attribute_price_query); if ($attribute_price['price_prefix'] == '+') { $this->total += $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax); } else { $this->total -= $qty * tep_add_tax($attribute_price['options_values_price'], $products_tax); } } } } } function attributes_price($products_id) { if ($this->contents[$products_id]['attributes']) { reset($this->contents[$products_id]['attributes']); while (list($option, $value) = each($this->contents[$products_id]['attributes'])) { $attribute_price_query = tep_db_query("select options_values_price, price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . $products_id . "' and options_id = '" . $option . "' and options_values_id = '" . $value . "'"); $attribute_price = tep_db_fetch_array($attribute_price_query); if ($attribute_price['price_prefix'] == '+') { $attributes_price += $attribute_price['options_values_price']; } else { $attributes_price -= $attribute_price['options_values_price']; } } } return $attributes_price; } function get_products() { global $languages_id; if (!is_array($this->contents)) return 0; $products_array = array(); reset($this->contents); while (list($products_id, ) = each($this->contents)) { $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_price, p.products_weight, p.products_tax_class_id, products_qb_sales_class, products_qb_sales_account from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id='" . tep_get_prid($products_id) . "' and pd.products_id = p.products_id and pd.language_id = '" . $languages_id . "'"); if ($products = tep_db_fetch_array($products_query)) { $prid = $products['products_id']; $products_price = $products['products_price']; $specials_query = tep_db_query("select specials_new_products_price from " . TABLE_SPECIALS . " where products_id = '" . $prid . "' and status = '1'"); if (tep_db_num_rows($specials_query)) { $specials = tep_db_fetch_array($specials_query); $products_price = $specials['specials_new_products_price']; } $products_array[] = array('id' => $products_id, 'name' => $products['products_name'], 'model' => $products['products_model'], 'price' => $products_price, 'quantity' => $this->contents[$products_id]['qty'], 'weight' => $products['products_weight'], 'class' => $products['products_qb_sales_class'], 'accnt' => $products['products_qb_sales_account'], 'final_price' => ($products_price + $this->attributes_price($products_id)), 'tax_class_id' => $products['products_tax_class_id'], 'attributes' => $this->contents[$products_id]['attributes']); } } return $products_array; } { global $languages_id; if (!is_array($this->contents)) return 0; $products_array = array(); reset($this->contents); while (list($products_id, ) = each($this->contents)) { $products_query = tep_db_query("select p.products_id, pd.products_name, p.products_model, p.products_price, p.products_weight, p.products_tax_class_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id='" . tep_get_prid($products_id) . "' and pd.products_id = p.products_id and pd.language_id = '" . $languages_id . "'"); if ($products = tep_db_fetch_array($products_query)) { $prid = $products['products_id']; $products_price = $products['products_price']; $special_price = tep_get_products_special_price($prid); if ($special_price) { $products_price = $special_price; } $products_array[] = array('id' => $products_id, 'name' => $products['products_name'], 'model' => $products['products_model'], 'price' => $products_price, 'quantity' => $this->contents[$products_id]['qty'], 'weight' => $products['products_weight'], 'final_price' => ($products_price + $this->attributes_price($products_id)), 'tax_class_id' => $products['products_tax_class_id'], 'attributes' => $this->contents[$products_id]['attributes']); } } return $products_array; } function show_total() { $this->calculate(); return $this->total; } function get_shiptotal() { $this->calculate(); return $this->shiptotal; } function show_weight() { $this->calculate(); return $this->weight; } // CREDIT CLASS Start Amendment function show_total_virtual() { $this->calculate(); return $this->total_virtual; } function show_weight_virtual() { $this->calculate(); return $this->weight_virtual; } // CREDIT CLASS End Amendment function generate_cart_id($length = 5) { return tep_create_random_value($length, 'digits'); } function unserialize($broken) { for(reset($broken);$kv=each($broken);) { $key=$kv['key']; if (gettype($this->$key)!="user function") $this->$key=$kv['value']; } } function get_content_type() { $this->content_type = false; if ( (DOWNLOAD_ENABLED == 'true') && ($this->count_contents() > 0) ) { reset($this->contents); while (list($products_id, ) = each($this->contents)) { if (isset($this->contents[$products_id]['attributes'])) { reset($this->contents[$products_id]['attributes']); while (list(, $value) = each($this->contents[$products_id]['attributes'])) { $virtual_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad where pa.products_id = '" . $products_id . "' and pa.options_values_id = '" . $value . "' and pa.products_attributes_id = pad.products_attributes_id"); $virtual_check = tep_db_fetch_array($virtual_check_query); if ($virtual_check['total'] > 0) { switch ($this->content_type) { case 'physical': $this->content_type = 'mixed'; return $this->content_type; break; default: $this->content_type = 'virtual'; break; } } else { switch ($this->content_type) { case 'virtual': $this->content_type = 'mixed'; return $this->content_type; break; default: $this->content_type = 'physical'; break; } } } } else { switch ($this->content_type) { case 'virtual': $this->content_type = 'mixed'; return $this->content_type; break; default: $this->content_type = 'physical'; break; } } } } else { $this->content_type = 'physical'; } return $this->content_type; } // ------------------------ ICWILSON Gift Voucher Addittion-------------------------------Start // amend count_contents to show nil contents for shipping // as we don't want to quote for 'virtual' item // GLOBAL CONSTANTS if NO_COUNT_ZERO_WEIGHT is true then we don't count any product with a weight // which is less than or equal to MINIMUM_WEIGHT // otherwise we just don't count gift certificates function count_contents_virtual() { // get total number of items in cart disregard gift vouchers $total_items = 0; if (is_array($this->contents)) { reset($this->contents); while (list($products_id, ) = each($this->contents)) { $no_count=false; $gv_query=tep_db_query("select products_model from ".TABLE_PRODUCTS." where products_id='".$products_id."'"); $gv_result=tep_db_fetch_array($gv_query); if (ereg('^GIFT', $gv_result['products_model'])) { $no_count=true; } if (NO_COUNT_ZERO_WEIGHT==1) { $gv_query = tep_db_query("select products_weight from " . TABLE_PRODUCTS . " where products_id='" . tep_get_prid($products_id) . "'"); $gv_result=tep_db_fetch_array($gv_query); if ($gv_result['products_weight']<=MINIMUM_WEIGHT) { $no_count=true; } } if ($no_count==false) $total_items += $this->get_quantity($products_id); } } return $total_items; } // ------------------------ ICWILSON Gift Voucher Addittion-------------------------------End } ?>
  18. Great mod! I'm having a small problem, it occurs in both version 1.2a and 1.2b. If I edit a order for example of $17.50 and I submit the change it will round it up to $18 and store it in the DB. What can I do to fix this?
  19. Just wondering, how can I sort the questions by the date. I want earliest to be listed to be at the top, or is there a way to sort them manually?
  20. Go to your shipping module screen in the admin and enable the "FREE SHIPPING" module. Then go to Order Total modules screen and enter the config of the SHIPPING, and enable free shipping. it should work
  21. Thanks for version 2! My programmer has re-written this great mod to work with free count. You can download it here http://www.oscommerce.com/community/contributions,1515
  22. That makes sense :) Anyone willing to rewrite for MS1and MS2?
  23. Also I think you missed this in application_top.php define('FILENAME_CREATE_ORDER', 'create_order.php');
  24. Great mod. I'm having a prob when entering the order. When I hit submit the next screen (create_order_process.php) shows the following 1054 - Unknown column 'new_value' in 'field list' insert into orders_status_history (orders_id, new_value, date_added) values ('1717', '1', now()) [TEP STOP]
  25. No probs. I will see what I can do and update a little later on. I think its a great mod I dont want to miss out on.
×
×
  • Create New...