Jump to content

Login page no working?


Guest

Recommended Posts

Hello!

For some reason when I go to Login on my shop (www.ironfoot.co.uk/shop) it comes up with a blank page, and again if you go through checkout without being logged in on step 1? it goes blank as well (though fine if logged in).

Anyideas?

Regards B)

Link to comment
Share on other sites

Hi, heres the two files :D Regards!

cart.inc.php out of include/content/

<?php

/*

+--------------------------------------------------------------------------

|   CubeCart v3.0.5

|   ========================================

|   by Alistair Brookbanks

|	CubeCart is a Trade Mark of Devellion Limited

|   (c) 2005 Devellion Limited

|   Devellion Limited,

|   Westfield Lodge,

|   Westland Green,

|   Little Hadham,

|   Nr Ware, HERTS.

|   SG11 2AL

|   UNITED KINGDOM

|   http://www.devellion.com

|	UK Private Limited Company No. 5323904

|   ========================================

|   Web: http://www.cubecart.com

|   Date: Thursday, 13 October 2005

|   Email: info (at) cubecart (dot) com

|	License Type: CubeCart is NOT Open Source Software and Limitations Apply 

|   Licence Info: http://www.cubecart.com/site/faq/license.php

+--------------------------------------------------------------------------

|	cart.inc.php

|   ========================================

|	Core Checkout & Cart Pages	

+--------------------------------------------------------------------------

*/



if(!isset($config)){

	echo "<html>\r\n<head>\r\n<title>Forbidden 403</title>\r\n</head>\r\n<body><h3>Forbidden 403</h3>\r\nThe document you are requesting is forbidden.\r\n</body>\r\n</html>";

	exit;

}



require_once("classes/cart.php");

$cart = new cart();

$basket = $cart->cartContents($ccUserData[0]['basket']);



//////////////////////////////////////////////////////

// SO: FIX TO MAKE SURE BASKET FLOW PROCESS IS CORRECT

//////////////////////////////////////////////////////



if($_GET['act']=="cart") {

   

    $basket = $cart->setVar(1,"currentStep");

    $basket = $cart->setVar(2,"stepLimit");

   

} if($_GET['act']=="step2") {



    if(isset($basket['stepLimit']) && $basket['stepLimit']<2) {

        header("Location: cart.php?act=step".$basket['currentStep']);

        exit;

    }

    $basket = $cart->setVar(2,"currentStep");

    $basket = $cart->setVar(3,"stepLimit");



} elseif($_GET['act']=="step3") {



    if(isset($basket['stepLimit']) && $basket['stepLimit']<3) {

        header("Location: cart.php?act=step".$basket['currentStep']);

        exit;

    }

    $basket = $cart->setVar(3,"currentStep");

    $basket = $cart->setVar(4,"stepLimit");

   

} elseif($_GET['act']=="step4") {



    if(isset($basket['stepLimit']) && $basket['stepLimit']<4){

        header("Location: cart.php?act=step".$basket['currentStep']);

        exit;

    }

    $basket = $cart->setVar(4,"currentStep");

    $basket = $cart->setVar(5,"stepLimit");

   

}



//////////////////////////////////////////////////////

// EO: FIX TO MAKE SURE BASKET FLOW PROCESS IS CORRECT

//////////////////////////////////////////////////////





if(isset($_POST['shipping'])){



	$basket = $cart->setVar($_POST['shipping'],"shipCost");

	$headerLoc = "step4";



} elseif(isset($_POST['delInf'])){

	

	$basket = $cart->setVar($_POST['delInf'],"delInf");

	$headerLoc = "step4";

	

}



function headerRedir() {



	global $headerLoc;



	if(isset($headerLoc) && !empty($headerLoc)) {

  

  header("Location: cart.php?act=".$headerLoc);

	

	} elseif(isset($_GET['act']) && !empty($_GET['act'])){

  

  header("Location: cart.php?act=".$_GET['act']);

	

	} else {

  

  header("Location: cart.php?act=step2");

	

	}

	exit;



}



if(isset($_GET['remove'])){

	

	$basket = $cart->remove($_GET['remove']);

	headerRedir();

	

} elseif(isset($_POST['quan'])){

	

	foreach($_POST['quan'] as $key => $value){

  

  $basket = $cart->update($key,$value);



	}

	

	headerRedir();



} elseif(isset($_GET['mode']) && $_GET['mode']=="emptyCart"){

	

	$basket = $cart->emptyCart();

	

	headerRedir();



} elseif(isset($_POST['productCode']) && !empty($_POST['productCode'])) {

	

	$result = $db->select("SELECT productId FROM ".$glob['dbprefix']."CubeCart_inventory WHERE productCode = ".$db->mySQLSafe($_POST['productCode']));

	

	if($result == TRUE) {

  

  // check for product options (if so go to view product page)

  $noOpts = $db->numrows("SELECT product FROM ".$glob['dbprefix']."CubeCart_options_bot WHERE product = ".$db->mySQLSafe($result[0]['productId']));

  

  if($noOpts>0){

  

 	 header("Location: index.php?act=viewProd&productId=".$result[0]['productId']);

 	 exit;

  

  } else {

 	 $basket = $cart->add($result[0]['productId'],1,"");

 	 headerRedir();

  

  }

	

	}



}



$view_cart = new XTemplate ("skins/".$config['skinDir']."/styleTemplates/content/cart.tpl");

$view_cart->assign("VAL_SKIN",$config['skinDir']);

$view_cart->assign("LANG_VIEW_CART",$lang['front']['cart']['view_cart']);

$view_cart->assign("LANG_CART",$lang['front']['cart']['cart']);

$view_cart->assign("LANG_ADDRESS",$lang['front']['cart']['address']);

$view_cart->assign("LANG_PAYMENT",$lang['front']['cart']['payment']);

$view_cart->assign("LANG_COMPLETE",$lang['front']['cart']['complete']);

$view_cart->assign("LANG_ADD_PRODCODE",$lang['front']['cart']['add_more']);

$view_cart->assign("LANG_ADD",$lang['front']['cart']['add']);

$view_cart->assign("LANG_QTY",$lang['front']['cart']['qty']);

$view_cart->assign("LANG_PRODUCT",$lang['front']['cart']['product']);

$view_cart->assign("LANG_CODE",$lang['front']['cart']['code']);

$view_cart->assign("LANG_STOCK",$lang['front']['cart']['stock']);

$view_cart->assign("LANG_PRICE",$lang['front']['cart']['price']);

$view_cart->assign("LANG_LINE_PRICE",$lang['front']['cart']['line_price']);

$view_cart->assign("LANG_DELETE",$lang['front']['cart']['delete']);

$view_cart->assign("LANG_REMOVE_ITEM",$lang['front']['cart']['remove']);



if($_GET['act']=="cart"){

	$view_cart->assign("CLASS_STEP2","class='txtcartProgressCurrent'");

	$view_cart->assign("CONT_VAL","cart.php?act=step1");



} elseif($_GET['act']=="step2"){

	

	$view_cart->assign("CLASS_STEP2","class='txtcartProgressCurrent'");

	$view_cart->assign("CONT_VAL","cart.php?act=step3");



} elseif($_GET['act']=="step3" OR $_GET['act']=="step4"){



	$view_cart->assign("CLASS_STEP3","class='txtcartProgressCurrent'");

	

	$view_cart->assign("LANG_INVOICE_ADDRESS",$lang['front']['cart']['invoice_address']);

	$view_cart->assign("LANG_DELIVERY_ADDRESS",$lang['front']['cart']['delivery_address']);

	

	$view_cart->assign("TXT_TITLE",$lang['front']['cart']['title']);

	$view_cart->assign("TXT_FIRST_NAME",$lang['front']['cart']['first_name']);

	$view_cart->assign("TXT_LAST_NAME",$lang['front']['cart']['last_name']);

	$view_cart->assign("TXT_ADD_1",$lang['front']['cart']['address2']);

	$view_cart->assign("TXT_ADD_2","");

	$view_cart->assign("TXT_TOWN",$lang['front']['cart']['town']);

	$view_cart->assign("TXT_COUNTY",$lang['front']['cart']['county']);

	$view_cart->assign("TXT_POSTCODE",$lang['front']['cart']['postcode']);

	$view_cart->assign("TXT_COUNTRY",$lang['front']['cart']['country']);

	

	// stick in delivery details

	

	if(isset($basket['delInf'])){

  

  $view_cart->assign("VAL_DEL_TITLE",$basket['delInf']['title']);

  $view_cart->assign("VAL_DEL_FIRST_NAME",$basket['delInf']['firstName']);

  $view_cart->assign("VAL_DEL_LAST_NAME",$basket['delInf']['lastName']);

  $view_cart->assign("VAL_DEL_ADD_1",$basket['delInf']['add_1']);

  $view_cart->assign("VAL_DEL_ADD_2",$basket['delInf']['add_2']);

  $view_cart->assign("VAL_DEL_TOWN",$basket['delInf']['town']);

  $view_cart->assign("VAL_DEL_COUNTY",$basket['delInf']['county']);

  $view_cart->assign("VAL_DEL_POSTCODE",$basket['delInf']['postcode']);

  $view_cart->assign("VAL_DEL_COUNTRY",countryName($basket['delInf']['country']));

	

	} else {

	

  $view_cart->assign("VAL_DEL_TITLE",$ccUserData[0]['title']);

  $view_cart->assign("VAL_DEL_FIRST_NAME",$ccUserData[0]['firstName']);

  $view_cart->assign("VAL_DEL_LAST_NAME",$ccUserData[0]['lastName']);

  $view_cart->assign("VAL_DEL_ADD_1",$ccUserData[0]['add_1']);

  $view_cart->assign("VAL_DEL_ADD_2",$ccUserData[0]['add_2']);

  $view_cart->assign("VAL_DEL_TOWN",$ccUserData[0]['town']);

  $view_cart->assign("VAL_DEL_COUNTY",$ccUserData[0]['county']);

  $view_cart->assign("VAL_DEL_POSTCODE",$ccUserData[0]['postcode']);

  $view_cart->assign("VAL_DEL_COUNTRY",countryName($ccUserData[0]['country']));

	

	} 



	// stick in invoice details

	$view_cart->assign("VAL_TITLE",$ccUserData[0]['title']);

	$view_cart->assign("VAL_FIRST_NAME",$ccUserData[0]['firstName']);

	$view_cart->assign("VAL_LAST_NAME",$ccUserData[0]['lastName']);

	$view_cart->assign("VAL_ADD_1",$ccUserData[0]['add_1']);

	$view_cart->assign("VAL_ADD_2",$ccUserData[0]['add_2']);

	$view_cart->assign("VAL_TOWN",$ccUserData[0]['town']);

	$view_cart->assign("VAL_COUNTY",$ccUserData[0]['county']);

	$view_cart->assign("VAL_POSTCODE",$ccUserData[0]['postcode']);

	$view_cart->assign("VAL_COUNTRY",countryName($ccUserData[0]['country']));

	

	$view_cart->assign("LANG_CHANGE_INV_ADD",$lang['front']['cart']['edit_invoice_address']);

	$view_cart->assign("VAL_BACK_TO",$_GET['act']);



} 



if($_GET['act']=="step3") {



	

	if($config['shipAddressLock'] == 1){

	

  $delInf['title'] = $ccUserData[0]['title'];

  $delInf['firstName'] = $ccUserData[0]['firstName'];

  $delInf['lastName'] = $ccUserData[0]['lastName'];

  $delInf['add_1'] = $ccUserData[0]['add_1'];

  $delInf['add_2'] = $ccUserData[0]['add_2'];

  $delInf['town'] = $ccUserData[0]['town'];

  $delInf['county'] = $ccUserData[0]['county'];

  $delInf['postcode'] = $ccUserData[0]['postcode'];

  $delInf['country'] = $ccUserData[0]['country'];

  

  $basket = $cart->setVar($delInf,"delInf");

  header("Location: cart.php?act=step4");

  exit;

	

	}

	

	

	$view_cart->assign("CONT_VAL","javascript:submitDoc('cart');");

	

	$countries = $db->select("SELECT id, printable_name FROM ".$glob['dbprefix']."CubeCart_iso_countries ORDER BY printable_name"); 



	for($i=0; $i<count($countries); $i++){



  

 	 if(($countries[$i]['id'] == $basket['delInf']['country']) || ($countries[$i]['id']==$ccUserData[0]['country'] && !isset($basket['delInf']['country']))){

    

    $view_cart->assign("COUNTRY_SELECTED","selected='selected'");

 	 

 	 } else {

    

    $view_cart->assign("COUNTRY_SELECTED","");

 	 

 	 }

  

 	 $view_cart->assign("VAL_DEL_COUNTRY_ID",$countries[$i]['id']);

	

 	 $countryName = "";

 	 $countryName = $countries[$i]['printable_name'];

	

 	 if(strlen($countryName)>20){

	

    $countryName = substr($countryName,0,20)."&hellip;";

	

 	 }

	

 	 $view_cart->assign("VAL_DEL_COUNTRY_NAME",$countryName);

 	 

 	 $view_cart->parse("view_cart.cart_true.step_3.country_opts");

  

  }

	

  $view_cart->parse("view_cart.cart_true.step_3");

	

	



} elseif($_GET['act']=="step4") {



	if($config['shipAddressLock'] == 0){

	

	$view_cart->assign("LANG_CHANGE_DEL_ADD",$lang['front']['cart']['edit_delivery_address']);

	$view_cart->parse("view_cart.cart_true.step_4.edit_btn");

	

	}

	$view_cart->assign("CONT_VAL","cart.php?act=step5");

	

	$view_cart->parse("view_cart.cart_true.step_4");



}



if($basket['conts'] == TRUE) {



	$tax = 0;

	$taxCustomer = 0;

	// work out if customer is obliged to pay tax or not

	if($ccUserData[0]['country']==$config['taxCountry']){

	

  if($config['taxCounty']==0){

 	 // tax customer

 	 $taxCustomer = 1;

  } elseif($config['taxCounty']==$ccUserData[0]['zoneId']){

 	 // tax customer

 	 $taxCustomer = 1;

  }

	

	}

	

	$totalWeight = "";

	$i = 0;

	$subTotal = 0;

	$shipCost = 0;

	$grandTotal = 0;

	

	foreach($basket['conts'] as $key => $value){

  

  $i++;

  $productId = $cart->getProductId($key);

  // get product details

  

  // if shipping by category is enabled we need to get the values too

  $module = fetchDbConfig("Per_Category");

  $shipByCat = $module['status'];

  

  $extraJoin = "";

  

  if($shipByCat==1 && $_GET['act']=="step4"){

 	 $extraJoin = "INNER JOIN ".$glob['dbprefix']."CubeCart_category ON ".$glob['dbprefix']."CubeCart_inventory.cat_id = ".$glob['dbprefix']."CubeCart_category.cat_id";

  }

  

  $product = $db->select("SELECT * FROM ".$glob['dbprefix']."CubeCart_inventory INNER JOIN ".$glob['dbprefix']."CubeCart_taxes ON ".$glob['dbprefix']."CubeCart_taxes.id = taxType ".$extraJoin." WHERE productId=".$db->mySQLSafe($productId));

  

  // FIX FOR DELETED TAX BANDS PRE 3.0.5

  if($product == FALSE){

  

 	 $product = $db->select("SELECT * FROM ".$glob['dbprefix']."CubeCart_inventory WHERE productId=".$db->mySQLSafe($productId));

 	 $product[0]['percent'] = 0;

  

  }

  

  if(($val = prodAltLang($product[0]['productId'])) == TRUE){

 	 

 	 $product[0]['name'] = $val['name'];

  

  }

	

  $view_cart->assign("TD_CART_CLASS",cellColor($i, $tdEven="tdcartEven", $tdOdd="tdcartOdd"));



  $view_cart->assign("VAL_PRODUCT_ID",$productId);

  $view_cart->assign("VAL_CURRENT_STEP",$_GET['act']);

  $view_cart->assign("VAL_PRODUCT_KEY",$key);

  

  if(empty($product[0]["image"])){

 	 

 	 $view_cart->assign("VAL_IMG_SRC","skins/".$config['skinDir']."/styleImages/thumb_nophoto.gif");

  

  } else {

  

 	 $view_cart->assign("VAL_IMG_SRC","images/uploads/thumbs/thumb_".$product[0]["image"]);

  

  }

  

  

  // only calculate shipping IF the product is tangible

  if($product[0]["digital"]==0){

 	 $orderTangible = TRUE;

  }

  

  $view_cart->assign("VAL_PRODUCT_NAME",htmlspecialchars($product[0]["name"]));

  $view_cart->assign("VAL_PRODUCT_CODE",$product[0]["productCode"]);  

  

  // build the product options

  $optionKeys = $cart->getOptions($key);

  

  $optionsCost = 0;

  $plainOpts = "";

  

  if(!empty($optionKeys)){

  

 	 $options = explode(".",$optionKeys);

 	 

 	 foreach($options as $value)

 	 {

    // look up options in database

    $option = $db->select("SELECT ".$glob['dbprefix']."CubeCart_options_bot.option_id, ".$glob['dbprefix']."CubeCart_options_bot.value_id, option_price, option_symbol, value_name, option_name, assign_id FROM `".$glob['dbprefix']."CubeCart_options_bot` INNER JOIN `".$glob['dbprefix']."CubeCart_options_mid` ON ".$glob['dbprefix']."CubeCart_options_mid.value_id = ".$glob['dbprefix']."CubeCart_options_bot.value_id INNER JOIN `".$glob['dbprefix']."CubeCart_options_top` ON ".$glob['dbprefix']."CubeCart_options_bot.option_id = ".$glob['dbprefix']."CubeCart_options_top.option_id WHERE assign_id = ".$value);

     

    $view_cart->assign("VAL_OPT_NAME",htmlspecialchars($option[0]['option_name']));

    $view_cart->assign("VAL_OPT_VALUE",$option[0]['value_name']);

    

    $plainOpts .= $option[0]['option_name']." - ".$option[0]['value_name']."\r\n";

    

    if($option[0]['option_price']>0){ 

   	 

   	 if($option[0]['option_symbol']=="+"){

    

      $optionsCost = $optionsCost + $option[0]['option_price'];

 	 

   	 } elseif($option[0]['option_symbol']=="-"){

 	 

      $optionsCost = $optionsCost - $option[0]['option_price'];

 	 

   	 } elseif($option[0]['option_symbol']=="~"){

   	 

      $optionsCost = 0;

   	 

   	 }

   	 

    }

    $view_cart->parse("view_cart.cart_true.repeat_cart_contents.options");

 	 }

 	 

  }

	

  if($product[0]["useStockLevel"]==1){

 	 

 	 $view_cart->assign("VAL_INSTOCK",$product[0]["stock_level"]);

  

  } else {

  

 	 $view_cart->assign("VAL_INSTOCK","&infin;");

  

  }

  

  if(($config['outofstockPurchase']==1) && ($product[0]["stock_level"]<$cart->cartArray['conts'][$key]["quantity"]) && ($product[0]["useStockLevel"]==1)) {

  

 	 $view_cart->assign("VAL_STOCK_WARN",$lang['front']['cart']['stock_warn']);

 	 

 	 $quantity = $cart->cartArray['conts'][$key]["quantity"];

 	 $view_cart->parse("view_cart.repeat_cart_contents.stock_warn");

  

  } elseif(($config['outofstockPurchase']==0) && ($product[0]["stock_level"]<$cart->cartArray['conts'][$key]["quantity"]) && ($product[0]["useStockLevel"]==1)) {

  

 	 $view_cart->assign("VAL_STOCK_WARN",$lang['front']['cart']['amount_capped']." ".$product[0]["stock_level"].".");

 	 

 	 $quantity = $product[0]["stock_level"];

 	 

 	 $basket = $cart->update($key,$quantity);

 	 

 	 $view_cart->parse("view_cart.cart_true.repeat_cart_contents.stock_warn");

  

  } else {

 	 

 	 $quantity = $cart->cartArray['conts'][$key]["quantity"];

  

  }

  

  $view_cart->assign("VAL_QUANTITY",$quantity);

  

  if(salePrice($product[0]['price'], $product[0]['sale_price'])==FALSE){

 	 

 	 $price = $product[0]['price'];

  

  } else {

 	 

 	 $price = salePrice($product[0]['price'], $product[0]['sale_price']);

  

  }

  

  $price = $price + ($optionsCost);

  

  if(isset($_GET['act']) && $_GET['act']!=="step4"){

 	 $view_cart->assign("TEXT_BOX_CLASS","textbox");

  }

  

  if(isset($_GET['act']) && $_GET['act']=="step4"){

 	 // set live vars for order inv and its the last step

 	 $view_cart->assign("QUAN_DISABLED","disabled");

 	 $view_cart->assign("TEXT_BOX_CLASS","textboxDisabled");

 	 $basket = $cart->setVar($productId,"productId","invArray",$i);

 	 $basket = $cart->setVar($product[0]['name'],"name","invArray",$i);

 	 $basket = $cart->setVar($product[0]['productCode'],"productCode","invArray",$i);

 	 $basket = $cart->setVar($plainOpts,"prodOptions","invArray",$i);

 	 $basket = $cart->setVar(sprintf("%.2f",$price*$quantity),"price","invArray",$i);

 	 $basket = $cart->setVar($quantity,"quantity","invArray",$i);

 	 $basket = $cart->setVar($product[0]['digital'],"digital","invArray",$i);

  }

  

  $view_cart->assign("VAL_IND_PRICE",priceFormat($price));

  

  $view_cart->assign("VAL_LINE_PRICE",priceFormat($price*$quantity));

  

  if($shipByCat==1 && $_GET['act']=="step4"){

 	 // calculate the line category shipping price

 	 include("modules/shipping/Per_Category/line.inc.php");

  

  }

  

  $subTotal = $subTotal + ($price * $quantity);

  

  $view_cart->parse("view_cart.cart_true.repeat_cart_contents");

  

  // work out weight

  if($product[0]['prodWeight']>0 && $product[0]['digital']==0){

  

  $totalWeight = ($product[0]['prodWeight'] * $quantity) + $totalWeight;

  

  }

  

  // work out tax

  if($config['priceIncTax']==0 && $taxCustomer==1){

  

 	 $lineTax = ($product[0]['percent'] / 100) * ($price * $quantity);

 	 $tax = $tax + $lineTax;

  

  }



	}

	

	// calculate shipping when we have reached step4 or over

	

	if($_GET['act']=="step4" && $orderTangible==TRUE) {



  $shippingModules = $db->select("SELECT folder FROM ".$glob['dbprefix']."CubeCart_Modules WHERE module='shipping' AND status = 1");

  

  $noItems = $cart->noItems();

  $sum = 0;



  if($shippingModules == TRUE){

 	 

 	 $shippingPrice = "<select name='shipping' onchange=\"submitDoc('cart');\">";

 	 

 	 $shipKey = 0;

 	 

 	 // if selected key has not been set, set it 

 	 if(isset($_GET['s']) && $_GET['s']==1) {

 	 

    $basket = $cart->setVar(1,"shipKey");

 	 

 	 } elseif(isset($_POST['shipping']) && $_POST['shipping']>0) {

 	 

    $basket = $cart->setVar($_POST['shipping'],"shipKey");

 	 

 	 } elseif(!isset($basket['shipKey'])) {

 	 

    $basket = $cart->setVar(1,"shipKey");

 	 

 	 }

 	 

 	 for($i=0; $i<count($shippingModules); $i++){

    

    $shipKey++;

     

    

    include("modules/shipping/".$shippingModules[$i]['folder']."/calc.php"); 

 	 

 	 }

 	 

 	 if($basket['shipKey']>$shipKey){

 	 header("Location: cart.php?act=step4&s=1");

 	 }

  

 	 $shippingPrice .= "</select>";

 	 

  } else {

 	 

 	 $shippingPrice .= "<select name='shipping' onchange=\"submitDoc('cart');\">\r\n<option value='0.00'>".$lang['front']['cart']['free_shipping']."</option>\r\n</select>";

 	 $basket = $cart->setVar($lang['front']['cart']['free_shipping'],"shipMethod");

  

  }

  

  

	} elseif($_GET['act']=="step4"){

	

  $shippingPrice = "<select name='shipping'><option value='0.00'>".$lang['front']['cart']['free_shipping']."</option></select>";

  $basket = $cart->setVar($lang['front']['cart']['free_shipping'],"shipMethod");

	

	} else {

	

  $shippingPrice = $lang['front']['cart']['na'];

	

	}

	

	$view_cart->assign("LANG_SHIPPING",$lang['front']['cart']['shipping']);

	

	$view_cart->assign("VAL_SHIPPING",$shippingPrice);

	

	$view_cart->assign("LANG_TAX",$lang['front']['cart']['tax']);

	

	if($tax>0){

  

  $view_cart->assign("VAL_TAX",priceFormat($tax));

	

	} else {

  

  $view_cart->assign("VAL_TAX",$lang['front']['cart']['na']);

	

	}



	$view_cart->assign("LANG_SUBTOTAL",$lang['front']['cart']['subtotal']);

	$view_cart->assign("VAL_SUBTOTAL",priceFormat($subTotal));

	

	$grandTotal = $subTotal + $tax + $basket['shipCost'];

	

	$view_cart->assign("LANG_CART_TOTAL",$lang['front']['cart']['cart_total']);

	$view_cart->assign("VAL_CART_TOTAL",priceFormat($grandTotal));

	

	if(isset($_GET['act']) && $_GET['act']=="step4"){

  

  // build array of price vars in session data

  $basket = $cart->setVar(sprintf("%.2f",$subTotal),"subTotal");

  $basket = $cart->setVar(sprintf("%.2f",$tax),"tax");

  $basket = $cart->setVar(sprintf("%.2f",$grandTotal),"grandTotal");

	

	}

	

	

	$view_cart->assign("LANG_UPDATE_CART_DESC",$lang['front']['cart']['if_changed_quan']);

	

	$view_cart->assign("LANG_UPDATE_CART",$lang['front']['cart']['update_cart']);

	

	$view_cart->assign("LANG_CHECKOUT",$lang['front']['cart']['continue']);

	

	$view_cart->assign("VAL_FORM_ACTION",currentPage());

	

	$view_cart->parse("view_cart.cart_true");

	

} else {



	$view_cart->assign("LANG_CART_EMPTY",$lang['front']['cart']['cart_empty']);

	$view_cart->parse("view_cart.cart_false");



} 

$view_cart->parse("view_cart");

$page_content = $view_cart->text("view_cart");

?>










cart.tpl


<!-- BEGIN: view_cart -->

<div class="boxContent">

 	 <span class="txtContentTitle">{LANG_VIEW_CART}</span>



<p><table width="100%" border="0" cellspacing="0" cellpadding="3" bgcolor="#F9F9F9" style='border: 1px dashed #DBDBDB'>

  <tr>

    <td><font color="#CC3300"><strong>Customer Notice </strong></font>- If you have any shop anomalies during checkout e.g. such as TAX/VAT being added to the total order, please contact us directly by emailing <a href="mailto:[email protected]">[email protected]</a>,

      or phoning <strong>01288 331748</strong>.</td>

  </tr>

</table><br>



 	 <div style="text-align: center; height: 25px;">

    <div class="cartProgress">

    <span {CLASS_STEP2}>{LANG_CART}</span> --- <span {CLASS_STEP3}>{LANG_ADDRESS}</span> --- {LANG_PAYMENT} --- {LANG_COMPLETE}

    </div>

 	 </div>

 	 <form action="{VAL_FORM_ACTION}" method="post" class="quickBuy" style="padding: 4px;">

     {LANG_ADD_PRODCODE}

     <input name="productCode" type="text" size="5" class="textbox" /> <input name="submit" type="submit" class="submit" value="{LANG_ADD}" /></form>

     <!-- BEGIN: cart_false -->

     <p>{LANG_CART_EMPTY}</p>

     <!-- END: cart_false -->

     <!-- BEGIN: cart_true -->

     <form name="cart" method="post" id="cart" action="{VAL_FORM_ACTION}">

     <!-- BEGIN: step_3 -->

     <table width="100%"  border="0" cellspacing="0" cellpadding="3" style="margin-bottom: 10px;">

     <tr>

    <td width="50%" class="tdcartTitle">{LANG_INVOICE_ADDRESS}</td>

    <td colspan="2" class="tdcartTitle">{LANG_DELIVERY_ADDRESS}</td>

    </tr>

     <tr>

    <td width="50%">{VAL_TITLE} {VAL_FIRST_NAME} {VAL_LAST_NAME}</td>

    <td><strong>{TXT_TITLE}</strong></td>

    <td><input name="delInf[title]" type="text" class="textbox" id="title" value="{VAL_DEL_TITLE}" size="7" maxlength="30" /></td>

     </tr>

     <tr>

       <td>{VAL_ADD_1}</td>

       <td><strong>{TXT_FIRST_NAME}</strong></td>

       <td><input name="delInf[firstName]" type="text" class="textbox" id="firstName" value="{VAL_DEL_FIRST_NAME}" maxlength="100" /></td>

       </tr>

     <tr>

       <td>{VAL_ADD_2}</td>

       <td><strong>{TXT_LAST_NAME}</strong></td>

       <td><input name="delInf[lastName]" type="text" class="textbox" id="lastName" value="{VAL_DEL_LAST_NAME}" maxlength="100" /></td>

       </tr>

     <tr>

       <td width="50%">{VAL_TOWN}</td>

       <td><strong>{TXT_ADD_1}</strong></td>

       <td><input name="delInf[add_1]" type="text" class="textbox" id="add_1" value="{VAL_DEL_ADD_1}" maxlength="100" /></td>

     </tr>

     <tr>

       <td width="50%">{VAL_COUNTY}, {VAL_POSTCODE}</td>

       <td><strong>{TXT_ADD_2}</strong></td>

       <td><input name="delInf[add_2]" type="text" class="textbox" id="add_2" value="{VAL_DEL_ADD_2}" maxlength="100" /></td>

     </tr>

     <tr>

       <td width="50%">{VAL_COUNTRY}</td>

       <td><strong>{TXT_TOWN}</strong></td>

       <td><input name="delInf[town]" type="text" class="textbox" id="town" value="{VAL_DEL_TOWN}" maxlength="100" /></td>

     </tr>

     <tr>

       <td width="50%" rowspan="3" align="left" valign="bottom"><a href="index.php?act=profile&amp;f={VAL_BACK_TO}" class="txtUpdate">{LANG_CHANGE_INV_ADD}</a></td>

       <td><strong>{TXT_COUNTY}</strong></td>

       <td><input name="delInf[county]" type="text" class="textbox" id="county" value="{VAL_DEL_COUNTY}" maxlength="100" /></td>

     </tr>

     <tr>

       <td><strong>{TXT_POSTCODE}</strong></td>

       <td><input name="delInf[postcode]" type="text" class="textbox" id="postcode" value="{VAL_DEL_POSTCODE}" maxlength="100" /></td>

     </tr>

     <tr>

       <td><strong>{TXT_COUNTRY}</strong></td>

       <td><select name="delInf[country]" id="country" class="textbox">

                  <!-- BEGIN: country_opts -->

                  <option value="{VAL_DEL_COUNTRY_ID}" {COUNTRY_SELECTED}>{VAL_DEL_COUNTRY_NAME}</option>

                  <!-- END: country_opts -->

                </select></td>

     </tr>

 	 </table>

 	 <!-- END: step_3 -->

 	 <!-- BEGIN: step_4 -->

     <table width="100%"  border="0" cellspacing="0" cellpadding="3" style="margin-bottom: 10px;">

     <tr>

    <td width="50%" class="tdcartTitle">{LANG_INVOICE_ADDRESS}</td>

    <td class="tdcartTitle">{LANG_DELIVERY_ADDRESS}</td>

    </tr>

     <tr>

    <td width="50%">{VAL_TITLE} {VAL_FIRST_NAME} {VAL_LAST_NAME}</td>

    <td>{VAL_DEL_TITLE} {VAL_DEL_FIRST_NAME} {VAL_DEL_LAST_NAME}</td>

    </tr>

     <tr>

       <td>{VAL_ADD_1}</td>

       <td>{VAL_DEL_ADD_1}</td>

       </tr>

     <tr>

       <td>{VAL_ADD_2}</td>

       <td>{VAL_DEL_ADD_2}</td>

       </tr>

     <tr>

       <td width="50%">{VAL_TOWN}</td>

       <td>{VAL_DEL_TOWN}</td>

       </tr>

     <tr>

       <td width="50%">{VAL_COUNTY}, {VAL_POSTCODE}</td>

       <td>{VAL_DEL_COUNTY}, {VAL_DEL_POSTCODE}</td>

       </tr>

     <tr>

       <td width="50%">{VAL_COUNTRY}</td>

       <td>{VAL_DEL_COUNTRY}</td>

       </tr>

     <tr>

       <td width="50%"><a href="index.php?act=profile&amp;f={VAL_BACK_TO}" class="txtUpdate">{LANG_CHANGE_INV_ADD}</a></td>

       <td>

    <!-- BEGIN: edit_btn -->

    <a href="cart.php?act=step3" class="txtUpdate">{LANG_CHANGE_DEL_ADD}</a>

    <!-- END: edit_btn -->

    </td>

     </tr>

 	 </table>

 	 <!-- END: step_4 -->

 	 <table width="100%" border="0" cellpadding="3" cellspacing="0">

    <tr>

   	 <td class="tdcartTitle">&nbsp;</td>

   	 <td align="center" class="tdcartTitle">{LANG_QTY}</td>

   	 <td align="center" class="tdcartTitle">&nbsp;</td>

   	 <td class="tdcartTitle">{LANG_PRODUCT}</td>

   	 <td align="center" class="tdcartTitle">{LANG_CODE}</td>

   	 <td align="center" class="tdcartTitle">{LANG_STOCK}</td>

   	 <td class="tdcartTitle" align="right">{LANG_PRICE}</td>

   	 <td width="80" align="right" nowrap='nowrap' class="tdcartTitle">{LANG_LINE_PRICE}</td>

    </tr>

    <!-- BEGIN: repeat_cart_contents -->

    <tr>

   	 <td align="center" class="{TD_CART_CLASS}"><a href="cart.php?act={VAL_CURRENT_STEP}&amp;remove={VAL_PRODUCT_KEY}"><img src="skins/{VAL_SKIN}/styleImages/del.gif" alt="{LANG_DELETE}" width="12" height="12" border="0" /></a></td>

   	 <td align="center" class="{TD_CART_CLASS}"><input name="quan[{VAL_PRODUCT_KEY}]" type="text" value="{VAL_QUANTITY}" size="2" class="{TEXT_BOX_CLASS}" style="text-align:center;" {QUAN_DISABLED} /></td>

   	 <td align="center" class="{TD_CART_CLASS}"><img src="{VAL_IMG_SRC}" /></td>

   	 <td class="{TD_CART_CLASS}">

   	 {VAL_PRODUCT_NAME}

   	 <!-- BEGIN: options -->

   	 <br /><strong>{VAL_OPT_NAME}</strong>: {VAL_OPT_VALUE} 

   	 <!-- END: options -->

   	 </td>

   	 <td align="center" class="{TD_CART_CLASS}">{VAL_PRODUCT_CODE}</td>

   	 <td align="center" class="{TD_CART_CLASS}">{VAL_INSTOCK}</td>

   	 <td align="right" class="{TD_CART_CLASS}">{VAL_IND_PRICE}</td>

   	 <td width="80" align="right" class="{TD_CART_CLASS}">{VAL_LINE_PRICE}</td>

    </tr>

    <!-- BEGIN: stock_warn -->

    <tr>

      <td align="center" class="{TD_CART_CLASS}">&nbsp;</td>

      <td colspan="7" align="left" class="{TD_CART_CLASS}"><span class="txtStockWarn">{VAL_STOCK_WARN}</span></td>

      </tr>

    <!-- END: stock_warn -->

    <!-- END: repeat_cart_contents -->

    <tr>

   	 <td align="center" class="tdCartSubTotal"><img src="skins/{VAL_SKIN}/styleImages/del.gif" alt="{LANG_DELETE}" width="12" height="12" /></td>

   	 <td colspan="5" class="tdCartSubTotal">- {LANG_REMOVE_ITEM}</td>

   	 <td align="right" class="tdCartSubTotal">{LANG_SUBTOTAL}</td>

   	 <td width="80" align="right" class="tdCartSubTotal">{VAL_SUBTOTAL}</td>

    </tr>

    <tr>

      <td colspan="7" align="right">{LANG_TAX}</td>

      <td width="80" align="right">{VAL_TAX}</td>

     </tr>

     </table>

     

     <table width="100%"  border="0" cellspacing="0" cellpadding="3">

    <tr>

      <td align="right">{LANG_SHIPPING}</td>

      <td width="80" align="right">{VAL_SHIPPING}</td>

     </tr>

     </table>

     <table width="100%"  border="0" cellspacing="0" cellpadding="3">

    <tr>

   	 <td align="right"><strong>{LANG_CART_TOTAL}</strong></td>

   	 <td width="80" align="right"><strong>{VAL_CART_TOTAL}</strong></td>

    </tr>

    </table>

<div style="float: left; line-height: 22px; margin-bottom: 3px;"><a href="javascript:submitDoc('cart');" class="txtUpdate">{LANG_UPDATE_CART}</a> {LANG_UPDATE_CART_DESC}</div><div style="text-align: right; margin-top: 4px; margin-bottom: 3px;"><a href="{CONT_VAL}" class="txtCheckout">{LANG_CHECKOUT}</a></div>

</form>

 	 <!-- END: cart_true -->

</div>

<!-- END: view_cart -->

Link to comment
Share on other sites

Guest jbdancer

@ first sight don't find any probs with it.

can you try to upload the cart.tpl and cart.inc.php from version 3.0.4 to see if this works out ok for ya .

Link to comment
Share on other sites

@ first sight don't find any probs with it.

can you try to upload the cart.tpl and cart.inc.php from version 3.0.4 to see if this works out ok for ya .

Hi, thanks. Ive tried uploading the older 3.04 version of cart.inc.php & cart.tpl and still have the same problems. Its fine aslong as the customer is already logged in, e.g. just after registration.

Regards

Link to comment
Share on other sites

Guest jbdancer

You upgraded from 3.0.4 to 3.0.5 ? Or new install from 3.0.5 ?

recently i had also problems with the add to cart thing.

Did a new install off 3.0.5 then no probs anymore

Link to comment
Share on other sites

You upgraded from 3.0.4 to 3.0.5 ? Or new install from 3.0.5 ?

recently i had also problems with the add to cart thing.

Did a new install off 3.0.5 then no probs anymore

Fresh install of CC3.05, then I simply transfered products etc from CC3.04 by phpmyadmin.

It only appears to be effecting to Login page, and I had the same issue when I tried it on my localhost.

Regards,

Link to comment
Share on other sites

Guest jbdancer

I did a complete reinstall for it , as i didn't have any products in them :rolleyes:

PM brooky about this one

Will do, thanks for the help! ;)

Regards,

Your welcome soz i couldn't help more

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...