adding extra fields
Posted: Tue Nov 13, 2007 9:20 pm
Hi Pablo
looking forward to V5!!. im currentley trying to implement the ecommerce and cart on my site. i require 2 extra fileds 'Size' & 'referance number'
on the product form i added a combo box with 10 sizes, and for the referance number i added a Text area. The customer should choose the product , the size, the quantity and the enter the referance codes in the Text area ( the referance codes are just numbers to be put on the product by us prior to shipment, its just a label really)
i modded the cart page html scrit to
<?php session_start(); define("PRODUCTCODE", 0); define("PRODUCTNAME", 1); define("QUANTITY", 2); define("PRICE", 3); define("size", 4); define("names", 5)if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if (isset($_POST['productcode'])) { AddToCart(); } else { $action = isset($_POST['action']) ? $_POST['action'] : ''; $value = strtoupper(substr($action, 0, 5)); switch ($value)
and the Cart contents html to
$strHTML = "<div style=\"overflow:auto; height=358px;\">"."\n";
$strHTML .= "<table border=\"0\" cellpadding=\"3\" cellspacing=\"2\" width=\"100%\">"."\n";
$strHTML .= "<tr>"."\n";
$strHTML .= "<td>Product code</td>"."\n";
$strHTML .= "<td>Product name</td>"."\n";
$strHTML .= "<td>Size</td>"."\n";
$strHTML .= "<td>Quantity</td>"."\n";
$strHTML .= "<td>Price</td>"."\n";
$strHTML .= "<td>Total</td></tr>"."\n";
$strHTML .= "<td>Names</td>"."\n";
$total = 0;
for ($i=0; $i<$itemcount; $i++)
{
can you see any problems with this working? any advice would be greatley appreciated
Regards
Paul
looking forward to V5!!. im currentley trying to implement the ecommerce and cart on my site. i require 2 extra fileds 'Size' & 'referance number'
on the product form i added a combo box with 10 sizes, and for the referance number i added a Text area. The customer should choose the product , the size, the quantity and the enter the referance codes in the Text area ( the referance codes are just numbers to be put on the product by us prior to shipment, its just a label really)
i modded the cart page html scrit to
<?php session_start(); define("PRODUCTCODE", 0); define("PRODUCTNAME", 1); define("QUANTITY", 2); define("PRICE", 3); define("size", 4); define("names", 5)if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if (isset($_POST['productcode'])) { AddToCart(); } else { $action = isset($_POST['action']) ? $_POST['action'] : ''; $value = strtoupper(substr($action, 0, 5)); switch ($value)
and the Cart contents html to
$strHTML = "<div style=\"overflow:auto; height=358px;\">"."\n";
$strHTML .= "<table border=\"0\" cellpadding=\"3\" cellspacing=\"2\" width=\"100%\">"."\n";
$strHTML .= "<tr>"."\n";
$strHTML .= "<td>Product code</td>"."\n";
$strHTML .= "<td>Product name</td>"."\n";
$strHTML .= "<td>Size</td>"."\n";
$strHTML .= "<td>Quantity</td>"."\n";
$strHTML .= "<td>Price</td>"."\n";
$strHTML .= "<td>Total</td></tr>"."\n";
$strHTML .= "<td>Names</td>"."\n";
$total = 0;
for ($i=0; $i<$itemcount; $i++)
{
can you see any problems with this working? any advice would be greatley appreciated
Regards
Paul