Simple Show Basket

User submitted add-ons to PHPCart that are not included in the release.

Simple Show Basket

Postby Adam » 03-03-2005 11:12 AM

Is there a simple bit of code that I can insert somewhere within a page that will show the cart contents?

Eg. "You have 3 items in your basket"?

Thanks
Adam
Licensed
 
Posts: 8
Joined: 03-02-2005 09:29 AM

Postby bigtings » 10-10-2005 12:41 PM

Does anybody have a solution for this?

Or can someone at least point me in the right direction?

Cheers,

Andrew
bigtings
Licensed
 
Posts: 5
Joined: 10-06-2005 06:35 AM

Postby george » 10-10-2005 12:44 PM

PHP Cart and PHP Super Cart Support

Hosting Recommendation:
Image
george
Yup, I wrote it. Admin
 
Posts: 2634
Joined: 07-30-2004 03:11 PM

Definitive Solution

Postby welshandy » 08-12-2009 08:21 AM

Is there a definitive solution for this thread as I can't seem to get this working properly.

I get this when trying to include the mincart

Total Items = %%PRODUCTCOUNT%%
Cart Total = %%GRANDTOTAL%%

And the only solution that seems to work is the included iframe

<iframe src ="mycart/phpcart-display.php" width="100%" frameborder="0" scrolling="no" style="background-color: #F0EEE8;" allowtransparency="true" class="copyright" height="150">
</iframe>

This is fine but how can I style the text in the output from the iframe?

The phpcart-display file is encrypted so I can't exactly place my styling there, nor can I style the iframe with a class. Just doesn't seem to work.

So I am wondering what is the tried and tested way for implementing the minicart?
welshandy
Licensed
 
Posts: 2
Joined: 08-12-2009 05:59 AM

Postby welshandy » 08-13-2009 02:36 AM

Ok this works for me and I can format it easily now!

Code: Select all
<?
$fp = fopen ("mycart/sessions/".$_SESSION["sessionid"].".dat", "r");
//$data = fgetcsv ($fp, 250, "\t"); // skip coupon
while ($data = fgetcsv ($fp, 2000, "\t")) {
$CartTotal += ($data[2] * $data[3]);
$CartCount++;
}
$CartTotal = number_format($CartTotal, 2, '.', '');


echo "<div align='center'>Total Items = $CartCount</div><p>\n";
echo "<div align='center'>Cart Total = $CartTotal</div><p>\n";

?>
welshandy
Licensed
 
Posts: 2
Joined: 08-12-2009 05:59 AM


Return to Hacks & Modifications (Closed)

Who is online

Users browsing this forum: No registered users and 1 guest

cron