Full-service Internet Marketing & Web Development
Recent Posts

Sponsors
![]() |
How to integrate SoftwareProjects Shopping cart formDawn Rossi, 09-25-2008 |
To integrate SoftwareProjects Shopping Cart checkout form into your website, use the template below:
At the top of your page include this php code:
// This page needs to be secure
$SECURED_PAGE = 1;
// Set product codename promoted on this page
$product_codename = "myproductcodename";
// Cart include
require_once($DOCUMENT_ROOT."/spicart.php");
// If submitted order for processing
if (Strcasecmp($HTTP_POST_VARS['action'],'checkout')==0)
{
$input = array();
$input['store_id'] = 2;
$input['product_codename'] = $product_codename;
// Checkout
if (do_checkout($input, &$output, &$ResultStr))
{
// If successful, redirect
Header("Location: success.php");
return;
}
}
Include this php code where you want the checkout form to show up:
// Display the checkout form
$input = array();
$input['ResultStr'] = $ResultStr;
$input['product_codename'] = $product_codename;
$input['emailaddress'] = $emailaddress;
print_checkoutform($input);
Finally, include this php code right before the closing body tag:
// Track everything
track();
Note:
* Replace myproductcodename with the unique product codename from your product manager.
* Replace success.php with the url you'd like to redirect users to after they have successfully placed an order
* Replace 2 (store id) with your store_id or leave it as 2 for the default
* If you don't have spicart.php, login to your SoftwareProjects account - click on Product Manager, then Settings and follow the instructions to generate your custom spicart.php that you will install on your web server root folder
At the top of your page include this php code:
// This page needs to be secure
$SECURED_PAGE = 1;
// Set product codename promoted on this page
$product_codename = "myproductcodename";
// Cart include
require_once($DOCUMENT_ROOT."/spicart.php");
// If submitted order for processing
if (Strcasecmp($HTTP_POST_VARS['action'],'checkout')==0)
{
$input = array();
$input['store_id'] = 2;
$input['product_codename'] = $product_codename;
// Checkout
if (do_checkout($input, &$output, &$ResultStr))
{
// If successful, redirect
Header("Location: success.php");
return;
}
}
Include this php code where you want the checkout form to show up:
// Display the checkout form
$input = array();
$input['ResultStr'] = $ResultStr;
$input['product_codename'] = $product_codename;
$input['emailaddress'] = $emailaddress;
print_checkoutform($input);
Finally, include this php code right before the closing body tag:
// Track everything
track();
Note:
* Replace myproductcodename with the unique product codename from your product manager.
* Replace success.php with the url you'd like to redirect users to after they have successfully placed an order
* Replace 2 (store id) with your store_id or leave it as 2 for the default
* If you don't have spicart.php, login to your SoftwareProjects account - click on Product Manager, then Settings and follow the instructions to generate your custom spicart.php that you will install on your web server root folder
|
|
Subscribe Now to receive new posts via Email as soon as they come out.
Comments
Post your comments
