Jump to content

coffman

Members
  • Content count

    73
  • Joined

  • Last visited

Everything posted by coffman

  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?
  16. I don't know why you are getting the error, but I do know it is possible to get it working. I have it working. It took a bit of time to get it into my customized site, but it was well worth it.. As for your error, I can't find the function tep_get_categories_name anywhere in my tree and I have QTPro up and running. Do you have other modules installed? Could you have introduced a syntax error when installing QTPro?
  17. OK. One more small issue. After entering the stock.php page to update stock, there are 2 links at the bottom of the page. The one on the right is titled "Back to Low Stock Report for Attributes". The link for this is defined as FILENAME_STATS_LOW_STOCK_ATTRIB. Where is this supposed to be defined and what should it be pointing to? I find no other reference to it in the code :huh: Thanks
  18. I believe I have this contrib mostly working although it was anything but a slamdunk. The one problem I have found is when deleting an order. When return to stock is selected, it does not return attribute stocked items. I looked back through several revs of the contrib and it does not appear that this has ever worked as the admin/includes/functions/general.php file has never been part of the contrib. The remove order code is actually in the function tep_remove_order. I believe most of the code needed is already written and in the admin/stock.php file, but it will take me many days if not weeks to figure out what is needed and how to implement it :( Any clues or pointers would be greatly appreciated.
  19. Tony, To get the manufactures name you have to do a second query as the product_info page does not include the $HTTP_GET_VARS['manufacturers_id'] value. I wanted to do the same thing and have added the following: $the_manufacturer_query = tep_db_query("select m.manufacturers_id, m.manufacturers_name from " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on (m.manufacturers_id = mi.manufacturers_id and mi.languages_id = '" . (int)$languages_id . "'), " . TABLE_PRODUCTS . " p where p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and p.manufacturers_id = m.manufacturers_id"); $the_manufacturers = tep_db_fetch_array($manufacturer_query); to the product_info.php section of the header_tags.php file. It seems to work fine for me.. Good Luck..
  20. coffman

    Purchase Without Account

    I am answering one of my own questions: If the user bails out mid stream in the checkout for some reason. You are left with the db entry. When I did this , I went back to the top page, and it appeared as if I was logged in as the temp account I was using :( I don't think I like this very much. I think I will back out this contribution.... Thanks for the help....
  21. coffman

    Purchase Without Account

    There were also missing <?pp tags at the begining of Order_Info_Process.php and checkout_process.php. After fixing this, it seems to be working. The checkout flows through. The temp account gets deleted. etc.. - What happens to the temp database entry if the user just bails out?? - How hard is it to put the boxes side by side? And in what file do I make the changes? Thanks for the help and the contribution..
  22. coffman

    Purchase Without Account

    I downloaded and installed. You need to add <?php to the top of Order_Info.php :) Still get the same results. I fill out the customer info form and click on checkout. Then I get an empty: Order_Info_Process.php. How do I go about debugging this? I am thinking I should put some php in the top of Order_Info_Process.php to write some output to file and see what is getting passed. Input??? Would should I be looking for? BTW: Not to used to php yet. Lots of experience in perl... Also. I liked the side by side boxes better... Thanks..
  23. coffman

    Purchase Without Account

    I "think" I followed all the directions, but it does not seem to work. I get to the Order_Info.php page, enter info and click on the continue button. I immediatly get an error indicator on the bottom left of my browser as if something can't be parsed correctly then it proceeds to Order_Info_Process.php and the browser window is blank? Any pointers on where to begin trouble shooting. I am using 2.2-MS2. I downloaded and installed : Purchase-without-account-v.0.59.zip BTW: Readme.txt lists /catalog/includes/modules/languages/english/login.php which does not exist in the zip file. PWA_Face_Lift_1.1.zip Latest - Order_Info_Process.php
  24. coffman

    USPSMethods

    I found the answer in a thread under general titled: weights less than 1 lb? This is setup using the admin in Configuration->Shipping and Packaging. The default "tara weight" is set to 3 which explains why everything had 3lbs added to it. I still need to tweak this to figure it out what will work best for me.
  25. coffman

    USPSMethods

    Thanks to this thread, I have gotten the USPS module to work, sort of, with 2.2MS2. I am now having a problem with how it seems to be calculating the weight. 3lbs seems to be getting added to the weight of my products. When I set the product weight to 0.20, the shipping weight is 3.2lbs. When I set the product weight to 1.0, the shipping weight is 4lbs. I tried looking at the code and don't understand where this is coming from. Any help would be greatly appreciated.. Thanks.
×