Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18
  1. #11
    Join Date
    Jan 2004
    Posts
    58,263
    Blog Entries
    3
    Plugin Contributions
    106

    Default Re: Successfully added to cart message stack - change position

    Quote Originally Posted by paul3648 View Post
    I can't speak for anyone else, but the reason I want this change is that my site is set to stay on the product info page after adding an item to the cart ...
    In my experience, most stores who configure their cart that way make a HUGE mistake ... they have only a single little tiny button hidden somewhere for actually starting checkout.
    If it's not clear how to proceed to checkout, people won't.
    On the Shopping Cart page, it's very clear how to proceed to checkout and actually buy what one has been shopping for.

    If you want to skip the use of the shopping-cart page, feel free ... but do your customers a favor and make sure you add a large "Proceed to Checkout" and/or "View My Shopping Cart Contents" button prominently in the upper half of the site.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donations always welcome: www.zen-cart.com/donate

    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.

  2. #12
    Join Date
    Mar 2007
    Location
    Taiwan
    Posts
    191
    Plugin Contributions
    0

    Default Re: Successfully added to cart message stack - change position

    Quote Originally Posted by DrByte View Post
    If you want to skip the use of the shopping-cart page, feel free ... but do your customers a favor and make sure you add a large "Proceed to Checkout" and/or "View My Shopping Cart Contents" button prominently in the upper half of the site.
    Yes, that's a good idea. The person who started this thread got the idea of moving the "added to cart" confirmation from the zencartoptimization site, which has a lot of good ideas about how to streamline your website. As I recall, the idea behind staying on the product info page after selecting an item is to encourage more buying, and also to decrease confusion - "I'm on the shopping cart page, so I guess I have to checkout now."

    The zencartoptimization idea seemed like a good idea at the time, but I suppose there are other ways to approach this - putting a big "continue shopping" button on the shopping cart page would be one.

  3. #13
    Join Date
    Oct 2007
    Location
    MA, USA
    Posts
    319
    Plugin Contributions
    0

    Default Re: "Successfully added to cart" message stack - change position

    How do we display this and or turn it off. where is the button in the admin again?
    Thank you, Sincerely, MagicMan

  4. #14
    Join Date
    Mar 2007
    Location
    Taiwan
    Posts
    191
    Plugin Contributions
    0

    Default Re: "Successfully added to cart" message stack - change position

    I added an if statement to the includes/templates/YOUR_TEMPLATE/common/tpl_header.php file as so:

    <!--bof Add to Cart Alert-->
    <?php

    if ($current_page_base == 'product_info'){
    //do nothing
    } else {
    // Display all header alerts via messageStack:
    if ($messageStack->size('header') > 0) {
    echo $messageStack->output('header');
    }
    if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
    echo htmlspecialchars(urldecode($_GET['error_message']));
    }
    if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
    echo htmlspecialchars($_GET['info_message']);
    } else {

    }
    }
    ?>
    <!--eof Add to Cart Alert-->

    This prevents the header alert from showing up on the product_info pages, but allows other alerts to show correctly. This is important if your product listing pages have an "add to cart" button that doesn't redirect them to the product page - the "add to cart" alert will show up properly.

    I also moved the alert to the bottom of the header - just before the final </div>. This brings the alert closer to the eye level and more obvious.

  5. #15
    Join Date
    May 2006
    Posts
    729
    Plugin Contributions
    0

    Default Re: "Successfully added to cart" message stack - change position

    Did you still move the alert to your product info page and added that if statement or just added that if statement?

  6. #16
    Join Date
    May 2006
    Posts
    729
    Plugin Contributions
    0

    Default Re: "Successfully added to cart" message stack - change position

    Ok...I think I got the message in the product info page by adding the following to the tpl_product_info_display

    <?php
    // Display all header alerts via messageStack:
    if ($messageStack->size('header') > 0) {
    echo $messageStack->output('header');
    }
    if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
    echo htmlspecialchars(urldecode($_GET['error_message']));
    }
    if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
    echo htmlspecialchars($_GET['info_message']);
    } else {

    }
    ?>

    And then adding paul3648's code to my tpl_header.

    Everything seems to work but can someone please tell me what other messages are supposed to appear in the header apart from the "Successfully added product to cart" so I can test it out and see if they disappeared or not.

    All the best...

  7. #17
    Join Date
    Mar 2007
    Location
    Taiwan
    Posts
    191
    Plugin Contributions
    0

    Default Re: "Successfully added to cart" message stack - change position

    Quote Originally Posted by Berserker View Post
    ...what other messages are supposed to appear in the header apart from the "Successfully added product to cart" so I can test it out and see if they disappeared or not.
    If you have an "add to cart" button on your product listing page - the one that shows a list of your all products - an "added to cart" alert should appear on that page (if you don't take the customer to the cart immediately).

  8. #18
    Join Date
    Jan 2009
    Location
    Falkirk-Scotland
    Posts
    68
    Plugin Contributions
    0

    Default Re: "Successfully added to cart" message stack - change position

    Hi guys,

    Great thread and just what I was looking for.
    I've tried to follow the advice/suggestion here and it has worked but I get the "Successfully added Product to the cart.." alert showing where I want and also at the top of the page as it used to.

    I added the suggested code to my tpl_header.php file and to my tpl_product_info_display file.

    Take it I've missed something out? Any suggestions?

    Berserker, I noticed you have it working ok on your site.

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Successfully added Product to the cart ...
    By mviben in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 29 Apr 2009, 01:08 PM
  2. successfully added to cart not showing
    By gsdcypher in forum General Questions
    Replies: 32
    Last Post: 28 Jan 2009, 10:05 PM
  3. Turn off "Successfully added Product to the cart ..."
    By dietcoke in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 23 Sep 2008, 08:42 PM
  4. Successfully added to cart message
    By lviper in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 27 Oct 2007, 03:47 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
  •