Change Mals link from GET to POST (v. 2.55 - 2.81)

When an order button is clicked, the SiteBuilder system processes the prices and checks inventory, then submits it to Mals as a string (i.e. GET link). If your server supports CURL, you can change that to a POST method. Please note that this may not work on all servers! Test well before implementing.

To use this POST method mod:

  1. Verify that your server has the CURL library.

  2. Open the order.php file in the /go/ folder.

  3. Change the lines:

    // REGULAR WINDOW ORDERING
    else
    {
    @header("location: $gotolink");
    @header("Connection: close");
    die("
    
    Add to Cart
    
    
    
    
    Add to Cart
    
    ");
    }
  4. to:

    // REGULAR WINDOW ORDERING
    else
    {
    // OPTIONAL CURL
    $seplink = explode('?', $gotolink);
    $ch = curl_init($seplink[0]);
    curl_setopt ($ch, CURLOPT_POST, 1);
    curl_setopt ($ch, CURLOPT_POSTFIELDS, $seplink[1]);
    curl_exec ($ch);
    curl_close ($ch);
    exit();
    }
  5. Make sure that you are using the "Normal Window' method for ordering.