Jump to content

KDM

Members
  • Content count

    127
  • Joined

  • Last visited

Everything posted by KDM

  1. I created this program to help me keep better track of my Sale Specials. I found that the Oscommerce base Specials was limited in applying sales across the various manufacturers, categories and products. ********************************************************************************************************************** This has been tested and is running on: Apache2. linux PHP 5.2.+ MYSL 5.0.+ osCommerce Online Merchant v2.2 RC2a I have a test machine also that is not on the web that runs: Apache2. window PHP 5.2.+ MYSL 5.0.+ osCommerce Online Merchant v2.2 RC2a I have not tested on other osCommerce version at this point. ********************************************************************************************************************** contribution url: Specials Maintenance - Administration (add-on) ********************************************************************************************************************** What this contribution should accomplish: 1) This contribution changes the way in which special pricing is handling by adding two new fields to the specials file: a ) With both a start date and end date you can set up your special to start and end automatically. This is accomplished via the function/special_maintenance.php program these fields are check and updated. b ) The specials_limit_quantity allows you to set how many units of a product can be sold at sale price. An example would be you have 8 units of a product and you want to sell only 3 at the sale price, you would set the specials_limit_quantity to 5. Now the database fields would be compared each time and if the limit is reached before the sale end date the products sale would end and would revert back to it's regular price. At present this will not stop a customer from buying more than allowed if they go over the limit with the one purchase they are making as the special file does not update the status until after the completed purchase. With a future update I will be looking at possibly change the way in which this is handled. 2) filtering products by: a ) manufacturers. b ) category and subcategory or exclude subcategory with checkbox checked. c ) products name. d ) all active products or with include inactive products checkbox checked the inactive products will be included. e ) same as above except exclude specials checkbox checked f ) all active/inactive specials with both checboxes checked, or only active or inactive depending on checkbox checked. 3) sorting by: a ) when all products listed: * product id (default) * product model * product name * product quantity * product price b ) when only active/inactive specials listed: * product id (default) * product model * product name * product quantity * product price * product specials end date * product specials start date * product specials limit quantity sales 4) Allow update of specials by selected criteria above a ) at the global level * update specials sales price: (required except using reset dates button) + the amount can be in currency or in a percentage, which is chosen by the drop down. + this is required to be greater than zero and less the regular price of item or less than 100%. * update start date field: (not required) + if no start date is given than the item will be set to go on sale as soon as it is updated. + if start date is entered which must be entered as MM/DD/YYYY that will be the date for the sale to start. * update end date field: (not required) + if no end date is given than the item will remain on sale until you change the status with the status icon or by entering an end date at which point when the end date comes it will end the sale on the item. + if end date is entered which must be entered as MM/DD/YYYY that will be the date for the sale to end. REMEMBER THAT AT THE GLOBAL LEVEL AS PRODUCTS UNDER THE SELECTION CRITERIA WILL BE UPDATED INCLUDED PRODUCTS ON OTHER PAGES IF THERE IS MORE THAN ONE PAGE!! THOSE PRODUCTS THAT WOULD BE PRICED EQUAL TO OR GREATER THAN REGULAR PRICE WILL NOT BE AFFECTED AS THE PROGRAM ONLY DEALS WITH SPECIAL LOWER PRICES (SALES). b ) at the local (individual) level * update specials sales price: (required) + the amount can be in currency or in a percentage, which is chosen by the drop down. + this is required to be greater than zero and less the regular price of item or less than 100%. * update start date field: (not required) + if no start date is given than the item will be set to go on sale as soon as it is updated. + if start date is entered which must be entered as MM/DD/YYYY that will be the date for the sale to start. * update end date field: (not required) + if no end date is given than the item will remain on sale until you change the status with the status icon or by entering an end date at which point when the end date comes it will end the sale on the item. + if end date is entered which must be entered as MM/DD/YYYY that will be the date for the sale to end. * update specials limit quantity field: (not required) + special limit must be < product limit. 5) Error handling: a ) specials sales price: * price must be greater than 0 < product regular price, percentage must be greater than 0 < 100%. b ) start date field: * must be in correct format and valid date. c ) end date field: * must be in correct format and valid date and greater than (if no start date entered than greater present date else greater than start date). d ) specials limit quantity: * special limit must be < product limit. e ) checkboxes: * Exclude Specials cannot be checked at the same time as Active Specials Only and/or Inactive Specials Only. **********************************************************************************************************************
  2. Check your personal message. I sent you one today concerning these problems.
  3. Hi! This is my busy time of the year as I have been packing and shipping products for the Christmas Season. I've taken a quick look at your problems and this is what I see. The program at this point will test only the sale price against products price, not against the product price plus tax. I will have to look at this more in depth for the changes to be made to take into account the taxes. Not everyone includes their discount with taxes, the taxes are usually added on to the cost. At least that is how it is usually done in the US. The changes I made were for a quick fix in certain situations. Again I will have to look at this more in depth to handle more possibilities for the date format. You can try this and see if changing some code will work for you. In the function gfc_date_format look for $compare_format = array('mm', 'dd', 'yyyy'); function gfc_date_format($date) { $new_array = false; $format_string = explode("/", DOB_FORMAT_STRING); $compare_format = array('mm','dd','yyyy'); $date_array = explode("/", $date); foreach($format_string as $kf=>$vf) { foreach($compare_format as $kc=>$vc) { if($vf == $vc) { $new_array[$k] = $date_array[$kf]; break; } } } return $date = ($new_array) ? implode("/", $new_array) : $date; } Change the 'yyyy' to the value that you need 'jjjj' See if this works. As I look at these things and come up with a solution I will let you know. You can let me know if the above works for you. Thanks
  4. When the limit_quantity field is 0 (which is the default value) then the program does no comparison. Only when there is a value greater than 0 in the limit_quantity field is it used to turn specials off. The end date is the main field that the mod uses to control when a sale ends Try reading the README text file under: What this contribution should accomplish: 1 b Perhaps that will help you to better understand what limit_quantity does. As stated in one of my earlier posts I plan to look at this mod after the first of the year and I appreciate anyone's input or problems as it will help me to improve it for everyone.
  5. This is just something I missed. In admin/specials_maintenance.php around line 27 Replace this line: $products_price = (isset($_GET['price']) && !empty($_GET['price'])) ? intval($_GET['price']):0; With this: $products_price = (isset($_GET['price']) && !empty($_GET['price'])) ? floatval($_GET['price']):0; My date format is set up as "mm/dd/yyyy" so I had not tested this against other date formats. For a temporary fix that should work look in: admin/includes/functions/gfc_general.php Around line 31 replace the function completely. This: function gfc_format_date($date, $time=false) { if($time === false) { if(preg_match('/^([0-9]{1,2})\/([0-9]{1,2})\/([0-9]{4,4})$/',$date)) { list($month, $day, $year) = explode('/', $date); $date = strftime("%Y-%m-%d %H:%M:%S", mktime(00, 00, 00, $month, $day, $year)); } } else { if(preg_match('/^([0-9]{1,2})\/([0-9]{1,2})\/([0-9]{4,4})$/',substr($date, 0, strrpos($date, '/')+5))) { list($month, $day, $year) = explode('/', substr($date, 0, strrpos($date, '/')+5)); list($hours, $minute, $seconds) = explode(':', substr($date, strrpos($date, '/')+5)); $date = strftime("%Y-%m-%d %H:%M:%S", mktime($hours, $minute, $seconds, $month, $day, $year)); } } return $date; } Replace with these two functions: function gfc_date_format($date) { $new_array = false; $format_string = explode("/", DOB_FORMAT_STRING); $compare_format = array('mm','dd','yyyy'); $date_array = explode("/", $date); foreach($format_string as $kf=>$vf) { foreach($compare_format as $kc=>$vc) { if($vf == $vc) { $new_array[$k] = $date_array[$kf]; break; } } } return $date = ($new_array) ? implode("/", $new_array) : $date; } function gfc_format_date($date, $time=false) { $date = gfc_date_format($date); if($time === false) { if(preg_match('/^([0-9]{1,2})\/([0-9]{1,2})\/([0-9]{4,4})$/',$date)) { list($month, $day, $year) = explode('/', $date); $date = strftime("%Y-%m-%d %H:%M:%S", mktime(00, 00, 00, $month, $day, $year)); } } else { if(preg_match('/^([0-9]{1,2})\/([0-9]{1,2})\/([0-9]{4,4})$/',substr($date, 0, strrpos($date, '/')+5))) { list($month, $day, $year) = explode('/', substr($date, 0, strrpos($date, '/')+5)); list($hours, $minute, $seconds) = explode(':', substr($date, strrpos($date, '/')+5)); $date = strftime("%Y-%m-%d %H:%M:%S", mktime($hours, $minute, $seconds, $month, $day, $year)); } } return $date; } You're the second one with this problem and can be solved by replacing this function: In admin/specials_maintenance.php around line 499 find; function specials_check_quantity($qty, $specials_qty) { if($specials_qty < $qty) return true; return false; } Replace with this code: function specials_check_quantity($qty, $specials_qty) { /* remove logic for check of quantity if($specials_qty < $qty) return true; return false; */ return true; } I use this on my website and so far it has worked smoothly for me. Of course other users can have a different set up then me and may run into some problems. Just let me know as I do want this to work for most cases. I will be revisiting this program some time after the first of the year. In the meantime let me know if you have problems.
  6. Hi Jasper, Sorry it took so long to reply. I've had personal business to take care of lately. The problem with turning off the product quantity check is there will be no way to track the number of products sold at the special price. I suggest you add a quantity into your products_quantity field for those products you want to put on special. Oscommerce will subtract the quantity from the product if have set the system to subtract the quantity. Go to: Configuration-Stock-Subtract stock and set it to true. This will allow the Specials Maintenance system to track the sales of products sold at the special price quantity goal. This should not affect your regular sales as it is the "Allow Checkout" configuration that affect sales being allowed. Keep in mind that my system is not set to stop at the exact special quantity during the checkout process. Read the "READ ME" file number 1-b under "What this contribution should accomplish:" to understand how the specials quantity works. I will revisit this situation when I start work on my next update to Specials Maintenance.
  7. KDM

    Handling Fee for USPS

    Simple question. You did set the handling fee in admin? If you did then this is where the handling fee is processed in usps.php if (($method == '' && in_array($type, $this->types)) || $method == $type) { if (strpos($type, "Flat Rate")) $type_flat = $type . ', subject to verification'; else $type_flat = $type; $methods[] = array('id' => $type, 'title' => $type_flat, 'cost' => ($cost + MODULE_SHIPPING_USPS_HANDLING) * $shipping_num_boxes); } } If your fee is set and the line with "MODULE_SHIPPING_USPS_HANDLING" has not been modified then it should work. NOTE: Above is set to not adding a handling fee to a flat rate shipping fee. If you want to charge a handling fee for that service than some additional coding would need to be done.
  8. KDM

    table rate by weight question

    The logic looks good in program. You haven't changed anything in the program? You do have the table mode set to "weight"? You weights are set in products file "products_weight"? I know those are simple and small things but sometimes it's the small things we overlook.
  9. Check this out: str_replace
  10. KDM

    Languages and Zones

    There are no zones for Australia in the original Oscommerce database so they need to be added. REMEMBER TO BACKUP YOUR DATABASE BEFORE MAKING ANY CHANGES In phpmyadmin run this query to add zones to the zone file INSERT INTO `zones` (`zone_country_id`, `zone_code`, `zone_name`) VALUES (13, 'ACT', 'Australian Capital Territory'), (13, 'NSW', 'New South Wales'), (13, 'NT', 'Northern Territory'), (13, 'QLD', 'Queensland'), (13, 'SA', 'South Australia'), (13, 'TAS', 'Tasmania'), (13, 'VIC', 'Victoria'), (13, 'WA', 'Western Australia'); If these are not correct in spelling make whatever changes are needed keeping the same format. You can also add others before running your query if needed. Your countries_id is '13' so keep that consistent as it will not show in your zone drop down if it is anything different. Good luck
  11. KDM

    USPS ?

    It's always important to make note of a version of an add-on because people are always updating the add-ons. At some point it can becomes really hard to know which version you installed. You can check inside the 'readme' text file or 'changes' text file to see what they have listed as the last version change. Plus since nothing has been changed in your website it is possible that changes have been made by USPS on their end that affects your program. Look at the different USPS forums concerning that possibility. Wish I could be more help. This is main reason I stay away from contributions that a third party (UPS, USPS, etc.) can make changes that creates a rush to changes while losing business. Good luck.
  12. KDM

    application-top.php issue

    You talk about this being a great add-on but which add-on is that? I checked your store and you have an error message that reveals your path. That is never good. The error mentions ultimate_seo_urls5. If that is the add-on you are talking about you should take this to that contribution forum. The link below will take you there. FWR is great at responding to questions about his contributions. ULTIMATE Seo Urls 5 - by FWR Media Seo Urls new development - PHP 5 only
  13. KDM

    USPS ?

    Unless someone has had this particular error no one will know much about it. Give us more information. What version Osc? What add-on if any and if an add-on what version is the add-on? Base information like that will help us to help you.
  14. KDM

    countries or state errors?

    In both 2.2a and 2.3.1 Osc the primary is countries_id as it should be because most of the time the file is accessed by the id. And the countries_name is a secondary key. So unless you have made a change to your countries file it should look like this: drop table if exists countries; create table countries ( countries_id int(11) not null auto_increment, countries_name varchar(255) not null , countries_iso_code_2 char(2) not null , countries_iso_code_3 char(3) not null , address_format_id int(11) not null , PRIMARY KEY (countries_id), KEY IDX_COUNTRIES_NAME (countries_name) ); Above is 2.3.1 database. The only difference between this and 2.2a is countries_name is varchar(64). I'm don't think you need countries_id as your key field as it is already set as primary. Above when you say "key name" are you talking about countries_name or "name"? This is a bit confusing. I would still go with what I said above with the exception that I would not do a truncate but just run the "drop table if exists countries; create table countries ( etc" before restoring the countries file, this will in effect set your countries file keys and such to the original. Again if you have some contribution that depends on some change to the countries file you will have trouble with that contribution. This is pretty much my best suggestion as the information given is very limited. REMEMBER TO ALWAYS BACKUP YOUR DATABASE BEFORE YOU MAKE ANY CHANGES TO IT.
  15. KDM

    Deliver Status Update

    How do you receive your tracking information from UPS now?
  16. KDM

    Deliver Status Update

    Have you looked in admin - customers - orders? There you can click on the edit button for each customer. On that page is a drop down list to select a status to update the order. If you want you can implement that logic into your process you have created.
  17. KDM

    countries or state errors?

    As long as you have not added any new contributions or changed any customer edit files. Then it sounds like your counties database file is the problem. I'd just clear out the countries file using phpmyadmin with: truncate table "countries" Then copy from your last good backup the countries file insert statement into phpmyadmin. Hopefully that will clear up the problem. If your countries file is messed up then without a countries id you wouldn't be able to get the correct state from the zone file. REMEMBER TO ALWAYS BACKUP YOUR DATABASE BEFORE YOU MAKE ANY CHANGES TO IT.
  18. Check this: "Cannot redeclare ..." The definitive help
  19. KDM

    USPS Module won't uninstall

    It's looking for a function that I'm guessing came with the USPS add-on. The call for that function is either in modules.php in which case it was added to modules.php or if you can not find "tep_cfg_multiinput_list" in modules.php then it is your configuration file of your database. If that is the case then it was put there by the USPS contribution. Use phpMyAdmin or a program like it and do a query looking in the configuration file for it. The query below should work: SELECT * FROM `configuration` WHERE `set_function` LIKE '$multiinput_%' OR `use_function` LIKE '%multiinput_%' It should be in one of those two fields that is why we look there. Once you find it you need to get rid of it. I'd delete the record not clear out the field. ALWAYS ALWAYS BACKUP ANYTIME YOU CHANGE ANY FILE OR DATABASE. That will give you a restore point if you need it. Good Luck. PS. Those types of functions usually exist in either general.php or html_output.php in your functions folder.
  20. I uploaded the latest version once again with the correction made to the install instruction that would affect the error handling. You can download that or just copy the code below and and put in the correct place. In catalog/admin/includes/application_top.php FIND; // initialize the message stack for output messages require(DIR_WS_CLASSES . 'message_stack.php'); REPLACE WITH: // override the admin message stack to use the store message stack if(false !== strpos($PHP_SELF, FILENAME_SPECIALS_MAINTENANCE)) { require(DIR_FS_CATALOG . DIR_WS_CLASSES . 'boxes.php'); require(DIR_FS_CATALOG . DIR_WS_CLASSES . 'message_stack.php'); } else { // initialize the message stack for output messages require(DIR_WS_CLASSES . 'message_stack.php'); } Thanks to Steve S. for pointing this out. Specials Maintenance - Administration v1.1
  21. Hi Steve, Thanks for noticing. I actually have it correct in the application_top.php that comes with the down load but will have correct the install instructions. Kerry
  22. I have just added a new upload with a few fixes; A ) catalog/admin/specials_maintenance.php 1 ) When removing single product from specials file the error message was not complete. Fixed. 2 ) On occasions there was a '/' after list. The program ended abruptly. Fixed 3 ) Need to pass a return array variable with tep_checkdate. Fixed. Full Package This should work with Oscommerce version2.3.1. If you install into 2.3.1 and have problems let me know. I will be testing it soon and will update more on whether it will work with 2.3.1 Specials Maintenance - Administration
  23. The special price that you set will be reflected thought out the shopping cart. Check out the specials on this site: Specials Administration (store side) No, the specials_limit_quantity field will limit only that sale item to the set number to be sold at that specials price. Keep in mind 2 things when you set a limit quantity to sale. a )The total number of items to sell at sell will be the difference between your total number of that item in stock minus the specials_limit_quantity you set: EXAMPLE: 8 units of a product and you want to sell only 3 at the sale price, you would set the specials_limit_quantity to 5! 8-5=3 b ) At the moment there is no stopping anyone from buying all of a specials item at once even when you have set a specials_limit_quantity. But as in the example above if that individual brought more than 3 but less than 8 than at that point the system would automatically take the product off the specials price. At that point they would only be able to buy the rest of that product at full price. You have a start date and an end date that you can set. If no start date then it goes on sale immediately else it will start at the first second of the start date that you have set. If no end date then the sale goes until you end it else it will end at the first second of the end date that you have set. You can always go into "Specials Administration" and enable or disable the sale item at any time.
  24. KDM

    No Shipping Modules Show

    You did not state it but I assume you are talking about the zone rates shipping module. I just installed a clean 2.2rc2a on my machine created an account, enabled zone rate shipping with 3 zone rates. With a two character ISO country code in the field I showed on check out both the flat rate (I did not disable it) and also the zone rate for the shipping options. If I just used just two character ISO state code I got no zone rate shipping on check out. You said you used countries if so tell me which ones you used and I will check and see if there is a problem for me. Now my zone rate shipping mod has not been altered other than changing the number of zones from 1 to 3. If you have changed anything other than number of zones on yours than this I probably will not get the same results as you. I actually modified this mod for my own use before so I am familiar with it. Used it about 1 and half years. I'm using something else now. Good luck and let me know if I can help!
  25. KDM

    Fedex Real Time Quotes

    I don't use the contribution but looking at the download that I see a file "fedex1.sql.php" sitting right outside of the catalog. Without reading the installation instruction myself I would bet that you need to run that program and it will update your data with the necessary field(s) needed. Read the instructions again and if that program is not there perhaps you need to download another version of the contribution to obtain that program.
×