Results 1 to 9 of 9
  1. #1
    Join Date
    Dec 2012
    Posts
    10
    Plugin Contributions
    0

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

    Name:  cart issue.jpg
Views: 674
Size:  58.1 KB


    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
    Last edited by tod4life; 9 Dec 2012 at 12:44 AM.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

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

    Zen-Venom Get Bitten

  3. #3
    Join Date
    May 2011
    Posts
    29
    Plugin Contributions
    0

    Default 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?
    Last edited by jingjo; 23 Apr 2016 at 06:50 AM. Reason: missed end of post

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default 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

  5. #5
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default 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:
    Code:
    <?= format($_SESSION['cart']->show_total());?>
    Would want it to read something like:
    Code:
    <?php echo format($_SESSION['cart']->show_total());?>
    Last edited by swguy; 23 Apr 2016 at 11:50 AM.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,697
    Plugin Contributions
    123

    Default 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 Modifications
    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.

  7. #7
    Join Date
    Feb 2010
    Location
    Syracuse, NY
    Posts
    2,159
    Plugin Contributions
    17

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

    This is actually built into the abbington_mega template

    @mc12345678 is correct

    in:
    Code:
    \includes\templates\abbington_mega\common\tpl_header.php
    find:
    PHP Code:
    <? echo $_SESSION['cart']->count_contents();?> <?php echo HEADER_TITLE_CART_ITEMS?> - <? echo $currencies->format($_SESSION['cart']->show_total());?>
    change to:
    Code:
    <?php echo $_SESSION['cart']->count_contents();?> <?php echo HEADER_TITLE_CART_ITEMS; ?> - <?php echo $currencies->format($_SESSION['cart']->show_total());?>
    Quote Originally Posted by mc12345678 View Post
    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:
    Code:
    <?= format($_SESSION['cart']->show_total());?>
    Would want it to read something like:
    Code:
    <?php echo format($_SESSION['cart']->show_total());?>
    Quote Originally Posted by swguy View Post
    @tod4life: if this is a mod you've recently installed, please post a link to it so we can get it fixed. Thanks.
    Website - Github. Like the ZCA Bootstrap 4 Template? Donations Welcome. Bootstrap Plugins?

  8. #8
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,697
    Plugin Contributions
    123

    Default 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 Modifications
    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.

  9. #9
    Join Date
    May 2011
    Posts
    29
    Plugin Contributions
    0

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

    Quote Originally Posted by kobra View Post
    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

 

 

Similar Threads

  1. Using $_SESSION outside Zen-Cart?
    By seanbig in forum General Questions
    Replies: 3
    Last Post: 21 Dec 2010, 08:21 AM
  2. Replies: 2
    Last Post: 21 Jul 2010, 05:02 PM
  3. Accessing attributes in the $_SESSION['cart']
    By mapleleaf in forum General Questions
    Replies: 0
    Last Post: 23 Oct 2008, 04:25 AM
  4. Field format error: 10413-The totals of the cart item amounts do not match
    By roscoeh in forum PayPal Website Payments Pro support
    Replies: 1
    Last Post: 14 Aug 2008, 10:19 PM
  5. $_SESSION['cart']->show_total()
    By ink in forum General Questions
    Replies: 1
    Last Post: 24 Jan 2008, 04:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR