Forums / General Questions / cart - count_contents();?> item(s) - format($_SESSION['cart']->show_total());?>

cart - count_contents();?> item(s) - format($_SESSION['cart']->show_total());?>

Views: 2,233

Results 1 to 9 of 9
8 Dec 2012, 11:38 PM
#1
tod4life avatar

tod4life

New Zenner

Join Date:
Dec 2012
Posts:
10
Plugin Contributions:
0

cart - count_contents();?> item(s) - format($_SESSION['cart']->show_total());?>

Attachment 11605

**As you can see in the above pic for some reason the cart info is not showing correctly. First question is where do i find the file containing this info I can't seem to find it. second how would i fix this. The line reads shopping cart - count_contents();?> item(s) - format($_SESSION['cart']->show_total());?>
**
please help

23 Apr 2016, 5:48 AM
#3
jingjo avatar

jingjo

New Zenner

Join Date:
May 2011
Posts:
29
Plugin Contributions:
0

Re: cart - count_contents();?> item(s) - format($_SESSION['cart']->show_total());?>

Yep I'm having the same problem the line of code cart - count_contents();?> item(s) - format($_SESSION['cart']->show_total());?> is appearing right beside my shopping cart icon - anyone know how to fix this problem?

23 Apr 2016, 6:43 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: cart - count_contents();?> item(s) - format($_SESSION['cart']->show_total());?>

jingjo,

Same answer as previously provided - use the developers tool kit

Zen-Venom Get Bitten

23 Apr 2016, 8:13 AM
#5
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: cart - count_contents();?> item(s) - format($_SESSION['cart']->show_total());?>

After the section of code is located, need to use a standard tag to let the compiler know that PHP is coming next rather than a short tag.

So instead of say:

<?= format($_SESSION['cart']->show_total());?> 

Would want it to read something like:

<?php echo format($_SESSION['cart']->show_total());?>

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

23 Apr 2016, 10:53 AM
#6
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,721
Plugin Contributions:
56

Re: cart - count_contents();?> item(s) - format($_SESSION['cart']->show_total());?>

@tod4life: if this is a mod you've recently installed, please post a link to it so we can get it fixed. Thanks.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

23 Apr 2016, 1:35 PM
#7
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: cart - count_contents();?> item(s) - format($_SESSION['cart']->show_total());?>

This is actually built into the abbington_mega template

@mc12345678 is correct

in:

\includes\templates\abbington_mega\common\tpl_header.php

find:

<? echo $_SESSION['cart']->count_contents();?> <?php echo HEADER_TITLE_CART_ITEMS; ?> - <? echo $currencies->format($_SESSION['cart']->show_total());?>

change to:

<?php echo $_SESSION['cart']->count_contents();?> <?php echo HEADER_TITLE_CART_ITEMS; ?> - <?php echo $currencies->format($_SESSION['cart']->show_total());?>

mc12345678:

After the section of code is located, need to use a standard tag to let the compiler know that PHP is coming next rather than a short tag.

So instead of say:

<?= format($_SESSION['cart']->show_total());?>
> 
> Would want it to read something like:
> ```
<?php echo format($_SESSION['cart']->show_total());?>

swguy:

@tod4life: if this is a mod you've recently installed, please post a link to it so we can get it fixed. Thanks.

23 Apr 2016, 5:22 PM
#8
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,721
Plugin Contributions:
56

Re: cart - count_contents();?> item(s) - format($_SESSION['cart']->show_total());?>

@Tod4life Are you by chance using an older version of PHP? (You can see your version by clicking the version link on the upper right in admin.)

The currently supported version of PHP is 5.6 or above; you should not be using a lower version than this.

http://php.net/supported-versions.php

If you are, change it in CPanel (or get your hoster to do it if this configuration is unavailable to you).

If your hoster doesn't have PHP 5.6 or greater, get another hoster because the one you are using now doesn't care about security.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

24 Apr 2016, 4:36 AM
#9
jingjo avatar

jingjo

New Zenner

Join Date:
May 2011
Posts:
29
Plugin Contributions:
0

Re: cart - count_contents();?> item(s) - format($_SESSION['cart']->show_total());?>

kobra:

jingjo,

Same answer as previously provided - use the developers tool kit

Thanks kobra - i know how to use the developers tool kit and find the files where the code is. I was asking for a fix - mc12345678 & rbarbour kindly and quickly provided me with that. Thanks mc12345678 & rbarbour problem solved now.

Cheers