Jump to content

ecartz

♥Ambassador
  • Content count

    2,139
  • Joined

  • Last visited

  • Days Won

    6

ecartz last won the day on November 16

ecartz had the most liked content!

7 Followers

Profile Information

Recent Profile Visitors

38,716 profile views
  1. ecartz

    Unique orders status id.

    tep_db_query("INSERT INTO orders_status (orders_status_id, language_id, orders_status_name ) SELECT MAX(orders_status_id) + 1, '1', 'Waiting for payment' FROM orders_status"); I believe that works. Test of course. First by running just the select in phpMyAdmin or similar and then try to write with it if the results are what you expect.
  2. ecartz

    How do I reset a forgotten admin password?

    Are you using the htpasswd? You might need to move the .htaccess and .htpasswd_oscommerce files out of the admin directory (move them rather than deleting them in case you need to move them back).
  3. Does adding a define('META_SEO_TITLE', 'Our GTCs'); help? May require ht_pages_seo to be installed in admin > Modules > Header Tags (if it is not already). You may also want to look at how ht_product_title.php works and adapt for your use. I'm thinking of copying that file to ht_heading_title.php, changing the class name and $code to ht_heading_title, replacing all instances of PRODUCT_TITLE with HEADING_TITLE, and replacing the contents of the execute function with something like function execute() { global $PHP_SELF, $oscTemplate; if (in_array(basename($PHP_SELF), [ 'attias_beratung.php', 'attias_impressum.php' ])) { $oscTemplate->setTitle(HEADING_TITLE); } } Adjust the list of file names as necessary for your shop. Remember that you have to install the module in admin before it will do anything. You want it to have a low sort order number, as you want it to act before other modules. And if it wasn't clear, change things like $this->title = MODULE_HEADER_TAGS_PRODUCT_TITLE_TITLE; to look like $this->title = MODULE_HEADER_TAGS_HEADING_TITLE_TITLE; throughout the file.
  4. Well, it's language specific, so I'd check the part of the language files that specifies that <htmldir="ltr" lang="de"> My guess is that you're missing a space in define('HTML_PARAMS', ' dir="ltr" lang="de"'); in the german.php file. Note that there should be a space before the dir entry. Your browser doesn't know what an htmldir tag is, so it assumes that it's part of the body. So your browser implicitly creates the html, head, and body tags. Then it removes the ones that template_top.php created.
  5. ecartz

    Weekly sales reporting in admin help needed

    Find the code $months_query = tep_db_query( "SELECT DISTINCT( monthname( date_purchased ) ) AS month, month( date_purchased ) AS m FROM " . TABLE_ORDERS . " WHERE date_purchased LIKE '" . $years['y'] . "-%' ORDER BY date_purchased DESC" ); while ( $months = tep_db_fetch_array( $months_query ) ) { $net_total_query = tep_db_query( "SELECT SUM( value ) AS total FROM orders_total ot, orders o WHERE ot.orders_id=o.orders_id AND year( o.date_purchased ) = " . $years['y'] . " AND month( o.date_purchased ) = " . $months['m'] . " AND ot.class = 'ot_subtotal'" ); $net_total = tep_db_fetch_array( $net_total_query ); $shipping_total_query = tep_db_query( "SELECT SUM( value ) AS total FROM orders_total ot, orders o WHERE ot.orders_id=o.orders_id AND year( o.date_purchased ) = " . $years['y'] . " AND month( o.date_purchased ) = " . $months['m'] . " AND ot.class = 'ot_shipping'" ); $shipping_total = tep_db_fetch_array( $shipping_total_query ); $tax_total_query = tep_db_query( "SELECT SUM( value ) AS total FROM orders_total ot, orders o WHERE ot.orders_id=o.orders_id AND year( o.date_purchased ) = " . $years['y'] . " AND month( o.date_purchased ) = " . $months['m'] . " AND ot.class = 'ot_tax'" ); Change to $months_query = tep_db_query( "SELECT DISTINCT( YEARWEEK( date_purchased ) ) AS month, WEEK( date_purchased ) AS m FROM orders WHERE YEAR(date_purchased) = '" . $years['y'] . "' ORDER BY date_purchased DESC" ); while ( $months = tep_db_fetch_array( $months_query ) ) { $net_total_query = tep_db_query( "SELECT SUM( value ) AS total FROM orders_total ot, orders o WHERE ot.orders_id=o.orders_id AND year( o.date_purchased ) = " . $years['y'] . " AND WEEK( o.date_purchased ) = " . $months['m'] . " AND ot.class = 'ot_subtotal'" ); $net_total = tep_db_fetch_array( $net_total_query ); $shipping_total_query = tep_db_query( "SELECT SUM( value ) AS total FROM orders_total ot, orders o WHERE ot.orders_id=o.orders_id AND year( o.date_purchased ) = " . $years['y'] . " AND WEEK( o.date_purchased ) = " . $months['m'] . " AND ot.class = 'ot_shipping'" ); $shipping_total = tep_db_fetch_array( $shipping_total_query ); $tax_total_query = tep_db_query( "SELECT SUM( value ) AS total FROM orders_total ot, orders o WHERE ot.orders_id=o.orders_id AND year( o.date_purchased ) = " . $years['y'] . " AND WEEK( o.date_purchased ) = " . $months['m'] . " AND ot.class = 'ot_tax'" ); See if that does what you want for that page. If so, change the other query the same way $orders_query = tep_db_query( "SELECT * FROM orders WHERE YEAR( date_purchased ) = " . (int)$_REQUEST['year'] . " AND YEARWEEK( date_purchased ) = '" . (int)$_REQUEST['month'] . "' ORDER BY date_purchased DESC" );
  6. Did you install the module at admin > Modules > Content? To see modules that aren't installed, you have to click the Install button in the upper right.
  7. ecartz

    HoneyPot Captcha

    What core changes did you make? As best I can see, the create_account link typically appears in content modules. You can already disable those in admin without core changes. I strongly suspect that there is a way to do at least most of this without core changes now. The thing that I might change, possibly not as part of my current project, would be to change what pages redirect to the login page. That would make it easier to install a purchase without account App. I.e. I'm thinking about moving the block of code that says // if the customer is not logged on, redirect them to the login page if (!tep_session_is_registered('customer_id')) { $navigation->set_snapshot(); tep_redirect(tep_href_link('login.php', '', 'SSL')); } into a hook file. I'm pretty sure that existing hook calls can be used.
  8. ecartz

    HoneyPot Captcha

    Yes. The relevant line from install/oscommerce.sql is INSERT INTO countries VALUES (222,'United Kingdom','GB','GBR','1'); That would have to be changed to make UK work as the key.
  9. ecartz

    HoneyPot Captcha

    You could compare a few things though. In this example: the country is Australia. I don't believe that Australia has a state named Alabama (the US does have a state by that name). I suspect that the postal code is not valid for Australia. There are probably rules that an Australian could explain. Wikipedia suggests that in Australia, all post codes are three or four digits. In the United States, all zip codes are either five numbers or five numbers followed by a hyphen followed by four more numbers. So for a US zip code, you could check that the first five characters are numbers and the sixth character was a hyphen followed by digits in seven through ten. I'm guessing that an Australian could provide similar rules there. Perhaps add a postal code format regular expression to the countries table. It could be '{.*}' by default but something like '{\A\d{5}(?:-\d{4})\z}' for the US and '{\d{3,4}}' for Australia (none tested). Given how lazy spammers are, just filling in about ten formats should cover most of what they'll attempt: Afghanistan, Albania, Algeria, Andorra, Antigua and Barbuda, Argentina, Australia, Canada, United Kingdom, and United States. Perhaps later you might add Brazil, China, India, and Japan. Like in the US, single country stores are probably common in those places. And single country stores can more easily give the format used in their country.
  10. ecartz

    HoneyPot Captcha

    No, it makes it worse. Because then they sign up for the account just to get the in the confirmation email. And it makes it harder for people to actually buy. You know how Amazon.com confirms a shipping address? They ask you to enter your credit card number. Once you've entered it, you can simply reuse it for the same shipping address. Similarly, osCommerce authenticates via purchases. If you put in valid payment information, then clearly your account is valid. Social networks have to use confirmation emails because they don't take payment. But it's clearly an inferior method to checking payment information. There's lots of work on fraud in payments.
  11. ecartz

    forgot password implementation?

    https://apps.oscommerce.com/q=SMTP Auth I didn't count, but there are several of them, including for PHPMailer and SwiftMailer. Consider using MailChimp or similar for subscriptions. In terms of configuration, the typical problems with email configuration are outside osCommerce. Your host should help you set them up. E.g. a valid MX server for your domain. And make sure that you have an SPF DNS record stating that that is the valid MX server. You also might consider stripping out the parts of the emails that involve information that the user can set. For example, you should not address the person by name. Because spammers will put in the emails of someone they want to reach with a name like "Buy http://fake.viagra.example.com" and the recipient then marks it as spam. Amazon and NewEgg make their emails work by having full-time people whose job it is to make them work. They run their own email servers which are validated by SPF and Domain Keys (DMARC). If their email is identified as Spam, they support processes that remove the sender from their mailing list.
  12. I do not know the answer. But if I were trying to do this, I would look at sitemap Apps. Why? Because they generate listings of URLs and should use the same generation mechanism as osCommerce uses for regular links. Perhaps not all of them would be compatible with this App, but at least one should.
  13. Linux or Windows? In Linux, it uses some variant of sendmail. Windows uses SMTP, but in both cases, what I would call SMTP settings would be defined outside of osCommerce. E.g. in the sendmail configuration or the web server on Windows. There might be something in the PHP configuration. I haven't tried to look recently. What configuration osCommerce has is in admin > Configuration > E-Mail Options You may want to check out Harald's email testing script as a troubleshooting measure. If neither email sends, then the problem is at the host level.
  14. Replace all the occurrences of TABLE_WHATEVER with whatever. E.g. " . TABLE_CONFIGURATION . " would become configuration Note that the quotation marks and periods have disappeared in that section. This needs done for anything that says TABLE_ in any of the three files (includes/modules/shipping/uspsds.php, includes/classes/packing.php, and includes/classes/xml.php). It's currently not needed in the admin files, although it would be harmless to do it there as well. That's part of why I'm not trying to separate the uspsds.php file into things that are called by admin (e.g. the install function) and things that are called in catalog (e.g. the quote function). Go ahead and change all of them. As a general rule, TABLE_WHATEVER gets replaced with whatever (lower case, no TABLE_ at the beginning). There may be an exception to that, so watch out for lines that say something like define('TABLE_WHATEVER', 'not_quite_whatever'); and replace occurrences of " . TABLE_WHATEVER . " with not_quite_whatever instead. The standard osCommerce ones are at https://github.com/gburton/CE-Phoenix/blob/41601da342152b010247083c1a70101aa2468d84/includes/database_tables.php Also check if any of the DIR_WS entries that have been removed appear in this code. See https://github.com/gburton/CE-Phoenix/commit/65a7fdc942d043dc442f800c54885b9fb8c54d91#diff-cbf96a696abf49d99741d4219fed49a7 for the list of removed values (those with a red background). Have you tried uninstalling and reinstalling the module? You'd have to reenter the configuration but that might fix certain kinds of issues. Inside the module, there are some commented out print_r statements. Try uncommenting them and running a test order. This will probably break things more, but it may give useful output. You may want to change them to something like print_r([ $request, $xmlResponse ]); to add the request into the debugging output. Note the added square brackets. Try to figure out what is giving the no shipping methods message and trace back to why it is giving that message.
  15. In includes/application_top.php look for code like // define the project version --- obsolete, now retrieved with tep_get_version() define('PROJECT_VERSION', 'OSCOM CE Phoenix'); If it tells you to use tep_get_version, try looking in includes/version.php To get the PHP version, try looking in Tools > Server Info If your version of osCommerce doesn't have that, try looking for a file named phpinfo.php Unfortunately, I don't remember where that appeared. If you can't find that, you could try making one. The phpinfo function is available in all versions of PHP that I've used. Save <?php phpinfo(); as a file on your webserver. If your admin is protected by htpasswd, then put it there. If not, delete it after viewing it.
×