CodeCanyon

Simple PHP Shopping Cart

The checkout page shows old items until I refresh

On about line 794 of cart.php delete these 3 lines of php code:

    header("Cache-Control: private, max-age=10800, pre-check=10800");
    header("Pragma: private");
    header("Expires: " . date(DATE_RFC822,strtotime("+1 day")));

What’s the default password?

password

How to make the shipping address display all the time (ie: if you are providing free shipping)

If you have free shipping, the address field wont display. line 927 where you see this code:
if($cart_shipping){
change to this code:
if(true){ 
then line 1060 change this code:
if($cart_shipping){
to this code:
if(true){

The email sent to my customers only contains _SHOP_CUSTOMER_EMAIL

Add this code to the end of your cart.cfg.php file (using notepad or some php source editor):

define("_SHOP_CUSTOMER_EMAIL" , "<h1>SHOP_NAME</h1>
Hi FIRST_NAME,
Thank you for placing your order with SHOP_NAME.
CART_CONTENTS
BANK_DETAILS
We will confirm your order once payment is received.
Please contact us if you have any questions regarding your order.
Thank you");

Display cart total somewhere else.

Try this:

<?php 
// put this php code at the very top of your page, before anything else gets displayed.
if(!session_id())session_start(); 
$cart_products = isset($_SESSION['_simpleshop_cart_products']) ? $_SESSION['_simpleshop_cart_products'] : array();
$cart_sub_total = 0;
$cart_total = 0;
$cart_shipping = 0;
foreach($cart_products as $product_id => $product){
        $quantity = max(1,(int)$product['quantity']);
        $product_total = $product['price'] * $quantity;
        $cart_sub_total += $product_total;
        if(isset($product['product_settings']['shipping']) && $product['product_settings']['shipping']>0){
                $cart_shipping += $product['product_settings']['shipping'];
        }
}
$cart_total = $cart_sub_total + $cart_shipping;
?>
now you can display the cart total like this:
echo $cart_total;

I see PHP code on the page

Please contact your hosting provider to enable PHP short open tags

You must sign in or sign up to purchase this item.

$9Regular Licence

$9

Regular Licence a website (commercial, personal, client), or intranet site project - Details

$45Extended Licence

$45

Extended Licence a website template for sale (including on ThemeForest or ActiveDen) - Details

722 Purchases 183 Comments

Buyer Rating
12345 ( 114 ratings )
dtbaker

dtbaker

  • Has been a member for 2-3 years
  • Won a Competition
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Author had a File in an Envato Bundle
  • Community Moderator
  • Author had a Free File of the Month
  • Exclusive Author
  • Beta Tester
  • Sold between 250 000 and 1 000 000 dollars
  • Elite Author
  • Bought between 10 and 49 items
  • Australia
  • Referred between 200 and 499 users
View Portfolio
Created 22 February 10
Compatible Browsers FireFox 2, FireFox 3, IE6, IE7, IE8, Opera
Software Version PHP 5.x
Software Framework N/A
Files Included CSS, HTML, Layered PSD, PHP
by
by
by
by
by