Jump to content

sinopia

Members
  • Content count

    174
  • Joined

  • Last visited

1 Follower

Recent Profile Visitors

3,520 profile views
  1. sinopia

    PayPal App for osCommerce Online Merchant

    Hi @BrockleyJohn Thank you for your explanation. I've only the code at checkout_process.php now. As it was running the code at paypal_standard it was recording as the old order id as the payment was not confirmed yet. I've Auto Return enabled for checkout_process.php so after confirming the payment it returns to my website after finishing the payment, at least what I see in the logs: XXX.XX.XXX.XXX - - [06/Feb/2020:22:26:33 +0000] "GET /checkout_process.php?amt=XX.XX&cc=EUR&cm=XXXXX&st=Completed&tx=XXXXXXXXXXX HTTP/2.0" 302 20 "https://www.paypal.com/webapps/hermes?token=XXXXXXXXXX&useraction=commit&rm=X&mfid=XXXXXXXXXXXXXXX" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36" The referer comes directly from paypal so it should work. I'll see in the next order if this is working as it should. Thank you very much. Best regards.
  2. sinopia

    PayPal App for osCommerce Online Merchant

    I've commented the code from paypal_standard.php and leave the code at checkout_process.php. From the logs the PayPal orders goes through checkout_process so probably there should be the correct order id variable.. I'll test to see if it works.
  3. sinopia

    PayPal App for osCommerce Online Merchant

    Hello. I need a little help fixing some code that saves some customized text attributes in each product in the order, if inserted... It works for all orders and payments except PayPal Standard orders.. It saves the attributes at checkout_process.php, but seems that PayPal deletes the order created and generates a new this way: $order_id = substr($cart_PayPal_Standard_ID, strpos($cart_PayPal_Standard_ID, '-')+1); I need to save order_id and also orders_products_id. The current code I got in checkout_process.php (also at paypal_standard.php) is this: tep_db_query("insert into orders_text_attributes (`orders_id`, `products_id`, `products_text_attributes_id`, `products_text_attributes_text`, `orders_products_id`) values ('" . $insert_id . "', '" . $order->products[$i]['id'] . "', " . $attr['products_text_attributes_id'] . ", '" . $attr['products_text_attributes_text'] . "', '" . $order_products_id . "')"); The variables $insert_id and $order_products_id gets -1 from what is correct and final order id. I've added at the paypal_standard.php but it seems that it does the same as checkout_process.php but I've saw at the logs, that after the payment paypal page redirects to checkout_process.php and then receive a POST in standard_ipn.php from PayPal and then checkout_sucess.php. Can this be caused because of the code at paypal_standard.php? Should it be only at checkout_process.php or should I user variable $order_id instead $insert_id? By the way if someone could explain how the paypal standard works, for example what files does what and what are they segment.. So I could understand and least where to fix this. Because I've already saw this at logs: 1º checkout_process.php?amt=...&cc=...&cm=...&st=...&tx=... 2º checkout_sucess.php 3º standard_ipn.php (sometimes is checkout_sucess.php the last - maybe some delay?) Best regards
  4. sinopia

    PayPal App for osCommerce Online Merchant

    By the way order_confirm.php is send mails using PHPMailer. The line 17 is: for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) { I've added this before because I weren't recognizing order variable: // Fix for paypal_standard.php - $order_id and checkout_process.php uses $insert_id if (strpos($order->info['payment_method'], 'PayPal') !== false) { $insert_id = $order_id; } Is someone has this issues or could know what can be causing this I would really appreciate any help. Also what is going on with session_destroy()? Should the application_top.php create or recreate and application_bottom.php destroy? Line 162 is: return session_destroy(); // from function tep_session_destroy() { Best regards.
  5. sinopia

    PayPal App for osCommerce Online Merchant

    Hello. I've seeing this at error_log: [10-Nov-2019 18:41:29 Europe/Lisbon] PHP Warning: sizeof(): Parameter must be an array or an object that implements Countable in /home/x/public_html/includes/modules/mail_manager/order_confirm.php on line 17 [10-Nov-2019 18:41:29 Europe/Lisbon] PHP Warning: session_destroy(): Trying to destroy uninitialized session in /home/x/public_html/includes/functions/sessions.php on line 162 I'm using the last app from paypal. This seems to happen in checkout_success.php while GET request from paypal.com/webapps... Checked at logs and it was at the same exact time. Using PHP 7.3, I'm aware that sizeof could get some warning in PHP7.3 and saw that in some cases count() should be used. Sometimes paypal recreate a new order id, I'm not sure if this happens in all osCommerce stores but in my case some paypal orders became +1 (order 1234 will become 1235 for example). Could it accessing the old order variable and as it doesn't exists cause this warning? Best regards.
  6. sinopia

    ezsocial login sessions problems

    Replace the function to use openssl_encrypt/decrypt instead of mcrypt and seems everything to work. If anyone need to substitute pm me. Will check now if the warning about sessions keep showing.
  7. sinopia

    ezsocial login sessions problems

    Seems that the files login_with_facebook.php and others had twice application_top.php requires.. Only requires if ($success), so disabled that and put it on the top, seems to fix it. Now got this: Fatal error: Uncaught Error: Call to undefined function mcrypt_get_block_size() in /home/x/public_html/oauth/functions.php:14 Stack trace: #0 /home/x/public_html/login_with_facebook.php(113): mc_encrypt('ezsocial|262058...', 'c8e0c24452f4178...') #1 {main} thrown in /home/x/public_html/oauth/functions.php on line 14 Will try to change the functions from ezsocial to use openssl. As it's not a good idea to compile mcrypt as it's deprecated.
  8. sinopia

    ezsocial login sessions problems

    Added require('includes/application_top.php'); and seems to fixed the sessions issues.. now I got: Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /home/x/public_html/includes/functions/compatibility.php:18) in /home/x/public_html/includes/functions/compatibility.php on line 29 Mine compatibility.php is the same as this: https://github.com/gburton/CE-Phoenix/blob/master/includes/functions/compatibility.php I'll check if it's active on cPanel.. Another issue related with sessions.. at database I got 622940 records, it seems that is logging some session records.. Should it not removed as customers logout or the session expires?
  9. Hello I've upgraded into 7.3 and seems to be all ok, I got a 2.3.4 template but I've been updating some code from CE-Phoenix some functions and code to be recent (a lot core modifications that would require a lot to upgrade all to CE-Phoenix) But while login with facebook/google/etc with ezsocial login I'm getting this warnings: Warning: session_set_save_handler(): Cannot change save handler when session is active in /home/x/public_html/includes/functions/sessions.php on line 65 Warning: session_name(): Cannot change session name when session is active in /home/x/public_html/includes/functions/sessions.php on line 142 Warning: session_save_path(): Cannot change save path when session is active in /home/x/public_html/includes/functions/sessions.php on line 167 Warning: session_set_cookie_params(): Cannot change session cookie parameters when session is active in /home/x/public_html/includes/application_top.php on line 172 Fatal error: main(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "navigationHistory" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide an autoloader to load the class definition in /home/x/public_html/includes/application_top.php on line 348 The normal sessions like login/login seems to work fine and keeps the products etc. It's just while trying to login with facebook for example. Should the files login_with_facebook.php missing application_top for the sessions part? I've getting more warnings and errors like: [29-Oct-2019 10:16:58 Europe/Lisbon] PHP Warning: session_destroy(): Trying to destroy uninitialized session in /home/x/public_html/includes/functions/sessions.php on line 149 [29-Oct-2019 10:27:19 Europe/Lisbon] PHP Warning: session_set_save_handler(): Cannot change save handler when session is active in /home/x/public_html/includes/functions/sessions.php on line 65 [29-Oct-2019 10:27:19 Europe/Lisbon] PHP Warning: session_name(): Cannot change session name when session is active in /home/x/public_html/includes/functions/sessions.php on line 142 [29-Oct-2019 10:27:19 Europe/Lisbon] PHP Warning: session_save_path(): Cannot change save path when session is active in /home/x/public_html/includes/functions/sessions.php on line 167 [29-Oct-2019 10:27:19 Europe/Lisbon] PHP Warning: session_set_cookie_params(): Cannot change session cookie parameters when session is active in /home/x/public_html/includes/application_top.php on line 177 [29-Oct-2019 10:27:19 Europe/Lisbon] PHP Fatal error: Uncaught Error: Call to undefined function mcrypt_get_block_size() in /home/x/public_html/oauth/functions.php:14 Stack trace: #0 /home/x/public_html/login_with_facebook.php(113): mc_encrypt('ezsocial|262......', 'c8e0...........') #1 {main} thrown in /home/x/public_html/oauth/functions.php on line 14 [29-Oct-2019 10:46:33 Europe/Lisbon] PHP Warning: session_start(): Failed to decode session object. Session has been destroyed in /home/x/public_html/includes/functions/sessions.php on line 106 [29-Oct-2019 10:46:38 Europe/Lisbon] PHP Warning: session_start(): Failed to decode session object. Session has been destroyed in /home/x/public_html/includes/functions/sessions.php on line 106 [29-Oct-2019 10:49:59 Europe/Lisbon] PHP Warning: session_start(): Failed to decode session object. Session has been destroyed in /home/x/public_html/includes/functions/sessions.php on line 106 [29-Oct-2019 10:50:03 Europe/Lisbon] PHP Warning: session_start(): Failed to decode session object. Session has been destroyed in /home/x/public_html/includes/functions/sessions.php on line 106 [29-Oct-2019 10:55:24 Europe/Lisbon] PHP Warning: require(includes/languages/.php): failed to open stream: No such file or directory in /home/x/public_html/includes/application_top.php on line 334 Seems that mcrypt is deprecated since PHP 7.1.. and to use openssl instead, but it's also possible to use mcrypt it but not recommended. But should that been causing this issue with sessions? Best regards
  10. sinopia

    SEO Friendly Urls - a new approach

    Hi @gadlol thank you for your quickly answer. I'll send you a message right now. About the alias something like define for multiple language (I guess it's possible to do it). Example: mystore.com/specials mystore.com/es/especiales mystore.com/pt/especiais All for specials.php file.
  11. sinopia

    SEO Friendly Urls - a new approach

    Hi @gadlol Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/xxx/public_html/includes/classes/seo_friendly_urls.php on line 380 while ( $loop && ( ( $option = each( $children[$parent] ) ) || ( $parent > $root_id ) ) ){ What is the best approach to replace the each? Versions from 7.0 get that warning.. Really wanted to upgrade PHP to the new version. Also for the alias pages is there any way to add a functionality for multilingual alias? Best regards
  12. Hi everyone, I've now two languages in our website and it uses a ccTLD, should I use hreflang? I guess it's hard because the domain is for specific country. I'm asking this because Google can detect as duplicated content and penalize the website. I used website/category/product-1 for default language which is the domain country and english but I've disabled the slug SEO /en/ for example. Also haven't add anything at webmaster like sitemap and international segment... If someone could give a advice I would really appreciate the help. Also, I've been searching some addon to set products from only specific countries/language but didn't find anything, anyone knows any? Just to set some checkbox at admin/categories.php in the product like: language1 language2. I tried to remove the products name for that languages but it keeps showing at product listings.. maybe some bug? By the way, I know reviews should be for specific language but is there a way to show them all? I'm wondering set a little script that if needed ask's for translation though an API. As I've set a new language is normal that there's no reviews and this way should give more reliability to buy.
  13. sinopia

    PayPal App for osCommerce Online Merchant

    @BrockleyJohn but which one? if ( $result == 'VERIFIED' ) { or function verifyTransaction? I think it's accessed twice from standard_ipn.php and paypal_standard..
  14. sinopia

    PayPal App for osCommerce Online Merchant

    Something like a callback, so when the paypal payment is confirmed, I send a cURL request with the invoice to my e-printer.
  15. sinopia

    PayPal App for osCommerce Online Merchant

    Well, I suppose it's on standard_ipn.php at if ( $result == 'VERIFIED' ) {
×