Angular, AWS und Symfony Freelancer

XTCommerce Sofortüberweisungs Modul leitet bei Abbruch auf Warenkorb weiter

Bei einem Abbruch findet ein Redirect auf den Warenkorb statt, weil die verkaufte Artikel Mange schon um 1 erniedrigt wurde und die Artikel nicht mehr kaufbar sind laut Datenbank.

Deswegen muss in der checkout_payment.php folgender Code eingefügt werden

if($_GET['payment_error'] == 'sofortueberweisung_direct')
{
/*    require (DIR_WS_CLASSES . 'payment.php');
    $payment_modules = new payment('sofortueberweisung_direct');
    if ($confirmation = $payment_modules->confirmation())
    {

    }*/

    require_once (DIR_WS_CLASSES.'order.php');
    require_once (DIR_FS_INC.'xtc_db_query.inc.php');
    require_once (DIR_FS_INC.'xtc_get_prid.inc.php');
    $order = new order();

    for ($i = 0, $n = sizeof($order->products); $i < $n; $i ++)
    {
         xtc_db_query("update ".TABLE_PRODUCTS." set products_quantity = products_quantity + 1 where products_id = '".xtc_get_prid($order->products[$i]['id'])."'");
    }
    unset($order);

}

oberhalb von

// if there is nothing in the customers cart, redirect them to the shopping cart page
if ($_SESSION['cart']->count_contents() < 1)
    xtc_redirect(xtc_href_link(FILENAME_SHOPPING_CART));

 


Posted

in

,

by

Tags:

Comments

2 Kommentare zu „XTCommerce Sofortüberweisungs Modul leitet bei Abbruch auf Warenkorb weiter“

  1. Avatar von Alex
    Alex

    Soweit ich weiß wurde das Plugin kürzlich erst überarbeitet. Auf welche Version beziehst du dich den?

    1. Avatar von Sebastian Viereck
      Sebastian Viereck

      Hi Alex,
      Das kann ich aus sicherheitsgründen leider nicht sagen.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert