Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2009
    Posts
    32
    Plugin Contributions
    0

    help question Automatic redirect from cat page to another?

    Hey guys,

    Whenever someone is led to the category #3 page, I need the URL http://site.com/zencart/index.php?ma...=index&cPath=3 to automatically redirect the visitor to the category #1 page http://site.com/zencart/index.php?ma...=index&cPath=1... How do I do that?

    Thanx!

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

    Default Re: Automatic redirect from cat page to another?

    Why ?
    .

    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
    Feb 2009
    Posts
    32
    Plugin Contributions
    0

    Default Re: Automatic redirect from cat page to another?

    It's complicated to explain... But let me try to give it a shot anyway...

    I set up a "consultation page", which is nothing but a quiz. The quiz returns product combos depending on score. Those combos are in cat #3 and meant to be there ONLY for the quiz. If for some reason, someone tries to go to the product listing, I'd rather them being redirected to the cat #1 product listing instead, coz it shows each product individually, not in a combo. I don't want a combo to come up out of context, it that makes any sense to you.

    That's basically why I only need a redirect from cat #3 to cat #3. I don't wanna redirect product pages in cat #3.

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

    Default Re: Automatic redirect from cat page to another?

    Okay, if I'm understanding you correctly, I think you can accomplish that by adding this to the end of your /includes/init_includes/init_category_path.php file, just before the closing ?> (or just remove the ?> altogether):
    Code:
    if ($cPath == '3' && $current_page == 'index') zen_redirect(zen_href_link(FILENAME_DEFAULT, 'cPath=1'));
    .

    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
    Feb 2009
    Posts
    32
    Plugin Contributions
    0

    Default Re: Automatic redirect from cat page to another?

    Works perfectly!!! Thanks a lot!!!

 

 

Similar Threads

  1. Replies: 0
    Last Post: 18 Jun 2012, 01:02 AM
  2. Whoops - urgent - how do I set up a redirect from one product to another?
    By phil99 in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 7 Jul 2008, 12:07 AM
  3. Save order and redirect to another page
    By SupuS in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 6 Feb 2008, 12:33 AM
  4. Master Cat's on main page, ONLY sub cat's on specific cat pages
    By wtashby in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 25 Jun 2006, 07:24 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