Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / removing categories and moving cart buttons

removing categories and moving cart buttons

Locked

Views: 1,525

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
3 Mar 2007, 9:53 PM
#1
tcc_inc avatar

tcc_inc

New Zenner

Join Date:
Feb 2007
Location:
Newark, DE
Posts:
25
Plugin Contributions:
0

removing categories and moving cart buttons

Question:
The owner of the business I'm making a site for wants it so that the categories box disappears ONLY when viewing a product detail page. Also, he wants the "add to cart" buttons and general controls to be on the right column at this time. How can I do it??

-Tom :dontgetit

4 Mar 2007, 1:36 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: removing categories and moving cart buttons

This can be done but it loses for the customer a navigation tool ... or are you using the Category Tabs at the top and that is sufficient?

You can make the categories sidebox "disappear" by utilizing an IF in the sidebox to control when it should and should show ...

This can be triggered by the presence of the:
$_GET['products_id']

If there isn't one in the URL, then you are not "looking" at the Product _info page ...

You could expand this further by creating a new sidebox that uses the inverse of this ...

For an idea of how a switch works peek in the:
/includes/modules/sidebox/manufacturer_info.php
/includes/templates/template_default/sidebox/tpl_manufacturer_info.php

and copy to your template and override directories:
/includes/modules/sidebox/your_template_dir/manufacturer_info.php
/includes/templates/your_template_dir/sidebox/tpl_manufacturer_info.php

You will see the IF statement that says only show when there is a products_id:

  if (isset($_GET['products_id'])) {

Otherwise, the box hides or turns off ... :smile:

4 Mar 2007, 2:03 PM
#3
tcc_inc avatar

tcc_inc

New Zenner

Join Date:
Feb 2007
Location:
Newark, DE
Posts:
25
Plugin Contributions:
0

Re: removing categories and moving cart buttons

Thanks, Ajeh. That makes a lot of sense...seems somewhat similar to c++. I'll give it a try. So, since they will no longer have their precious navigation tool lol, can a add the "back button" on the bottom??

-Tom

4 Mar 2007, 2:26 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: removing categories and moving cart buttons

That is up to you and what works for your site ...

4 Mar 2007, 5:30 PM
#5
tcc_inc avatar

tcc_inc

New Zenner

Join Date:
Feb 2007
Location:
Newark, DE
Posts:
25
Plugin Contributions:
0

Re: removing categories and moving cart buttons

Think I need a little more help... What file would i add the IF statement to, "tpl_define_main_page"? and, what is the actual syntax for the code? I'm still trying to get a hang of all this. It seems like there are at least three files for each page or box: an english.php file for the actual content, a define file for the header and stuff like that, and a tpl_whatever file for all the actual controls...is that sort of what's going on?

4 Mar 2007, 5:50 PM
#6
tcc_inc avatar

tcc_inc

New Zenner

Join Date:
Feb 2007
Location:
Newark, DE
Posts:
25
Plugin Contributions:
0

Re: removing categories and moving cart buttons

Wait, never mind that last post, lol! I did successfully disable the left nav if product ID is set to anything. the code makes sense. Here's my two next problems:

1: The nav is disable even while they are looking at the list of products..because their is a product value. I only want it gone if they actually click a particular product to look at it.

2: How do I add a back button to the bottom of the product detail page??

-Tom

4 Mar 2007, 5:55 PM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: removing categories and moving cart buttons

Where are you seeing a product_id in the listing?

Have you an URL where that is happening?