Hello All,
I’m in need of help. I have a website for my grandmother who makes and sells Christmas stockings. It was being hosted by Godaddy, but we don’t want to pay for the hosting anymore, so we moved the website to a free host. When I transferred the files over the new host the PHP shopping cart we were using stopped working and I cant figure out why. I don’t want to break this websites rules so I don’t want to post a link unless its okay.
When I click “add to cart” now, it takes me to the shopping cart page, but instead of displaying the product in the shopping cart, all that is displayed is: ");?> Continue Shopping Please Verify Your Order is Correct Before Continuing With Checkout:
The different PHP files to support the shopping cart are:
ChoosePayment.php // Local_Settings.php // ShoppingCart.php // Style.css // MakePayment.php //
In the Includes folder: Cart_Functions.php // Cart_Templates.php // Paypal_Functions.php // Overall_Footer.php // Overall_Header.php
Here is the PHP code for the shopping cart page. My assumption is i’m missing an ending symbol somewhere. As a side note, this code was pulled from ‘The freebert.com Free PHP Shopping Cart’.
[php]
<? session_start(); // Load Settings require_once('Local_Settings.php'); // Load Functions require_once('inc/functions/Cart_Templates.php'); require_once('inc/functions/Cart_Functions.php'); // Check For Required Actions if (is_numeric($_POST['cmd'])) { $cmd_In = $_POST['cmd']; } else { // Error, No ID, Send Away $cmd_In = ''; } // Batch Add Items if ($cmd_In==5) { AddBatch($Session_Prefix); } // Update Cart Content if ($cmd_In==4) { UpdateCart($Session_Prefix); } // if ($cmd_In==1) { // Add Item To Cart // Parse Optional Inputs Into Title & Serial $title_In = cleanvalue($_POST['Title']); $serialnum_In = cleanvalue($_POST['SerialNum']); $ImageURL_In = cleanvalue($_POST['ImageURL']); if (is_numeric($_POST['Price'])) { $price_In = $_POST['Price']; } else { // Error, No ID, Send Away $price_In = ''; } if (is_numeric($_POST['Shipping1'])) { $shipping1_In = $_POST['Shipping1']; } else { // Error, No ID, Send Away $shipping1_In = ''; } if (is_numeric($_POST['Shipping2'])) { $shipping2_In = $_POST['Shipping2']; } else { // Error, No ID, Send Away $shipping2_In = ''; } AddItemToCart($title_In,$serialnum_In,$price_In,$shipping1_In,$shipping2_In,$Session_Prefix,1,$ImageURL_In); } // Do HTML Header Open_Cart_HTML($Site_Script_Root_Directory,$CSS_Filename,$Site_Title.' - Shopping Cart'," ");?> <? include('inc/skin/Overall_Header.php'); ?>
<? echo Cart_Menu(1); ?>
|
<div <? include('inc/skin/Overall_Footer.php'); // Do HTML footer Close_Cart_HTML($Site_Domain,$Site_Script_Root_Directory); ?>
[/php]
Any help is greatly appreciated.