Jump to content


  • Content count

  • Joined

  • Last visited

1 Follower

About coffman

  • Birthday 02/05/1963

Profile Information

  • Real Name
  • Gender
  • Location
  • Interests
    My family :), Music, Guitar, Outside.
  • Website
  1. OK - I hope this is the right place to post this. I have downloaded and installed version 2.8 and it is working very well. The one issue that I have is that searches and sorts seem to present some funky info in the meta data. I seem to the get the raw sort info pre-pended to the meta data As in: sort_2d | Pickboy Suncreek Music - Guitar Strings, Picks and More. The following URL will show you what I mean.. http://www.suncreekmusic.com/pickboy-m-49.html?sort=2d&page=1 I am using a very old version of header_tag_controller and have found that if I comment out the ob_start(); that is recommended, the sort_2d goes away. Is this an ok 'fix' ? Any pointers. Thanks.
  2. This may not affect others, but I figured I would post my fix anyway. This is posted as is, no warranties - use at your own risk, backup before trying etc.... The problem. I have the USPS, UPS and table shipping modules enabled. The table module is configured as follows: 24.99:2.99,34.99:3.49,49.99:3.99,50:0.0 As you can see from the table, I wanted to provide free shipping for orders over $50.00. Unfortunately, I discovered that the shipping module was ignoring the $0.0 shipping when setting default shipping choice on the shipping page. It would instead select the cheapest non-zero shipping method (usually USPS Priority). Then we would get an email from a customer wondering why they had paid for shipping when it was supposed to be 'free'. To ensure that free shipping is selected as the default on the shipping page modified file includes/classes/shipping.php at about line 99 as follows. Replace if (isset($quotes['methods'][$i]['cost']) && tep_not_null($quotes['methods'][$i]['cost'])) { $rates[] = array('id' => $quotes['id'] . '_' . $quotes['methods'][$i]['id'], 'title' => $quotes['module'] . ' (' . $quotes['methods'][$i]['title'] . ')', 'cost' => $quotes['methods'][$i]['cost']); } With if (isset($quotes['methods'][$i]['cost']) && tep_not_null($quotes['methods'][$i]['cost'])) { $rates[] = array('id' => $quotes['id'] . '_' . $quotes['methods'][$i]['id'], 'title' => $quotes['module'] . ' (' . $quotes['methods'][$i]['title'] . ')', 'cost' => $quotes['methods'][$i]['cost']); } elseif (preg_match("/table.php/", "$value")) { $rates[] = array('id' => $quotes['id'] . '_' . $quotes['methods'][$i]['id'], 'title' => $quotes['module'] . ' (' . $quotes['methods'][$i]['title'] . ')', 'cost' => $quotes['methods'][$i]['cost']); } For those who like diff, here is the diff output of the old and new files: *** shipping.php 2009-10-08 21:00:25.000000000 -0400 --- shipping.php_mdc 2009-10-08 20:58:47.000000000 -0400 *************** *** 100,109 **** $rates[] = array('id' => $quotes['id'] . '_' . $quotes['methods'][$i]['id'], 'title' => $quotes['module'] . ' (' . $quotes['methods'][$i]['title'] . ')', 'cost' => $quotes['methods'][$i]['cost']); - } elseif (preg_match("/table.php/", "$value")) { - $rates[] = array('id' => $quotes['id'] . '_' . $quotes['methods'][$i]['id'], - 'title' => $quotes['module'] . ' (' . $quotes['methods'][$i]['title'] . ')', - 'cost' => $quotes['methods'][$i]['cost']); } } } --- 100,105 ---- So as you can see, I just check for the table.php module and if it is loaded and ends up being zero, go ahead and set the cost to $0.0 Hope this helps someone else out...
  3. coffman

    [Contribution] - USPS Methods

    Here is how I fixed the problem related to usps method problems posted by Jayman11, dreamlab, ace21gabriel and justpillows. Seems the post office made changes that caused the first item listed to be selected everytime instead of the actual shipping method chosen by a customer. This is just a hack, read carefully and backup your database and files before making any changes!!!!!!!!!!!!!!! The root of the problem seems to be that the USPS changed the format of some of the shipping classes. I am only using USPS classes for First Class, Priority and Express mail and that is all that is outlined in this fix. You will need to modify these instructions to match your needs.... In the end all I had to do was change the instances of Priority to PRIORITY, First Class to FIRST CLASS and Express Mail to EXPRESS. With the exception of the types table. The same values also had to be updated in the database.... Nothing like a little scrambling to ensure things are online and working for the holiday shoppers :) I hope this helps others.... I am using the module - USPS Methods 2.5 File Changes: I had to update the file includes/modules/shipping/usps.php ===Lines 48-50 From This: $this->types = array('Express' => 'Express Mail', 'First Class' => 'First-Class Mail', 'Priority' => 'Priority Mail', To This: $this->types = array('EXPRESS' => 'Express Mail', 'FIRST CLASS' => 'First-Class Mail', 'PRIORITY' => 'Priority Mail', ===Lines 148 From This: tep_db_query("insert into " . TABLE_CONFIGURATION . " ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Domestic ShippingMethods', 'MODULE_SHIPPING_USPS_TYPES', 'Express, Priority, First Class, Parcel', 'Select the domestic services to be offered:', '6', '14', 'tep_cfg_select_multioption(array(\'Express\', \'Priority\', \'First Class\', \'Parcel\'), ', now())"); To This: tep_db_query("insert into " . TABLE_CONFIGURATION . " ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Domestic ShippingMethods', 'MODULE_SHIPPING_USPS_TYPES', 'EXPRESS, PRIORITY, FIRST CLASS, Parcel', 'Select the domestic services to be offered:', '6', '14', 'tep_cfg_select_multioption(array(\'EXPRESS\', \'PRIORITY\', \'FIRST CLASS\', \'Parcel\'), ', now())"); ===Line 223-226 From This: case 'Express': $transreq[$key] = 'API=ExpressMail&XML=' . urlencode( '<ExpressMailRequest ' . $transitreq . '</ExpressMailRequest>'); break; case 'Priority': $transreq[$key] = 'API=PriorityMail&XML=' . To This: case 'EXPRESS': $transreq[$key] = 'API=ExpressMail&XML=' . urlencode( '<ExpressMailRequest ' . $transitreq . '</ExpressMailRequest>'); break; case 'PRIORITY': $transreq[$key] = 'API=PriorityMail&XML=' . ===Line 324 From This: case 'Express': $time = ereg('<MonFriCommitment>(.*)</MonFriCommitment>', $transresp[$service], $tregs); To This: case 'EXPRESS': $time = ereg('<MonFriCommitment>(.*)</MonFriCommitment>', $transresp[$service], $tregs); ===Line 332: From This: case 'Priority': $time = ereg('<Days>(.*)</Days>', $transresp[$service], $tregs); To This: case 'PRIORITY': $time = ereg('<Days>(.*)</Days>', $transresp[$service], $tregs); ===Line 352: From This: case 'First Class': $time = '2 - 5 ' . MODULE_SHIPPING_USPS_TEXT_DAYS; To This: case 'FIRST CLASS': $time = '2 - 5 ' . MODULE_SHIPPING_USPS_TEXT_DAYS; Database changes: I used phpmyadmin to manually update the configuratin. Selected the configuration table in the database Found the entry with the following attributes: configuration_key = MODULE_SHIPPING_USPS_TYPES For the field 'set_function I change the following values: Express 'changed to' EXPRESS Priority 'changed to' PRIORITY First Class 'changed to' FIRST CLASS
  4. coffman

    JUST RELEASED! Printable Catalog

    The file you want is: catalog/languages/english/print_catalog.php The value to change is: define('MAX_DISPLAY_PRINT_CATALOG', '10');
  5. coffman

    JUST RELEASED! Printable Catalog

    I am making the assumption that you guys are using the contrib found at: http://www.oscommerce.com/community/contributions,815 If so, I am also trying to get this contrib working. I do not get the divide by zero that some of you seem to be getting, so I am ignoring that for the time being. To get it to display the desired nubmer of pages instead of all of them at once you need to make a change to catalog/print_catalog.php around line 53 $print_catalog_query = tep_db_query($print_catalog_query_raw); Needs to be changed to: $print_catalog_query = tep_db_query($print_catalog_split->sql_query);
  6. Hello Fredrik.r, You don't have to install it into a clean installation. But it takes some effort to get it working. What are you doing when you receive the error you mention? What URL are you going to? -Michael
  7. Scotty: What you describe is not what happens on my site. The top of my installation.html files reads: I add products using only the stock page. I have many products with multiple options as you described. When a customer checks out, the correct quantity from that specific attribute is decremented and then the product total on the product page reflects this. If I only have 2 of a given attribute. Only 2 products with that attribute can be purchased. How do you have stock configured in the admin? I have the following: Check stock level - true Subtract stock - true Allow Checkout - false If you have the above configured the same as I do, then something is not correct with how qtpro is installed. Your store should not be allowing customers to check out when stock is not available for a given attribute. I am 100% certain that my store behaves correctly as I would be in big trouble if it did not :o
  8. If that is your actual code. There is a problem with the second line. $stock_query_raw .= " AND pa.options_id = '" . $products_attributes[0]['option_id'] . "' AND The element in $products_attributes[] should be set to $i instead of 0.
  9. I'm having these problems as well. Does anyone have this working where the inventory is being deducted like it is supposed to? :blink: Somebody please HELP! Lisa Well. It is working fine for me. I have never modified the quantity in the product detail page. As a matter of fact. When adding a new product, I don't set the quantity to any value. Then I only modify the quantity using the stock button (stock.php). I know this is probably of no real help, but at least you know it is working for someone else.
  10. rystan: You should have made some changes to the checkout_process.php file. In that file search for the string products_stock_attributes_array. This will get you into the section of code that actually updates the stock. The actual begining of the qtpro section starts with the following if statment: Within this code block are the actual sql "update" calls that insert the new quantity back into the products_table. Hope that helps get you in right area for debugging..
  11. OK. I forgot one important step. you need to add a couple of entries to another query. In product_info.php find the following code: while ($products_options = tep_db_fetch_array($products_options_query)) Just before this code, you need to add pa.options_id and pa.options_values_id to the $products_options_query = tep_db_query statment. Sorry about that :(
  12. Not sure if anyone following this topic is still interested in this. I am using the QTPro successfully but need to be able to have my product_info.php page show when items are out of stock. I have hacked a few lines of code that seems to do the trick. It is not elegent as I am somewhat of a hack. I have seen other ask for this, so I thought I would post it here. To add the changes find the following code in the product_info.php file: $products_options = tep_db_fetch_array($products_options_query)) Then add the following code which will query the specific attribute that is about to be displayed in the options menu: //START get attribute stock values $attribute_stock_query = tep_db_query("select products_stock_quantity from " . TABLE_PRODUCTS_STOCK . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and products_stock_attributes = '" . (int)$products_options['options_id'] . "-" . (int)$products_options['options_values_id'] . "'"); $attributes_stock = tep_db_fetch_array($attribute_stock_query); $option_stock = $attributes_stock['products_stock_quantity']; //END get attribute stock values Then immediatly following the above code you can do something to either add text to show the item is out of stock, or simply don't display it at all in the menu. To add an out of stock string to the options menu selection, replace the following code: $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); With this code: if ($option_stock == 0) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => 'Out of Stock - ' . $products_options['products_options_values_name']); } else { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); } To skip this item on the menu altogether. Just jump down a few lines in the code to the <tr> statment that does the menu item print out and conditionally skip based on the $options_stock variable like in the if statment above. Warning: I have not yet rolled this into my live store, but it seems to be working on my test site. Hope it helps someone. Oh yeah. I am thinking of creating a separate page that will show the status of all the stock attributes of a particular product. The link would be added to the product_info.php page and allow someone to click and see a one page view of all the available attributes, their stock status, etc... Anyone else that would use this? Or have all moved onto the Master Products contrib :)
  13. coffman

    [Contribution Update] All Prods v2.4

    Just a tip for those of you that may have special characters in your product titles or names. This contrib does not deal at all gracefully with some of them. I have several product titles that contain single quotes and slashes. The links rendered are broken. To fix this you can add something similar to the following hack around line 145: $foo = str_replace("'","_",$this_name); //replace single quotes $tmp_name = str_replace("/","_",$foo); //replace slash Then change the var this_name in the $this_url = statment to the tmp_name variable mentioned above. You can repeat the above as many times as needed. The URL will contain underscores where necessary, but the actual description seen by a surfer should they see the page will look normal. Hope this helps someone.
  14. Jeremy: My Installation.html says I did not copy the files into place, but hand edited my files as I have made quite a few mods I wanted to keep. So you installed all the admin and catalog files? You have added attributes, like color, and left them designated as "Special = NO". Then given the att's values like red, green, blue. Then attached the att's to a product? And the tracking does not work? Do you not get the stock button in the admin/categories.php page? What happens when you call stock.php directly as in: http://your.store.com/admin/stock.php?product_id=24 24 being a number to a valid item in your catalog? In other words. What exactly is not working, and what are you expecting? Don't give up as this contrib is definatly worth it. I won't be able to respond again until tonight, MST that is, as I am off to my real job now :)
  15. Jeremy: I am not an expert, but have gotten this working fine on my store which is running MS2.2. What is not working?