Jump to content

ecartz

♥Ambassador
  • Content count

    3,572
  • Joined

  • Last visited

  • Days Won

    61

Everything posted by ecartz

  1. is_object($GLOBALS[$payment]) That checks to see if there is a global object named $$payment. If it was checking for a global object named $payment, it would say is_object($GLOBALS['payment']) The warning is saying that $payment, which should be a string, is instead an object. Because an object is not a valid array index key (in PHP), it complains when it attempts to dereference $GLOBALS (an array) with it. Where dereference is just a fancy word for doing $GLOBALS[$payment]. Meaning to find the entry in $GLOBALS for the key $payment. It's also possible that the code is going down a weird path when there is an error. It seems like something is doing $payment = new payment(); while $payment is bound to the session value. If this is a bug in 1.0.4.0, it won't get fixed now, as we've moved on to 1.0.6.0. So any fixes would occur in 1.0.6.1 or later.
  2. https://github.com/gburton/CE-Phoenix/commit/ed074660e9c1b2c30200f8e5006fce1a53c08416#diff-8b27695473c9fdb061fe2a0d1f3d59d6 Which is just a fancy way of saying, not in 1.0.5.0. https://github.com/gburton/CE-Phoenix/commit/ccee9f7b75a9392325e10c4025360b7f0c630a92#diff-8b27695473c9fdb061fe2a0d1f3d59d6 In 1.0.5.0, you would probably put it right after tep_db_perform('orders_status_history', $sql_data_array); Or perhaps just before // lets start with the email confirmation If there are instructions for older versions of Phoenix or the BS edition, they are probably correct for 1.0.5.0. The big changes to that file occurred in 1.0.5.1. With some tweaks at 1.0.5.3.
  3. __ PHP_Incomplete_Class is what happens when the session is loaded before the class. This should not happen if you use a version of Phoenix with the autoloader and the payment module is in includes/modules/payment. So one solution would be to update from 1.0.4.0 to 1.0.5.0 or 1.0.6.0. That should get rid of the __ PHP_Incomplete_Class. Another issue though is that $payment should be a string, not an object. $$payment should be the object. So it is likely that there is a bug in the module where it sets $payment equal to something where it should have set $$payment (or $GLOBALS[$_SESSION['payment']]) to something.
  4. tep_redirect(tep_href_link('checkout_confirmation.php', 'error_message=Kies+uw+bank!', 'SSL')); Maybe? Typo in the page name and unescaped spaces in the error message. A side issue is that it often redirects to either checkout shipping or payment rather than confirmation. What does "Kies uw bank" actually mean in this context? Google thinks it is "Choose your bank". But who is supposed to choose? You? The buyer? Where does that happen?
  5. ecartz

    Product Attributes Random Order Problem

    Assuming the latest osCommerce is CE Phoenix 1.0.6.0, the order is set in https://github.com/gburton/CE-Phoenix/blob/master/includes/modules/content/product_info/cm_pi_options_attributes.php It orders by name. So to get a different order, make the names have a definite order. E.g. 1. Small 2. Medium 3. Large 4. Xtra Large 5. 2XL Where the initial number is part of the option name. Note that this only supports up to nine choices per option. It's possible that a different version might have a different order, e.g. by order of entry in the database. I mention this because I think that your order would be difficult to achieve in CE Phoenix. Perhaps 2XL, Small, Xtra large, large, medium would do it (mixed casing intentional). I would expect with consistent casing, it would be 2XL, Large, Medium, Small, Xtra Large.
  6. ecartz

    Wrong redirect after add to cart

    The most likely problem is that $PHP_SELF is set incorrectly. Check any mod_rewrite rules or the original link. I.e. I don't think the problem is in the code that you posted but somewhere else.
  7. ecartz

    Error with manufacturers.php

    It says that the cache was corrupted and not reloading. There may have been a PHP update on your host that changed how count handled things in that case. I have a sort of vague recall that something used to be a zero that may now be a one. But since that code doesn't set the cache block, there's no way to fix it there. You might be able to fix it in whatever the $cache thing is, but I don't believe that's standard. I think that's an App you added. Because I recall the core caching as working differently. Of course, that's old enough that perhaps my recall is wrong. You commented out the code that checks if the cache is working and falls back to a database query. So it just always does the database query. Because the cache was returning that it was working even though it didn't seem to be.
  8. ecartz

    Add download filename to admin orders

    I think that we should put the orders_products_id in the products array in the order. Then it wouldn't be necessary to override the order file for this customization or redo the orders_products part of the query. It could just load the data for the downloads directly and add it to the order object. SELECT * FROM orders_products_download WHERE orders_id = while ($download = tep_db_fetch_array($downloads_query)) { foreach ($order->products as &$product) { if ($download['orders_products_id'] === $product['orders_products_id']) { $product['download_filename'] = $download['orders_products_filename']; } } unset($product); } And that could be done in a hook with no core modification (other than the one that we'd make to pull in the orders_products_id).
  9. When I try editing the corrupted version of the file, I get either CRLFCRLF or LFLF depending on whether I do the replace before saving. A better replacement might be $file_contents = preg_replace("{\r+\n}", "\n", stripslashes($_POST['file_contents'])); But I can't really test it, as I believe that the CRCRLF is getting converted to CRLFCRLF prior to that point. I'll let @burt make the decision about whether it is better to push to core or not. And which version and when.
  10. I checked it with vim -b and xxd which showed me one CR per LF. But as described, I shouldn't have had to do so to get the result that you did. Because it should have showed me extra blank lines. So even without any further checking, it should have been visible. I checked on Apache/2.4.29 (Ubuntu) PHP 7.2.30, which seems similar enough to yours that it should have shown. Have you tried it in a different browser or in safe mode (without extensions) Firefox? Or from a different computer? How do you get the file to Notepad++? Does it load the file for you? I wonder if you have it set in such a way that it tries to convert the file from Unix to Windows line endings, even if the file is already in Windows format. You might try it on the Unix command line with something like xxd, which shows me The 0d of course is the carriage return and the 0a the line feed. If you want me to verify that I can view the doubled carriage returns, email me a copy of one of the corrupted files. Or you could try changing $file_contents = stripslashes($_POST['file_contents']); to $file_contents = str_replace("\r\n", "\n", stripslashes($_POST['file_contents'])); I tried that on mine and it left things as Unix line endings. Perhaps yours would leave it as Windows line endings.
  11. I wasn't able to duplicate this in 1.0.5.10 on a Linux server editing with Firefox on Windows. It would convert from Unix to DOS line endings but it didn't go the next step to duplicating the carriage returns even when I edited the file repeatedly. So I think there's more to this than you've diagnosed so far. Have you tried different versions of PHP/Apache?
  12. ecartz

    Q. tep_

    The Exchange Project That was the name before osCommerce in versions 1.0, 2.0, and 2.1. A shop being a place where you can exchange money for goods. I would find Open Source Commerce to be a more useful name without a conflict with a commonly used Microsoft product for managing emails and group interactions. OSCOM stands for Open Source Commerce Online Merchant. CE stands for Community Edition. BS stands for BootStrap. In general, the current CE Phoenix is a successor to the previous BS versions.
  13. ecartz

    Error with manufacturers.php

    This isn't something a host can help you do. It's a coding thing. You'd hire a developer to troubleshoot. If you want to continue to try yourself: $manufacturers = $cache->get_cache('manufacturers', 'ARRAY'); $total_rows = count($manufacturers); if ($total_rows < 1) { Consider commenting out these lines and the closing } and see if it works. Or change them to $manufacturers = $cache->get_cache('manufacturers', 'ARRAY'); $total_rows = count($manufacturers); if (is_array($manufacturers) && $total_rows < 1) { You could also add var_dump($manufacturers); and see what it says. That would go before the if and after the closing } for the if. The basic problem though is that that version is so old that there is no supported PHP for it any more. The simplest solution would be to turn off the box. It doesn't work this way, so not a big deal to turn it off.
  14. It's hidden in the language file: https://github.com/gburton/CE-Phoenix/blob/master/includes/languages/english/modules/content/product_info/cm_pi_price.php Note that that seems likely to change, as overridable templates require HTML to be in the templates rather than the language files. But it is currently in the language file.
  15. ecartz

    Bootstrap Version?

    Phoenix (the Community Edition on the Downloads page) uses Bootstrap.
  16. ecartz

    E-commerce for taylormade furniture

    There's a Phoenix compatible App: https://apps.oscommerce.com/VJEMI&amp;wholesale-sppc-lite-phoenix&amp;v=cephoenix10 This would require custom development. There's a commercial inquiries forum here where you can ask for bids. There were a couple assembly modules attempted but I don't know that any were really mature. And I don't believe that they have been updated for Phoenix. So this would also likely require custom development. Phoenix has both of these.
  17. There is a commercial inquiries forum for posting for developer help.
  18. .htaccess maybe? That seems like a DirectoryIndex, which also could be set directly in httpd.conf or similar. If all else fails, discuss with your host. Note that if you write out /index.php at the end, it goes to the right place. Which is exactly the DirectoryIndex behavior. https://httpd.apache.org/docs/2.4/mod/mod_dir.html You probably want DirectoryIndex index.php
  19. I looked into this more. The problem it creates is that it adds a dependency on the mbstring extension which is not always installed. There also might be encoding problems if the default encoding is different from the encoding of the string. Perhaps if ( (defined('MODULE_HEADER_TAGS_PRODUCT_META_KEYWORDS_STATUS')) && (MODULE_HEADER_TAGS_PRODUCT_META_KEYWORDS_STATUS != 'Meta') ) { $where_str .= "pd.products_seo_keywords LIKE '%" . tep_db_input($keyword) . "%' OR "; } $where_str .= "pd.products_name LIKE '%" . tep_db_input($keyword) . "%' OR p.products_model LIKE '%" . tep_db_input($keyword) . "%' OR m.manufacturers_name LIKE '%" . tep_db_input($keyword) . "%'"; if (isset($_GET['search_in_description']) && ($_GET['search_in_description'] == '1')) $where_str .= " OR pd.products_description LIKE '%" . tep_db_input($keyword) . "%'"; to if ( (defined('MODULE_HEADER_TAGS_PRODUCT_META_KEYWORDS_STATUS')) && (MODULE_HEADER_TAGS_PRODUCT_META_KEYWORDS_STATUS != 'Meta') ) { $where_str .= "pd.products_seo_keywords LIKE LOWER('%" . tep_db_input($keyword) . "%') OR "; } $where_str .= "pd.products_name LIKE LOWER('%" . tep_db_input($keyword) . "%') OR p.products_model LIKE LOWER('%" . tep_db_input($keyword) . "%') OR m.manufacturers_name LIKE LOWER('%" . tep_db_input($keyword) . "%')"; if (isset($_GET['search_in_description']) && ($_GET['search_in_description'] == '1')) $where_str .= " OR pd.products_description LIKE LOWER('%" . tep_db_input($keyword) . "%')"; in advanced_search_result.php and remove the strtolower from tep_parse_search_string. $search_str = trim($search_str);
  20. Maybe try changing $search_str = trim(strtolower($search_str)); to $search_str = trim(mb_strtolower($search_str)); If that fixes it, we could consider adding that to core. But I first want to know if it fixes the problem without creating other problems. If it doesn't go to core, an alternative would be to set the locale properly. From https://www.php.net/manual/en/function.strtolower.php
  21. ecartz

    SMTP with authentication on Phoenix 1.0.5.0

    I'm not sure why you would have needed to modify general.php with that class. Presumably application_top.php was to load the class but Phoenix should do that automatically. <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2020 osCommerce Released under the GNU General Public License email is a class to assist with PHPmailer sendmail, SMTP and gmail compatibility */ require_once DIR_FS_CATALOG . 'includes/apps/PHPMailer/PHPMailerAutoload.php'; class email { private $lf, $mailer; private $debug = 0; private $debug_output = 'error_log'; const LINEFEEDS = ["\r\n", "\n", "\r"]; public function __construct($headers = '') { $this->mailer = new PHPMailer(); $this->mailer->XMailer = 'osCommerce ' . tep_get_version(); $this->mailer->SMTPDebug = $this->debug; $this->mailer->Debugoutput = $this->debug_output; $this->mailer->CharSet = CHARSET; $this->mailer->WordWrap = 998; if (EMAIL_TRANSPORT == 'smtp' || EMAIL_TRANSPORT == 'gmail') { $this->mailer->IsSMTP(); $this->mailer->Port = EMAIL_SMTP_PORT; if (EMAIL_SMTP_SECURE !== 'no') { $this->mailer->SMTPSecure = EMAIL_SMTP_SECURE; } $this->mailer->Host = EMAIL_SMTP_HOSTS; $this->mailer->SMTPAuth = EMAIL_SMTP_AUTHENTICATION; $this->mailer->Username = EMAIL_SMTP_USER; $this->mailer->Password = EMAIL_SMTP_PASSWORD; } else { $this->mailer->isSendmail(); } if (EMAIL_LINEFEED == 'CRLF') { $this->lf = "\r\n"; } else { $this->lf = "\n"; } } public function add_text($text = '') { $this->mailer->IsHTML(false); $this->mailer->Body = str_replace(static::LINEFEEDS, $this->lf, $text); } public function add_html($html, $text = NULL, $images_dir = NULL) { $this->mailer->IsHTML(true); $this->mailer->Body = str_replace(static::LINEFEEDS, '<br />', $html); $this->mailer->AltBody = str_replace(static::LINEFEEDS, $this->lf, $text); if (isset($images_dir)) { $this->mailer->Body = $this->mailer->msgHTML($this->mailer->Body, $images_dir); } } public function add_message($email_text) { // Build the text version $text = strip_tags($email_text); if (EMAIL_USE_HTML == 'true') { $this->add_html($email_text, $text); } else { $this->add_text($text); } } function add_attachment($path, $name = '', $encoding = 'base64', $type = '', $disposition = 'attachment') { $this->mailer->AddAttachment($path, $name, $encoding, $type, $disposition); } public function build_message() { // do nothing; needed for compatibility } public function send($to_name, $to_addr, $from_name, $from_addr, $subject = '') { // No need to check for "\r\n" separately as will match the other two foreach (["\n", "\r"] as $line_ending) { foreach ([$to_name, $to_addr, $subject, $from_name, $from_addr] as $header_value) { if (false !== strstr($header_value, $line_ending)) { return false; } } } $this->mailer->From = $from_addr; $this->mailer->FromName = $from_name; $this->mailer->AddAddress($to_addr, $to_name); if (defined('EMAIL_FROM')) { $this->mailer->From = EMAIL_FROM; $this->mailer->FromName = STORE_NAME; $this->mailer->AddReplyTo($from_addr, $from_name); } else { $this->mailer->From = $from_addr; $this->mailer->FromName = $from_name; } $this->mailer->Subject = $subject; $result = $this->mailer->Send(); $this->mailer->clearAddresses(); $this->mailer->clearAttachments(); return $result; } } Save this email.php file in a directory named includes/system/override (which you will probably have to create) and see if it starts working. Note that you may have to do some configuration somewhere. And of course you need to upload the PHPMailer files. I don't think that ext is the right place. I'd put them in includes/apps/ or similar. If you change that, change the require line. I replaced the EMAIL_SMTP_REPLYTO with the Phoenix equivalent along with other changes.
  22. ecartz

    Buy now button

    It doesn't look like there's a good way to do it short of going to includes/modules/product_listing.php and removing it. if ($has_attributes == 0) $prod_list_contents .= tep_draw_button(IS_PRODUCT_BUTTON_BUY, '', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . (int)$listing['products_id']), NULL, array('params' => 'data-has-attributes="' . $has_attributes . '" data-in-stock="' . (int)$listing['in_stock'] . '" data-product-id="' . (int)$listing['products_id'] . '"'), 'btn-light btn-product-listing btn-buy') . PHP_EOL; I suppose that you could add product attributes to every product.
  23. ecartz

    [Contribution] Ship In Cart

    It looks like it needs to have the $customer object created. $customer = new customer($customer_id); You may have to find a way to make it work with a fake customer ID when the customer is not logged in. Possibly would require shipto and billto to be stored in the session (as arrays of information).
  24. ecartz

    SMTP with authentication on Phoenix 1.0.5.0

    You might post what code used to need to be changed. Because I don't think that things have changed that significantly. You may just need to have it rewritten. Or you may need to have someone write an adapter for the previous version of the code. And you might also want to be careful with your terms. Reading your post, it seems that what you actually want is SMTP Authentication but you keep talking about SMTP. That's two different things. As far as I know, SMTP works fine now if you have your server configured for it. It's just that most people don't go through the effort to configure their servers to work with basic SMTP. So you want a workaround that uses another server for the SMTP. But to do that, you need the authentication. What you want is not properly described as SMTP but as authenticated SMTP or remote SMTP. Anyway, my point is that if there are instructions that you don't know how to follow, you could get more help if you posted them. As is, if I wanted to try to help, I'd have to go download the App. And frankly, I'm too lazy to do that.
  25. Or just duplicate the create_account page. The new, not core, file could have completely arbitrary logic.
×