Jump to content


  • Content count

  • Joined

  • Last visited

Posts posted by KDM

  1. 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.


    1. Let's say, my price w/tax is 68.50 and I want to make my sale price w/tax 60.00. I get the error: Sale Price 60 must be less than Product Price 56.6116.


    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.


    2. In the date sections, I see this: dd/mm/jjjj, this is dutch (not dd/mm/yyyy and not mm/dd/yyyy). If I fill out a date, say 31/12/2011, even after above changes, I get the error: Invalid End Date: 31/12/2011!!


    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];
    	   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.


  2. Very nice contribution! I have only one question. If I set "limit quantity" = 0 then the program will stop sale when article runs out right?


    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.

  3. Great contrib ... but


    1. My store uses decimal prices so, if I put the special price, let's say 2,67 and the product price is 2,99 I receive the fallowing error:

    Sale Price 2 must be less than Product Price 2. The only way to make this work is to put a procentage instead. But if I want to modify something to that special product I receive again the same message. If I don't modify anything then works.


    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;




    2. I use the date format like: dd/mm/yyyy. This format is set up in admin and catalog site so it works. But even if specials_maintenance.php display this format (dd/mm/yyyy) in Start date and End date column when I enter some values the following error is displayed:

    End Date: 07/11/2011 must be greater than Start Date: 31/10/2011!! (I'm sure that the end date is greater than start date


    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:



    Around line 31 replace the function completely.



    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];
       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;



    Also, the problem with "Special Product Limit quantity 0 must be less than Product quantity 0!!" force an admin who doesn't use stock in his shop to go every time to the product page to update the product stock before he can make it special. This is taking some extra time and in my opinion is not good...


    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;



    Waiting for an update ... the idea is great but still need some work


    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.

  4. Hello,


    I use specials maintance for the first time now but when adding a product is says "Special Product Limit quantity 0 must be less than Product quantity 0!!"

    I dont use the quantity in OSCommerce but how can i turn off checking for it?

    It would be nice to sell a product only say 5 times for special price and then the normal price.

    That way i can say "For first 5 costumers jus 75€ instead of 99€" but i can't use the product quantity in oscommerce because not all is in stock and special orderd stuff..


    Can jou help?




    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.

  5. I know this is an OLD post, but I'm having the same issue...anyone got an idea, or know what may be causing the issue?


    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.

  6. 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.

  7. There are no zones for Australia in the original Oscommerce database so they need to be added.





    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

  8. 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.

  9. 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

  10. 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.

  11. 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).



    Primary has the countries_id set as it's field and key name countries_id also has countries_id for it's field


    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.



  12. 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.

  13. 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.



  14. Hello folks i have a test site i use to get the code right, before adding to the main page. i have a fresh install of 2.3.1 and i get this mesg


    Fatal error: Cannot redeclare class language in /usr/local/4admin/apache/vhosts/xxxlatindivas.com/addon/3g4ginternet.com/includes/classes/language.php on line 16.


    i have delete the data base and reinstalled it twice but i still get this mesg any ideas?


    Thanks for your help im just trying to get a additional box to put some text in.



    P.S im using this download (29 Jan 2011)


    Check this:


    "Cannot redeclare ..." The definitive help

  15. Fatal error: Call to undefined function tep_cfg_multiinput_list() in /home/shoppes/public_html/admin/modules.php(212) : eval()'d code on line 1.


    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.



    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.

  16. 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


    // initialize the message stack for output messages
    require(DIR_WS_CLASSES . 'message_stack.php');



    // 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

  17. 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

  18. Will the product(s) I put on special price be added to the "Specials" base in the shopping cart?


    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)


    Do I have to set a specified number of items to put on special


    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.



    or can it be just for a specified time period?


    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.

  19. Hi all,


    None of my shipping modules are showing on the checkout_shipping page although I have zones, tax classes and rates all defined. I'm on2.2RC2a, php 5. I defined zones as Zone 1, Zone 2, etc and all countries are in each appropriate zone (not double) and no countries left out. My checkout_shipping page is unmodified, so no conflicts, but the customer recieves the "This is the only method...) with nothing showing and no continue button. If I disactivate the module I have the normal page but of course no shipping and the next pages including payment work perfectly. Just NO shipping.


    There is no whitespace in the files either.


    Where have I gone wrong????




    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!

  20. Hello everyone!


    I just installed the add-on : http://addons.oscommerce.com/info/1462 "Fedex Real Time Quotes"


    I have update all the required information in the module. I'm getting a SQL error:


    1054 - Unknown column 'products_ship_sep' in 'where clause'

    select products_id, products_price, products_tax_class_id, products_weight from products where products_id = '49' and products_ship_sep = '0'

    [TEP STOP]


    It can't find a column in the database. The install i downloaded didn't come with a .sql file for updating the database.


    Any help is greatly appreciated!




    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.