1.0.8.3 Questions / Comments / Concerns

Ask the community for help and support.
artfulweb
VIP Member
VIP Member
Posts: 119
Joined: Thu Oct 29, 2020 12:34 pm
Has thanked: 11 times
Been thanked: 4 times

Re: 1.0.8.3 Questions / Comments / Concerns

Post by artfulweb »

ecartz wrote: Sat May 15, 2021 4:20 pm
artfulweb wrote: Sat May 15, 2021 3:43 pm With that code the notice does not appear, without it it reappears so I do not understand. It shows up also in the customers order email confirmation beneath each product price
You could try removing it and changing line 52 to

Code: Select all

      return static::round(tep_add_tax((float)"$products_price", $products_tax), $this->currencies[$_SESSION['currency'] ?? DEFAULT_CURRENCY]['decimal_places']) * $quantity;
You also might consider changing the PHP version. There could be a bug in PHP that is exposing itself here.
Getting it narrowed down, it only occurs when the customer is using Paypal Standard, not with cod or moneyorder....

Tags:
ecartz
Lead Developer
Lead Developer
Posts: 2637
Joined: Tue Nov 05, 2019 6:02 pm
Has thanked: 4 times
Been thanked: 181 times

Re: 1.0.8.3 Questions / Comments / Concerns

Post by ecartz »

artfulweb wrote: Sun May 16, 2021 8:14 am
artfulweb wrote: Sat May 15, 2021 3:43 pm With that code the notice does not appear, without it it reappears so I do not understand. It shows up also in the customers order email confirmation beneath each product price
Getting it narrowed down, it only occurs when the customer is using Paypal Standard, not with cod or moneyorder....
Have you tried it with the extra logging? Because perhaps the notice was not appearing with the extra logging only because those orders weren't through PayPal. You could try it as

Code: Select all

if (('paypal_standard' === ($_SESSION['payment'] ?? null)) && isset($GLOBALS['n_checkout'])) {
   error_log(new Exception("$products_price"));
 }
which should reduce the number of log entries.
artfulweb
VIP Member
VIP Member
Posts: 119
Joined: Thu Oct 29, 2020 12:34 pm
Has thanked: 11 times
Been thanked: 4 times

Re: 1.0.8.3 Questions / Comments / Concerns

Post by artfulweb »

ecartz wrote: Sun May 16, 2021 8:22 am
artfulweb wrote: Sun May 16, 2021 8:14 am
artfulweb wrote: Sat May 15, 2021 3:43 pm With that code the notice does not appear, without it it reappears so I do not understand. It shows up also in the customers order email confirmation beneath each product price
Getting it narrowed down, it only occurs when the customer is using Paypal Standard, not with cod or moneyorder....
Have you tried it with the extra logging? Because perhaps the notice was not appearing with the extra logging only because those orders weren't through PayPal. You could try it as

Code: Select all

if (('paypal_standard' === ($_SESSION['payment'] ?? null)) && isset($GLOBALS['n_checkout'])) {
   error_log(new Exception("$products_price"));
 }
which should reduce the number of log entries.

What is the "extra logging"?
And just saw that it is when the Paypal Standard is used and the customer chooses Credit Card without Paypal account on their page.
artfulweb
VIP Member
VIP Member
Posts: 119
Joined: Thu Oct 29, 2020 12:34 pm
Has thanked: 11 times
Been thanked: 4 times

Re: 1.0.8.3 Questions / Comments / Concerns

Post by artfulweb »

Is there maybe just a wat to get the notice from showing on the email confirmation as it gives the path thus is a danger for the site?

Appears to the customer as:

Subject: Votre Commande

xxx
------------------------------------------------------

Numéro de Commande : XXX
Facture Détaillée : XXX
Date de Commande : XXX

Produits
------------------------------------------------------

Notice: A non well formed numeric value encountered in /XX/XX/XX/XX/includes/system/versioned/1.0.8.2/currencies.php on line 52

1 x Lang Yarns catalogue FAM 267 (lang_catalogue_FAM 267) = 8.00€
Notice: A non well formed numeric value encountered in /XX/XX/XX/XX/includes/system/versioned/1.0.8.2/currencies.php on line 52

1 x Lang Yarns FAM 254 Elle Tricote (fam254_catalogue) = 4.00€
:
ecartz
Lead Developer
Lead Developer
Posts: 2637
Joined: Tue Nov 05, 2019 6:02 pm
Has thanked: 4 times
Been thanked: 181 times

Re: 1.0.8.3 Questions / Comments / Concerns

Post by ecartz »

artfulweb wrote: Sun May 16, 2021 10:12 am Is there maybe just a wat to get the notice from showing on the email confirmation as it gives the path thus is a danger for the site?
Turn off display_errors:

Code: Select all

ini_set('display_errors', '0');
The most obvious place to put that would be in the includes/configure.php file.
artfulweb
VIP Member
VIP Member
Posts: 119
Joined: Thu Oct 29, 2020 12:34 pm
Has thanked: 11 times
Been thanked: 4 times

Re: 1.0.8.3 Questions / Comments / Concerns

Post by artfulweb »

Thanks
philpla
Posts: 27
Joined: Sun Feb 28, 2021 8:37 am
Has thanked: 2 times
Been thanked: 1 time

Re: 1.0.8.3 Questions / Comments / Concerns

Post by philpla »

in the store frontend, a logged in user, with more then one address can't delete adresses.

address_book_process.php line 88ff

Code: Select all

      $check_query = tep_db_query("SELECT COUNT(*) AS total FROM address_book WHERE address_book_id = " . (int)$_GET['delete'] . " AND customers_id = " . (int)$_SESSION['customer_id']);
      $check = $check_query->fetch_assoc();

      if ($check['total'] < 1) {
no code if check>=1 ... at this point the "delete" should accour imo
ecartz
Lead Developer
Lead Developer
Posts: 2637
Joined: Tue Nov 05, 2019 6:02 pm
Has thanked: 4 times
Been thanked: 181 times

Re: 1.0.8.3 Questions / Comments / Concerns

Post by ecartz »

philpla wrote: Sun May 16, 2021 5:35 pm at this point the "delete" should accour imo
No. At that point, it shows the "Do you really want to delete this address?" message.
philpla
Posts: 27
Joined: Sun Feb 28, 2021 8:37 am
Has thanked: 2 times
Been thanked: 1 time

Re: 1.0.8.3 Questions / Comments / Concerns

Post by philpla »

ecartz wrote: Sun May 16, 2021 5:59 pm
philpla wrote: Sun May 16, 2021 5:35 pm at this point the "delete" should accour imo
No. At that point, it shows the "Do you really want to delete this address?" message.
okay, but their is no code to delete the address imo
philpla
Posts: 27
Joined: Sun Feb 28, 2021 8:37 am
Has thanked: 2 times
Been thanked: 1 time

Re: 1.0.8.3 Questions / Comments / Concerns

Post by philpla »

philpla wrote: Sun May 16, 2021 5:35 pm in the store frontend, a logged in user, with more then one address can't delete adresses.

address_book_process.php line 88ff

Code: Select all

      $check_query = tep_db_query("SELECT COUNT(*) AS total FROM address_book WHERE address_book_id = " . (int)$_GET['delete'] . " AND customers_id = " . (int)$_SESSION['customer_id']);
      $check = $check_query->fetch_assoc();

      if ($check['total'] < 1) {
no code if check>=1 ... at this point the "delete" should accour imo
the error acours in templates/default/includes/pages/address_book_process.php line 46

Code: Select all

    <div class="text-right"><?php echo tep_draw_button(IMAGE_BUTTON_DELETE, 'fas fa-trash-alt', tep_href_link('address_book_process.php', 'delete=' . $_GET['delete'] . '&action=deleteconfirm&formid=' . md5($_SESSION['sessiontoken']), 'SSL'), 'primary', NULL, 'btn-danger btn-lg btn-block'); ?></div>
    
the md5 hash is wrong. it should be:

Code: Select all

    <div class="text-right"><?php echo tep_draw_button(IMAGE_BUTTON_DELETE, 'fas fa-trash-alt', tep_href_link('address_book_process.php', 'delete=' . $_GET['delete'] . '&action=deleteconfirm&formid=' . $_SESSION['sessiontoken'], 'SSL'), 'primary', NULL, 'btn-danger btn-lg btn-block'); ?></div>
    
Post Reply