Results 1 to 7 of 7

Hybrid View

  1. #1
    Join Date
    Oct 2006
    Posts
    26
    Plugin Contributions
    0

    Default Empty Cart leads to 'New Products' page

    Hi

    I am trying to change the destination that the browser is sent when you empty your cart fully.

    Currently if i do that i am sent to a page displaying 'Your Shopping Cart is empty.' and 'New Products For June'

    The URL looks like this:

    Code:
    index.php?main_page=shopping_cart&product_id=2
    What i would like to do is be forwarded to the front page, but upon looking at tpl_shopping_cart_default.php i have no idea what to edit.

    Anyone with some insight would be much apreciated!

    Thanks in advance

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Empty Cart leads to 'New Products' page

    So, if the customer clicks on the shopping cart link, and the cart is empty, you don't want to tell them that their cart is empty? Instead you just want them to jump directly to the home page without any explanation of why? ... so they can keep clicking on the link and wondering why they're not seeing the shopping cart?

    If you don't think that's going to confuse your shoppers then just add this to the end of /includes/modules/pages/shopping_cart/header_php.php to point them to the home page:
    Code:
      if ($flagHasCartContents == false) {
        zen_redirect(zen_href_link(FILENAME_DEFAULT));
      }
    .

    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.

  3. #3
    Join Date
    Oct 2006
    Posts
    26
    Plugin Contributions
    0

    Default Re: Empty Cart leads to 'New Products' page

    Thanks for the explanation Dr Byte!

    Thing is, you are absolutely correct about confusing customers, but is there any way to customise the 'Your Shopping Cart is empty' page?

    If I could add some more detail to that page, along with an image, say, and a meta refresh command it would make much more sense to use it...

    Any ideas?

    Thanks again!

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Empty Cart leads to 'New Products' page

    You can customize the wording of the "your cart is empty" text simply by editing that text in your language files.
    https://www.zen-cart.com/tutorials/index.php?article=38
    https://www.zen-cart.com/tutorials/index.php?article=39

    As to adding a meta refresh, you could try this trick:
    - create a new file: /includes/modules/pages/shopping_cart/jscript_redirect_empty_cart.php
    - put this in the file:
    Code:
    <?php if ($flagHasCartContents == false)  { ?>
    <meta http-equiv="refresh" content="6;URL=<?php echo zen_href_link(FILENAME_DEFAULT); ?>"> 
    <?php }  ?>
    .

    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.

  5. #5
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Empty Cart leads to 'New Products' page

    You also might be interesting in the following.

    Admin > Index Listing

    Show New Products on Main Page - Errors and Missing Products Page
    Show Featured Products on Main Page - Errors and Missing Products Page
    Show Special Products on Main Page - Errors and Missing Products Page
    Show Upcoming Products on Main Page - Errors and Missing Products Page

    Set all of the above to '0' or whichever ones you do not want to show below "Shopping Cart is Empty" msg.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Empty Cart leads to 'New Products' page

    Quote Originally Posted by Website Rob View Post
    You also might be interesting in the following.

    Admin > Index Listing

    Show New Products on Main Page - Errors and Missing Products Page
    Show Featured Products on Main Page - Errors and Missing Products Page
    Show Special Products on Main Page - Errors and Missing Products Page
    Show Upcoming Products on Main Page - Errors and Missing Products Page

    Set all of the above to '0' or whichever ones you do not want to show below "Shopping Cart is Empty" msg.
    Actually, those specific switches only apply to the "Index" page (hence the title "Index Listing").
    There are similar switches in Admin->Configuration->Stock which affect the Shopping Cart page.
    .

    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. Empty Cart Page and New Products Question
    By sports guy in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 24 May 2011, 04:03 AM
  2. How To Remove "New Products for (month)" from Empty Cart / shopping cart page
    By DeeLite in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 7 Dec 2009, 07:32 AM
  3. Replies: 4
    Last Post: 20 Jun 2009, 04:06 PM
  4. Column Width New Products in Empty Cart Page
    By limelites in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 25 Mar 2009, 06:43 PM
  5. New Products showing on Empty Cart page
    By MamaT in forum Basic Configuration
    Replies: 4
    Last Post: 18 Mar 2009, 09:13 PM

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