Zen Cart Logo

Shopping cart issue

Views: 4,463

Results 1 to 6 of 6
22 Jul 2012, 12:41 AM
#1
estfis81 avatar

estfis81

New Zenner

Join Date:
Jul 2012
Posts:
6
Plugin Contributions:
0

Shopping cart issue

Fresh install with xamp.
Zencart 1.5
windows 7 professional
localhost
Aberdeen Neutral template

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

I looked and found this problem in the forums but all I am told is to install xampp.
On my first install i compiled apache and manually installed php myself.
I uninstalled everything and then used xampp and the issue is still not resolved.

Any help anyone could offer would be great!!!

Thanks,

Dan

22 Jul 2012, 8:14 AM
#2
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Shopping cart issue

Estfis81:

Any help anyone could offer would be great!!!

Although your post may mean something to someone other than yourself, I (and probably many others) are sitting here wondering what your problem actually is.

There is nothing wrong with the code snippet you posted, and for all intents and purposes you could have pasted any line of code that may or may not be related to the problem, and which for reasons we are not aware of are apparently related to an xampp installation.

Perhaps if you describe the problem we can be of a lot more help.

Cheers
Rod

22 Jul 2012, 1:04 PM
#3
estfis81 avatar

estfis81

New Zenner

Join Date:
Jul 2012
Posts:
6
Plugin Contributions:
0

Re: Shopping cart issue

That little snippet of code is what pops up on the web page right next to my shopping cart.

Home | Contact Us | Log In | Shopping Cart - count_contents();?> item(s) - format($_SESSION['cart']->show_total());?> |
Attachment 10850

I have seen that people have had this issue before but installing xampp seemed to helps some of them but it didn't work for me.

28 Jul 2012, 9:35 PM
#4
tristanr avatar

tristanr

New Zenner

Join Date:
Jul 2012
Posts:
1
Plugin Contributions:
0

Re: Shopping cart issue

I loaded zencart up today after installing xampp and installed the template TBsempre and had exactly the same issue. As I am new to php etc took me several hours to track down the offending script and correct it.

In the tpl_header.php for the template line 60 the code read...

                 <li class="shopping"><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?>   <purple>(<? echo $_SESSION['cart']->count_contents();?>)   <? echo $currencies->format($_SESSION['cart']->show_total());?></purple></a> </li>

I noted the missing php tags in the later section after the <? and changed it to

                 <li class="shopping"><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?>   <purple>(<?php echo $_SESSION['cart']->count_contents();?>)   <?php echo $currencies->format($_SESSION['cart']->show_total());?></purple></a> </li>

now this displays fine. You might want to look for something similar in the template you are using?

28 Jul 2012, 11:42 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Shopping cart issue

PHP 5.3 doesn't like the use of "<?". It requires "<?php" instead.

The only exception to this is if you've changed the PHP configuration to allow the use of "short tags". But that's disabled by default in PHP 5.3. I recall reading that they're going to enable it again by default in PHP 5.4.

26 Oct 2013, 2:50 PM
#6
crixus avatar

crixus

New Zenner

Join Date:
Oct 2013
Location:
United States
Posts:
88
Plugin Contributions:
0

Re: Shopping cart issue

Estfis81:

That little snippet of code is what pops up on the web page right next to my shopping cart.

Attachment 10850

I have seen that people have had this issue before but installing xampp seemed to helps some of them but it didn't work for me.

Dear your problem is solved? i am facing same problem!