Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

MrPhil

Members
  • Posts

    8,167
  • Joined

  • Last visited

  • Days Won

    112

Everything posted by MrPhil

  1. The value for "limit" should be a number greater than 0 (it's the number of rows to grab). This error must be the result of a code change (custom code or add-on installation), as I can't find any "limit" in the admin side that has one value and isn't a hardcoded number. I would look through your code for "limit " in queries and see if anything is other than a hardcoded number. For defined values such as MAX_PRODUCTS_TO_DISPLAY (etc.) check their definition to see if someone changed them from a number to "false". Some of these defined values may be in the database "configuration" table, rather than in a PHP file.
  2. Yes, it would be quite complex. You could take a rough swag at which box to use by adding up the volumes of the items and the ordered dimensions (largest-to-smallest) of each item, compared to the box dimensions. That would give you a minimum box size, but it's far harder to determine if that box is sufficient. For that, you need to try all sorts of (reasonable) packing orders and orientations. I'm sure it's been done by someone -- have you tried googling for shipping packing order and similar? Don't forget to allow some extra room for padding around fragile items, putting delicate items on top, and avoiding items next to each other that could damage each other. Let's not even think about irregularly shaped objects (anything other than a rectangular volume). Watch the weight limit on the box itself (you don't want the box to fail in transit), and allow some space under the top so that when someone slices open the tape with a boxcutter knife, it doesn't nick the merchandise. Have fun!
  3. You're still getting the "select 0 SELECT ..." error? I dunno. About all I can think of at this point is that you're pulling in the wrong "include" branch -- the "catalog" side rather than the "admin" side. What PHP version? Do you have an "include_path" setting in your php.ini that specifies your store root (e.g., ..../catalog)? If so, that might be picking up the includes/... rather than admin/includes/... You could check this by explicitly adding admin/ to the "require" or "include" paths: require('admin/includes/application_top.php'); etc. and see if the behavior changes. If it then works, that was the problem. If no difference, at this point I have no idea.
  4. At 50, <tr> does not have width= attributes. A row is always 100% of the table width. At 310, you have an empty and unclosed <tr> and a <tr> in the next line. All you have to do is carefully follow the validator's instructions and clean up your very messy code. Removing line 310 (empty, unclosed tr) ought to fix many of the errors.
  5. You can start by removing the self-closing / (as in />) from tags which shouldn't have it, such as <html>. That should start to clear up a lot of your errors. <html> has its own explicit close tag </html> way down at the other end of the page.
  6. You have to look at the page in Preview, and manually hit the Enter key where you want a "hard carriage return" inserted, so that it doesn't extend beyond the box. My point about splitPageResults is that I think you're calling it wrong. If this is the catalog version of the class you're using, the SQL query needs to be first. If you're using the admin version, I think it's correct. Make sure of which one you're using -- they have the same name, but different calls!
  7. Are you still getting the "select 0 SELECT..." error, or is it something else now? I can't read your code listing... please "Preview" it and "wrap" long lines like your query statements (insert hard carriage returns) so I don't have to scroll way down to the bottom of the listing, scroll right, scroll the page back up, and try to figure out which line I should be looking at. I just keep losing my position in a long code listing (spanning several screens). Are you using the split_page_results() constructor correctly? The definition for it is function splitPageResults($query, $max_rows, $count_key = '*', $page_holder = 'page') { where the query string comes first (you have a page number?). That might account for the "select 0".
  8. PHPlist wants its address lists in a comma-separated-variables (CSV) file. You'll have to find a way to export your email list to such a file. As a manual operation, I'm pretty sure that phpMyAdmin can do it, but to automate it you could write a PHP script (to run just before the newsletter is to be sent) that reads the database and spits out the CSV file with the pertinent information. It might even exclude some addresses based on various criteria (note that PHPlist can also exclude some addresses based on other fields in the list). I have no idea what the Simple Visitor Newsletter address list looks like, or whether it's stored in the database or generated on the fly.
  9. http://www.oscommerce.com/forums/topic/350012-error-in-all-page-submits/page__gopid__1467801entry1467801 Your english.php file at or near line 337 is outputting text to the browser. As that's the end of the file, most likely you have a blank or two after the closing ?>. Clean up the file.
  10. You must have missed a step somewhere. Assuming the file isn't named FILENAME_comparemyprice, you need to define that macro (name) somewhere (includes/filenames.php?): define('FILENAME_comparemyprice','comparemyprice.php'); or whatever the actual name is. Is there a file includes/modules/comparemyprice.php or something similar?
  11. Unfortunately, each page has its <meta> tags hardcoded. For each page where you want this new tag, you'll have to manually add the code in the <head> section of that page. Maybe there's an add-on to insert a new <meta> tag more easily? To do it manually, in /index.php, look for <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> and insert your BING <meta> tag right after it. Repeat for any other PHP files you need it in. Look at http://addons.oscommerce.com/info/5497 , but it appears that most of the "meta tag" contributions (add-ons) are oriented towards general SEO. I took a quick look, but didn't see anything else that sounded like a general meta tag inserter.
  12. Your SQL query was select 0 SELECT ci.... Where did that "select 0" come from? Was there some other piece of code trying to build a query, starting with "select $value"? Is $referrals_query_raw what's fed to mysql_query(), or is there further processing that adds more stuff? Sorry to not get back to you before, but today is the first time that the forum has let me see your replies!
  13. I'd be concerned about trying to use file names such as "Diapason actie 10 + 1 gratis.jpg". Even if you're on a Windows server, where blanks may be allowed, the Web doesn't particularly like blanks and special characters in names. Do you have any control over the names? If you do, remove '+' or change it to 'plus', and change blanks to underscores: "Diapason_actie_10_plus_1_gratis.jpg". A browser sending this name back to the server is less likely to have problems.
  14. I don't know this particular contrib (add-on), but you could certainly do something about it, if the author won't respond to your question. You could temporarily re-enable register global variables, if your host will let you. If it functions properly then, you know that's the problem. Even if you can't try that, you can look through the contrib's code and see if there are any variables that just seem to be expected to appear "out of nowhere". You need to find all such variables (anything not explicitly initialized before being used, is suspect) and ahead of their first use, define them: $varname = $_REQUEST['varname']; That should fix it. There are other PHP 5.x problems that you might hit. If this contrib doesn't use the "compatibility layer" to define "long array names" (e.g., $HTTP_POST_VARS), code might break. If you run at PHP 5.3+, you'll get lots of warnings about "deprecated functions". And finally, if you're going from MySQL 4 to 5 at the same time, you need to fix the LEFT JOIN problem.
  15. In your browser, View > Page source and see where it is looking for the images. Maybe the database still has an old domain name or URL? Are you producing images on-the-fly, or just showing canned images? If on-the-fly, are you missing any PHP libraries, such as GD, used to manipulate images? You've got to do some detective work here. Are you getting any errors logged anywhere on your site? Do you have "hotlink protection" enabled and your site isn't in the whitelist of allowed sites? Were image names changed while going from one server to another? E.g., underscores became hyphens, or everything folded to lower case? Was your previous server on Windows and your new one Linux, and you never bothered to consistently capitalize names, such that a file is "Product_1234.jpg" and the reference in the database is "product_1234.jpg"? Lots of things could have happened, and you've given us no information to work with.
  16. Your next step is to ask your hosting service for specific instructions on how to enable register global variables. There might be other steps needed besides making a php.ini file.
  17. You are running an ancient version of osC that requires that "register global variables" be enabled (on) in order to function. Your host has upgraded PHP to a new version, or at least, disabled register global variables because they are a security problem. Hopefully they will allow you to re-enable register global variables for your site. Usually this involves editing (or creating) a file /php.ini with the contents register_globals = on Other things may have to be done, depending on the specifics of how your server is set up (such as if it's running suPHP). The best long term solution is to upgrade to the current osC, version 2.2 RC2a. It does not require register global variables to be on. If your host will not allow you to enable register global variables, you will have to do this.
  18. Next time please use the code tag, so lines aren't wrapped and indentation isn't destroyed. "Unexpected end" usually means that you're missing a closing brace: } somewhere, and PHP thinks it's still in the middle of a compound statement { ... } when it hits the end of the file. This looks suspicious: <?php }//Options as Images.Add the curly bracket as shown on the next line} ?> Try changing it to <?php }//Options as Images.Add the curly bracket as shown on the next line } ?>
  19. All I can figure is that there is no customers_info_date_account_created field in table customers_info. Check that -- a missing field would probably mean that the alias (date_account_created) wouldn't be created, leading to the error.
  20. Your variable $date_range_query is improperly constructed. It is 'and date_account_created>=..., leading to a bad SQL query ...WHERE and date... . You want to put that leading 'and' on it only if there is already something in the clause: $date_range_query = ''; if (isset($_GET['date_from']) && $date_from=fmt_date($_GET['date_from'])) { if (strlen($date_range_query) > 0) $date_range_query .= 'and '; $date_range_query .= "date_account_created>='$date_from' "; } ... etc. ...
  21. While waiting for the author to get back to you, look at -- 500 error causes http://www.oscommerce.com/forums/topic/345637-internal-server-error/page__view__findpost__p__1442374 Maybe you'll find why your restored files are broken (did you remove the add-on, or did you restore the full files?). You don't have your own "error handler"/"error document"/"error page" files defined, and the system is using the default handlers when you get, say, a 404 error (/catalog/ not found). Then it throws a 404 that it couldn't find the 404 handler! Not critical, but if you'd like to get rid of these extra 404 messages, define your own error handlers. To minimize the number of unnecessary error messages cluttering up your account log, you should supply a set of Error Pages for your account: /400.shtml, /401.shtml, /403.shtml, /404.shtml, and /500.shtml at a minimum, along with a /robots.txt (requested by every search bot) and a /favicon.ico (requested by every browser). If you have cPanel, it has a button to produce the *.shtml Error Pages ("Error pages") -- you can customize them all you want with additional HTML code. /robots.txt can be empty until you figure out what you want to put in it. Any "paint" program can produce a favicon for you (16x16 ICON format). Having these seven files will greatly reduce the clutter in your system error log, enabling you to see real errors that you need to address.
  22. Checklist: http://www.oscommerce.com/forums/topic/345637-internal-server-error/page__view__findpost__p__1442374
  23. I guess you're between the proverbial rock and hard place. Can you get him to at least sign a legal contract that he holds you harmless if his customers or bank come after him for damages due to insecure or fraudulent credit card handling? You warn him in writing that you understand that what he's doing is improper and he takes all responsibility for it. Before springing that on him, express your concern and get him to tell you exactly what's he doing to handle credit cards now. Maybe you misunderstood him? Maybe he doesn't realize he's violating his merchant account agreement? You've got something on him if he refuses to sign, or holds back payment -- you can go to his bank and rat on him. That's the Nuclear Option, but it's possible. I am not a lawyer, so I can't advise you on any specific steps. Just make sure you have some leverage so you can get paid for what work you've done, but don't get yourself in trouble for failing to uphold your end of the contract (refuse to finish the job). Your personal safety has to be considered, too. I suppose you could just keep quiet, do the work he asks for (and get paid), wash your hands of this client, cross your fingers and hope that nothing bad happens to you, and feign ignorance if his bank comes after you. Like I said, you're in an unenviable position. At least with another client, you'll have some knowledge about problem areas. I tried going to the safe2pay.net site, and can't get in to see what it's about. That doesn't give me the warm fuzzies. There are a number of sites which claim to use "Safe2Pay", but they don't say if it's .net or something else.
  24. Your friend is probably going to be in BIG, BIG trouble with his bank when they discover what he's doing. Most merchant accounts issued for brick-and-mortar stores are not supposed to be used for eCommerce (much higher fraud rate is reflected in higher charges). I don't understand his assertion that he pays no fees to process credit cards -- if he has some sort of merchant account, he must be paying fees for it somewhere! Maybe the fees are buried in other charges, or lack of interest on the balance, or are a flat fee for a low-volume operation, but they're in there somewhere. osC comes with a generic credit card module, but the common advice is not to use it -- its security is very poor, and the site will fail any PCI audit. If you want to use a payment gateway and merchant account, you should use a proper one associated with a specific vendor, and follow all the rules. Or, he can use a third-party payment system such as PayPal to handle credit cards, without all the PCI and security hassle. You are putting yourself at financial risk if you implement an insecure payment system for your friend. Defrauded customers, his bank, or he himself could come after you with a lawsuit (that you failed to inform him of the risk, yadda, yadda, yadda). My suggestion would be to steer clear of any such shortcuts. I've never heard of a legitimate outfit that processes credit card transactions for free!
  25. Maybe you've just been looking for the wrong keywords. "Digital Downloads" are already built into osC. You need to enable them, and do some other stuff in setup. When an order is placed, you have to manually OK it (that payment has been booked) before the link will be sent to the customer.
×
×
  • Create New...