Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

tlelliott77

Archived
  • Posts

    180
  • Joined

  • Last visited

About tlelliott77

  • Birthday 07/07/1972

Profile Information

tlelliott77's Achievements

  1. Also, any changes would have to allow the current functionality to be chosen for some products and the new functionality to be chosen for others. This is more complicated than I first thought. :-(
  2. Hi Thanks to the author and anyone else who's worked on this contribution. I've had it installed and working for a long time. I have a problem with certain products as follows. We sell letters for kids bedroom doors etc. Customers can order letters and select the required letters using the text box field. However they must also choose the correct quantity of letters to be added to the cart. Does anyone know how I can adjust the process of updating the cart with a product like this so it automatically updates the quantity added to the cart dependent on what letters are chosen? e.g. someone types the name JOHN into the text area but leaves the quantity amount at 1, then selects add to cart. The system then automatically adds 4 letters instead of one. Any help much appreciated. Tim
  3. Found the solution. I was using an old version and needed a fix in application_top.php reset($HTTP_POST_VARS);
  4. I have been using Master Products for a long time and it has worked fine. Recently my web host updated the PHP version on my server to V5.2.6 and now I have a problem with master products: Adding to the cart from the master listing does not work. i.e when you view a master product, enter quantities and add to the cart, the cart remains empty. My products are still added to the cart from a normal product listing. Has anyone else had this problem with a php upgrade, or does anyone know what changes in php may have caused it? Thanks in advance for any help. Tim
  5. Yes, the file is catalog/includes/functions/general.php. p.s. Thanks to all who've contributed to this useful mod.
  6. I can't find an ongoing thread for the Enable/Disable categories contribution so this is in a new thread. I noticed that when you disable a subcategory the product count in the categories infobox still displays the total number of products as if the subcategory were enabled. To correct this you can change the following: Find (line 378 in the version in the contribution): $products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = p2c.products_id and p.products_status = '1' and p2c.categories_id = '" . (int)$category_id . "'"); And change to: $products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_CATEGORIES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.categories_status = '1' and p.products_status = '1' and p2c.categories_id = '" . (int)$category_id . "'"); If anyone knows of a suitable thread to add this to please post a reply so I can repost elsewhere. Tim
  7. Well I've done some messing around and got something to work. In the shipping module I've added the following lines at the end of the quotes function: $out_stock = $cart->all_in_stock(); if ($out_stock > 0) $this->quotes['error'] = MODULE_SHIPPING_NEXTDAY_NO_STOCK; and added this function into classes/shopping_cart.php function all_in_stock() { //Check if all cart contents are in stock $all_in_stock = 0; if (is_array($this->contents)) { reset($this->contents); while (list($products_id, ) = each($this->contents)) { $stock_quantity_query = tep_db_query("select products_id, products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); $stock_quantity = tep_db_fetch_array($stock_quantity_query); if($this->get_quantity($products_id) > $stock_quantity['products_quantity']) { $all_in_stock += 1; } } } return $all_in_stock; } This works OK but it doesn't work as a drop-in shipping module as you need to change a core OSC file. Does anyone know how transfer the function into the shipping module and change all the $this->contents references to still pick up cart contents? Again, any help is appreciated.
  8. Can anyone help me wih this? I want a shipping module that will only be available in checkout_shipping.php if all items in the cart have quantity of more than 1 in stock. The reason for this is that it will be a next day shipping option which will only be available for in-stock items. For me it will be best to use a modified table rate module. I know I need to put the clause inside the function quote($method = '') { } tags in the same way that the zones module gives this error: if ($error == true) $this->quotes['error'] = MODULE_SHIPPING_ZONES_INVALID_ZONE; I just don't know how to query the items in the cart to make sure they all have products_quantity greater than 1. If anyone can help I'd appreciate it. Tim
  9. Oh, I see later on in the instructions you have the same editing but with the extra change I mentioned in my last post. Might be an idea to clean that up on the next release. As far as I can see there are 3 duplicate instructions for categories.php. Cheers Tim
  10. Just looking at the install instructions I think there may be a line missing on page 4 where it says: Replace With: } elseif ($HTTP_POST_VARS['copy_as'] == 'duplicate') { $product_query = tep_db_query("select products_quantity, products_model, products_image, products_price, products_cost, products_date_available, products_weight, products_tax_class_id, manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'"); $product = tep_db_fetch_array($product_query); tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, products_price, products_cost, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "', now(), '" . tep_db_input($product['products_date_available']) . "', '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')"); $dup_products_id = tep_db_insert_id(); I think the line: tep_db_input($product['products_price']) . "', now(), '" . Should change to: tep_db_input($product['products_price']) . "', '" . tep_db_input($product['products_cost']) . "', now(), '" . Please someone correct me if I'm wrong. Great contribution by the way. My only minor gripe is having the instructions in PDF. Makes it a pain in the ...... to copy into text files. Line breaks seem to get all screwed up. Cheers Tim
  11. Further update to the large integer order_id problem. I suggest that if anyone else gets this problem then they change the way they generate the order id. Instead of JJJHHMMSSR use JJJHHMMRR which will never go over 2147483647. If you do want to keep it as JJJHHMMSSR then all the (int)$order_id refeences need to be changed to $order_id for the entire site. Not a good solution but possible. I don;t know what efect this will have on operation though so can't recommend it. Tim
  12. Update to Richard's problem - it's a problem I had last night as well. If anyone else is finding orders not going through properly and the last order they received was order_id 2147483647 then read on. 2147483647 is the largest number that can fit into a int field in MySQL. Any order numbers above this are all put in as this number, so subsequent orders fail to get entered - duplicate order id. My order id is generated using JJJHHMMSSR JJJ = 3 digit julian day HH = 2 digit hour MM = 2 digit minute SS = 2 digit second R = Random number between 0 and 9. So at the start of day 215 in the year the order id is higher than 2147483647 and any subsequent order is entered as 2147483647 into the order_id INT(11) field. I solved the problem like this: Changed all orders_id fields in the orders tables (I think there are 6 tables that need changing) from int(11) to bigint(11). This allows higher order numbers. In orders.php and a few other files in the admin side there are references to (int)$oID. This can be changed to $oID for all cases. It seems to work for me now. Another different solution would be to change the generation of the order id so it never goes above 2147483647. Haven't come up with a suitable way yet though. Hope this helps Tim
  13. Richard Hope you got my email. As I said, if your hosts have changed your server HSBC's DNS server doesn't seem to update very quickly. They are still working on this. The work around is to put the IP of your secure server into the CpiDirectResultUrl in hsbc.php Mine now reads: 'CpiDirectResultUrl'=>'https://67.15.54.137/~kidzdens/catalog/checkout_process.php', instead of: 'CpiDirectResultUrl'=>'https://ssl.europahosting.co.uk/~kidzdens/catalog/checkout_process.php', This has to be a temporary measure and if you confirm this is the problem I will give HSBC some more hassle about it. Hope that helps Tim
  14. I think I have a solution to this problem. Can a those who are having this problem test the following changes? In stats_referral_sources.php find: $referrals_query_raw = "select count(ci.customers_info_source_id) as no_referrals, so.sources_other_name as sources_name from " . TABLE_CUSTOMERS_INFO . " ci, " . TABLE_SOURCES_OTHER . " so where ci.customers_info_source_id = '9999' group by so.sources_other_name order by so.sources_other_name DESC"; And change it to: $referrals_query_raw = "select count(ci.customers_info_source_id) as no_referrals, so.sources_other_name as sources_name from " . TABLE_CUSTOMERS_INFO . " ci, " . TABLE_SOURCES_OTHER . " so where ci.customers_info_source_id = '9999' and so.customers_id = ci.customers_info_id group by so.sources_other_name order by so.sources_other_name DESC"; This should now correctly reflect the numbers of "Other" sources. I have also modded this to work with PWA. I anyone wants to find out how I'll try to formulate the changes into a coherent post. Cheers Tim
  15. Hi Joe A possible cause of different users getting the same session ID is if they are all clicking on a link that includes a session ID. I've read that this can be caused by not preventing spider sessions, although I'm no expert on this. If a spider starts a session then the links in a search engine can contain osCsid's and cause multiple users to access the same session. Just a suggestion to check up on. If this is not the case in your site then I'm not sure what it is. Tim
×
×
  • Create New...