Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2011
    Location
    Toronto, Ontario, Canada
    Posts
    290
    Plugin Contributions
    0

    help question Having issue on local wamp set up

    I create a website on my local wamp server using Aberdeen Neutral template provided by picaflor-azul.

    I'm having an issue on this template: the website I set up on my local wamp server cannot correctly display the shopping cart's content. It shows:

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


    According to the author Anne of the template's explanation, it is caused by wamp instead of the template.

    According to Anne, the problem will get resolved if I switch to xamp from wamp. However, my switch failed after I installed xamp, most likely some setting was wrong or for whatever reason, anyway, I really know little about apache, php etc, the wamp works fine for me except for this shopping cart issue.

    I wonder if someone can tell me how to track down the problem and get it sorted out? I'm sure this issue can be resolved within wamp.

    Thank you very much.

    (I tried to contact Anne, maybe she is busy or for whatever reason, even my question on her website is not approved to show there, so I have to seek help here. Thank you. )

  2. #2
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,279
    Plugin Contributions
    0

    Default Re: Having issue on local wamp set up

    I hardly think this has anything to do with your Wamp server .
    looks like missing opening php tag <?php

    as result php is not being parsed but being written as just a text .

  3. #3
    Join Date
    Sep 2011
    Location
    Toronto, Ontario, Canada
    Posts
    290
    Plugin Contributions
    0

    Default Re: Having issue on local wamp set up

    Quote Originally Posted by tony_sar View Post
    I hardly think this has anything to do with your Wamp server .
    looks like missing opening php tag <?php

    as result php is not being parsed but being written as just a text .
    Thanks. I don't think it is caused by Wamp either.

    Could you take a look at the following code which I believe is to generate the header (I retrieve this from tpl_header.php):

    PHP Code:
       <li><?php echo '<a href="' HTTP_SERVER DIR_WS_CATALOG '">'?><?php echo HEADER_TITLE_CATALOG?></a> | </li>                                                                        
        <li><?php echo '<a href="' zen_href_link(FILENAME_CONTACT_US) . '">'?><?php echo HEADER_TITLE_CONTACT_US?></a> | </li>
       <?php if ($_SESSION['customer_id']) { ?>
       <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF'''SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF?></a> | </li>
       <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT'''SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT?></a> | </li>
    <?php
      
    } else {
       if (
    STORE_STATUS == '0') {
    ?>
         <li><a href="<?php echo zen_href_link(FILENAME_LOGIN'''SSL'); ?>"><?php echo HEADER_TITLE_LOGIN?></a> | </li>
        <?php } } ?>
      <li><img src="includes/templates/aberdeen_neutral/images/cart.jpg" class="cart-image" alt="the shopping cart" /><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART'''NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS?> - <? echo $_SESSION['cart']->count_contents();?> item(s) - <? echo $currencies->format($_SESSION['cart']->show_total());?></a> | </li>
        <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING'''SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT?></a></li>
        <?php if ($_SESSION['cart']->count_contents() != 0) { ?>
       <?php }?>

  4. #4
    Join Date
    Sep 2011
    Location
    Toronto, Ontario, Canada
    Posts
    290
    Plugin Contributions
    0

    Default Re: Having issue on local wamp set up

    Here is the screenshot, thanks.
    Attached Images Attached Images  

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Having issue on local wamp set up

    Quote Originally Posted by mdivk View Post
    <? echo $_SESSION['cart']->cou...
    The use of "<?" instead of "<?php" is called "short open tags", and apparently your PHP installation is configured to NOT allow use of short-open-tags.

    So, either change all the uses of <? to <?php EVERYWHERE or reconfigure your PHP settings (php.ini) to allow short open tags.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Feb 2012
    Posts
    1
    Plugin Contributions
    0

    Default Re: Having issue on local wamp set up

    Cool...I had the same issue and this solved the problem....

    I thought I read somewhere when I was setting up php to not allow short tags, because all modern code uses the long tags...is that the preferred configuration?

  7. #7
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Having issue on local wamp set up

    Starting since PHP v5.3.x, which is the current version as of today, prevents the use of short-open-tags by default.

    But the upcoming PHP 5.4, which is in release-candidate-testing phase, has allegedly turned the feature back on again by default.

    You can see the details here: http://www.php.net/

    As far as smart coding practice is concerned, one should generally be in the practice of using the longer tags. That's the most-compatible approach nowadays, and will be the best-practice until PHP 5.3 is no longer used on any servers anywhere ... probably a decade from now LOL
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Trying to set up local copy of live store on WAMP
    By WhitePhantom in forum General Questions
    Replies: 7
    Last Post: 17 May 2016, 03:38 AM
  2. Install on local machine w/wamp
    By ecmauto in forum Installing on a Windows Server
    Replies: 1
    Last Post: 16 Dec 2011, 12:51 AM
  3. Cannot access admin on WAMP on local machine
    By frank18 in forum Basic Configuration
    Replies: 12
    Last Post: 7 Apr 2011, 08:14 PM
  4. Installing on local and cannot access phpmyadmin on wamp
    By RenoB in forum Installing on a Windows Server
    Replies: 1
    Last Post: 11 Mar 2010, 11:31 AM
  5. Wamp wamp wamp - can't get wamp to run
    By mw4kids in forum Installing on a Windows Server
    Replies: 36
    Last Post: 21 May 2009, 03:37 AM

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