Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Claud2010

Pioneers
  • Posts

    3
  • Joined

  • Last visited

Profile Information

  • Real Name
    Claudius

Claud2010's Achievements

  1. Yes, the exact files were copied to both servers. So the line breaks are not being the problem. I had also contacted the developer of this Contrib and he was able to clarify the problem: "MySQL 4.0.25 doesn't support subqueries. I recommend you to downgrade to version 2.4." So the problem is actually due to an older version of MySQL on that server. Guess I will have to ask my hoster if he can move my domain to another server that has MySQL 4.1.22 installed as well. That should resolve the problem.
  2. Hi community, thank you for your so far posted answers. Yes, the <br><br> loooks strange to me as well and actually I don´t have any idea where it comes from ... but I doubt that this is the source of the problem. The reason for the error must actually lie in a difference between MySQL 4.0.25 and MySQL 4.1.22, because the same code (actually the same files) work properly perfect on my server with MySQL 4.1.22, whereas there must be something in this code which is being rejected by MySQL 4.0.25. Any idea what this could be or how to adapt the code above to MySQL 4.0.25 ? Thanks in advance Claud
  3. Dear osCommerce Community frst of all I have to say that this is really a great contribution. I am using it on two different osCommerce installations and it is working great. On one of my osCmmerce webistes I have installed this Contrib with version 2.5 - and it is simply working perfectly there. The server for this page uses PHP 4.4.9 and MySQL 4.1.22 On my other osCmmerce webiste (which uses MySQL 4.0.25), I have discovered a problem with version 2.5 of this Contrib though - propably due to the MYSQL version on this server, which I unfortunately can´t change though, as the domain is hosted on a shared server and the hosting company won´t do any changes to it. I have been able to install the updates of the "Discount Codes" Contrib up to version 2.4 ... and it works properly up to that version ... but when I do the update towards version 2.5, there occurs a TEP STOP erroe in the checkout_confirmation.php and the customers can´t complete their order. As version 2.5 includes some nice features such as unlimited usages of discount codes by a customer or including the discount code to the order info, I would like to get version 2.5 running on that server as well. The TEP STOP error I receive in the checkout_confirmation.php with version 2.5 contains the following error message: 1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select count(*) as total from discount_codes dc, customers_to_d<br><br>select if(number_of_use = 0, 1, if(a.total < number_of_use, 1, 0)) as result from discount_codes, (select count(*) as total from discount_codes dc, customers_to_discount_codes c2dc where dc.discount_codes_id = c2dc.discount_codes_id and dc.discount_codes = 'e2745e1c' and c2dc.customers_id = '1247') as a where discount_codes = 'e2745e1c' limit 1 I have sourced the reason for this error down to the ot_discount.php file in the folder catalog > includes > modules > order_total.php The PHP code which causes this error must be somewhere in line 33: $check_query = tep_db_query(sprintf("select if(number_of_use = 0, 1, if(a.total < number_of_use, 1, 0)) as result from %s, (select count(*) as total from %s dc, %s c2dc where dc.discount_codes_id = c2dc.discount_codes_id and dc.discount_codes = '%s' and c2dc.customers_id = '%s') as a where discount_codes = '%s' limit 1", TABLE_DISCOUNT_CODES, TABLE_DISCOUNT_CODES, TABLE_CUSTOMERS_TO_DISCOUNT_CODES, tep_db_input($sess_discount_code), (int)$customer_id, tep_db_input($sess_discount_code))); I have tried to resolve this by myself for about nearly two days now - but as I am not being very skilled in PHP and MYSQL I just don´t find a way to resolve this error. Does anyone have an idea what I would need to do or change in the code above in order to get rid of the error message and make this Contrib to work perfectly in version 2.5 as well on my server? Any hints are being much appreciated. Thanks in advance, Claud
×
×
  • Create New...