Forums / Templates, Stylesheets, Page Layout / main_page=products_all - how to make this the default view?

main_page=products_all - how to make this the default view?

Locked

Views: 2,132

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
11 Mar 2009, 7:11 PM
#1
lanexa avatar

lanexa

New Zenner

Join Date:
Jul 2008
Location:
San Diego, California, USA
Posts:
8
Plugin Contributions:
0

main_page=products_all - how to make this the default view?

I'm developing a shop here:

http://photographerstoolkit.com/shop

using 1.3.8 and I want main_page=products_all to be the default view when entering the shop.

I'm trying NOT to hack core, so if you have suggestions on a way forward, let me know and thanks. I've searched the forums and can not find my answer.

11 Mar 2009, 9:01 PM
#2
lanexa avatar

lanexa

New Zenner

Join Date:
Jul 2008
Location:
San Diego, California, USA
Posts:
8
Plugin Contributions:
0

Re: main_page=products_all - how to make this the default view?

also, for what it is worth, I have spent considerable time in the Admin panel and understand how to show New Products or Featured products on the main page. That is not the question.

What I specifically want to do is to show main_page=products_all AS the default view for the store home page.

It is not clear how to do this. Thanks again,

11 Mar 2009, 9:28 PM
#3
drbyte avatar

drbyte

Sensei

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

Re: main_page=products_all - how to make this the default view?

That's not a feature that one can enable just by flipping a switch.

Here's one approach that might work for you:

  1. Copy /includes/init_includes/init_sanitize.php to /includes/init_includes/**overrides/**init_sanitize.php
  2. Edit the override file by finding this line, around line 116:if (!isset($_GET['main_page']) || !zen_not_null($_GET['main_page'])) $_GET['main_page'] = 'index';Change 'index' to 'products_all', like this:```
    if (!isset($_GET['main_page']) || !zen_not_null($_GET['main_page'])) $_GET['main_page'] = '[B]products_all[/B]';
3. Save the changes to the server.

.
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.

11 Mar 2009, 10:17 PM
#4
lanexa avatar

lanexa

New Zenner

Join Date:
Jul 2008
Location:
San Diego, California, USA
Posts:
8
Plugin Contributions:
0

Re: main_page=products_all - how to make this the default view?

That did it!!! Thank you, Dr. Byte.