View Single Post
  #1  
Old 02-01-2009, 04:52 AM
 
andyr73 andyr73 is offline
 

Member
  
Join Date: Jun 2008
Location: chesterfield
Posts: 14
 

Default adding a 3rd party programme

Fellow members,

I am really new to xcart and want to send a 3rd party quoter to the shopping cart the quoter is accesible here http://www.clickapc.com/pcdesignerlite.htm
when customers fill out the desired specification they then click reveiw and order then they click submit order when this happens i want the price and product to be sent to my shopping cart so that customers can order the custom built pc.
i have the sample file which they sent me here is the script in that file.

<?php
////////////////////////////////////////////////////////////////////////////////////
//
// this is a sample script illustrating the integration of Advanced Checkout Mode
// It simply displays the contents of the configuration submitted by the user.
//
////////////////////////////////////////////////////////////////////////////////////
$PARAM = array_merge($_GET, $_POST);
$BasePrice = $PARAM['BasePrice'];
$numSystems = $PARAM['numSystems'];
$cart = $PARAM['cart'];
$itemsurl = $PARAM['itemsurl'];
$configuration = "base price: &pound;" . $BasePrice . "<br/>";
$totPrice = $BasePrice;
while (preg_match("/(.+?)\t(.+?)\t(.+?)\t(.+?)\t(.+?)\t(\d+?)\t(.+?)\n (.*)/s",$cart,$match))
{
$Component = $match[1];
$ProdCode = $match[2];
$Description = $match[3];
$Brand = $match[4];
$MPN = $match[5];
$Qty = $match[6];
$Price = $match[7];
$cart = $match[8];
$configuration .= "<b>" . $Component . ":</b> " . $Qty . " x " . $ProdCode . " (" . $Brand . " " . $MPN . " - " . $Description . ") at &pound;" . $Price . " each<br/>";
$totPrice += $Qty * $Price;
}
$configuration .= "Sub Total (ex. VAT): &pound;" . $totPrice . "<br/>";
echo "Order received for $numSystems system(s) with the following specs:<br/><br/>" . $configuration . "<br/><br/>";
echo "View and purchase the components from our shop using this URL<br/>" . $itemsurl;
?>

were do i have to put this script for it to work?
any help would be much appreciated.
P.s if you get this message
Restricted

(403 - Forbidden)
Access to this site is currently restricted. Please try again in one hour. If you own this website, please contact your web host.

Thank you!
just highlight the url and press enter this will let you in
__________________
X-Cart 4.7.10 Live
OS: Linux
Reply With Quote