Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

altering the cart info box layout


mr_biggles

Recommended Posts

Posted

Hello all,

 

here is my file catalog/includes/boxes/shopping_cart.php

 

<?php
/*
 $Id: shopping_cart.php,v 1.18 2003/02/10 22:31:06 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2005 leisuret

 Released under the GNU General Public License
*/
?>
<!-- shopping_cart //-->
         
<?php


$cart_contents_string = '';

 $cart_contents_string = '';
 if ($cart->count_contents() > 0) {
   $cart_contents_string = '';
   $cart_contents_string .= '';
   $cart_contents_string = '';
   $products = $cart->get_products();
{
     
$cart_contents_string .= '';
$cart_contents_string .= '<b><u>My Shopping Basket</u></b> <a href="http://www.shop4beds.co.uk/catalog/shopping_cart.php">(view detail)</a><br><br>' . $cart->count_contents() . '';
 if ($cart->count_contents() > 1) { 
   $cart_contents_string .=' Items ';

    	 } else {
     
    	 $cart_contents_string .=' Item ';
     }
                   }
   
 $info_box_contents = array();
 $info_box_contents[] = array('text' => $cart_contents_string);

 if ($cart->count_contents() > 0) {
  if (preg_match("/checkout/", $PHP_SELF)) {
    $co_link = NULL;
  } else {
    $co_link = '   <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '"><b>Go to ' . HEADER_TITLE_CHECKOUT . ' >> </b></a>';
  }
  
  $info_box_contents[] = array('text' => $currencies->format($cart->show_total()) . $co_link);
}
$cart_contents_string .= '';
   } else {
     $cart_contents_string .= BOX_SHOPPING_CART_EMPTY;
   }
 
 new infoBox($info_box_contents);
?>
           
<!-- shopping_cart_eof //-->

 

you can take a look here : http://www.shop4beds.co.uk/catalog/

 

(cart is only visable after you add an item to it)

 

how do i get the line

1 Item

 

and the line

?289.00 Go to Checkout >>

 

all to display in one line, and add a lil bit of text to it? like this:

 

You have x Items in your basket, Total ?xxx.xx | Go to Checkout >>

 

Thanks in advance, I'm sure it's simple for you guys n gals but i have been playing with it for ages and can't figure it out!

 

Ian

Posted

I think you've inserted this code into the header.php file in place of the small icons and links to Shopping Cart, Login, My Account - and they occupied a fixed percentage of the width.

 

Your website is also taking forever to load onscreen, and if you look at it using 800x600 screen resolution your header looks really messed up.

 

Vger

Posted
I think you've inserted this code into the header.php file in place of the small icons and links to Shopping Cart, Login, My Account - and they occupied a fixed percentage of the width.

 

Your website is also taking forever to load onscreen, and if you look at it using 800x600 screen resolution your header looks really messed up.

 

Vger

 

 

Hi, Sorry, i should have said, i am using sts template thing-a-me-jobby for layout.

 

I found a post to get the search box stuff outta the infobox tables so i could put it where i wanted but i am unable to do it to the cart box!

 

Anyway, i have given up onit now and am gonna make do with the box, will alter colors etc. instead.

 

I am on a dial up conn here and it was loading ok for me earlier but my servers seem to be having a bad time, sometimes it loads fast even on dial up, other times at home it times out on a 2mb conn! Frickin servers!

 

Thanks for takin a look tho, and for the heads-up on the 800x600, hadn't even checked that yet ! lol

 

 

Cheers, Ian

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...