If this is your first visit, check our documentation. To post, register or login.
Forums / Templates, Stylesheets, Page Layout / Category ~ "Product-General" clarification

Category ~ "Product-General" clarification

Locked

Started by krow on 28 Aug 2006, 11:14 PM · Views: 1,431

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
28 Aug 2006, 11:14 PM
#1
krow avatar

krow

New Zenner

Join Date:
Aug 2006
Location:
Southern US
Posts:
38
Plugin Contributions:
0

Category ~ "Product-General" clarification

Hi, I have been reading and going back and forth between the board, wikidocs and my admin and I am more confused now than I was when I started looking for an answer to my question. So...I apologize in advance for this "dummy" question, but perhaps someone can clarify this just a bit:

I am completely confused between Category listings and the "Product-General" stuff I find in the Admin section.

To be a bit more specific, all I was trying to figure out was how to get my main categories to show on my home page (in the middle of course) along with their images (those are showing) and their short descriptions (which I have put in the Admin, but they are not showing on the page). You can see it here;
http://dolceboutique.com/store/

In my searching (over-searching?) I have now lost myself in the abundance of options of things to show/not show. So, I'm hoping someone can explain it a bit in plain terms.

Thank you!
k

PS. I just tried to post this one time but received a "server busy error. So, I'm trying it again... so here's hoping it doesn't post it more than once!

::: Inspector of another kind of code :::

29 Aug 2006, 5:38 PM
#2
krow avatar

krow

New Zenner

Join Date:
Aug 2006
Location:
Southern US
Posts:
38
Plugin Contributions:
0

Re: Category ~ "Product-General" clarification

Does anyone have any information on this? Still haven't been able to find out how to get the descriptions of my main categories to show on the main page.

Thanks.
k

::: Inspector of another kind of code :::

29 Aug 2006, 6:00 PM
#3
drbyte avatar

drbyte

Sensei

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

Re: Category ~ "Product-General" clarification

/includes/modules/pages/index/main_template_vars.php
around line 97 you see:```
} else {
$categories_query = "SELECT c.categories_id, cd.categories_name, c.categories_image, c.parent_id
FROM " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
WHERE c.parent_id = :parentID
AND c.categories_id = cd.categories_id
AND cd.language_id = :languagesID
AND c.categories_status= '1'
ORDER BY sort_order, cd.categories_name";

$categories_query = $db->bindVars($categories_query, ':parentID', $current_category_id, 'integer');

change the second line of that like this:
$categories_query = "SELECT c.categories_id, cd.categories_name, c.categories_image, c.parent_id, cd.categories_description



Then ...
/includes/modules/YOURTEMPLATE/category_row.php
line 40:```
                                           'text' => '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . zen_image(DIR_WS_IMAGES . $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br />' . $categories->fields['categories_name'] . '</a>');
```becomes:```
                                           'text' => '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . zen_image(DIR_WS_IMAGES . $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '<br />' . $categories->fields['categories_name'] . '</a>' . '<br />' . $categories->fields['categories_description']);

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

29 Aug 2006, 9:23 PM
#4
krow avatar

krow

New Zenner

Join Date:
Aug 2006
Location:
Southern US
Posts:
38
Plugin Contributions:
0

Re: Category ~ "Product-General" clarification

Thank you for the information. Is there not a way to set this option from the admin? (with all the talk on the board, I'm afraid of changing too many pages for fear of having troubles of a seamless upgrade later).

Thanks.
k

::: Inspector of another kind of code :::

29 Aug 2006, 11:30 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: Category ~ "Product-General" clarification

krow:

Is there not a way to set this option from the admin?You are changing the normal way Zen Cart works, so there are no admin-selectable options for this.

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

30 Aug 2006, 2:43 AM
#6
krow avatar

krow

New Zenner

Join Date:
Aug 2006
Location:
Southern US
Posts:
38
Plugin Contributions:
0

Re: Category ~ "Product-General" clarification

Thanks for your quick response. I have done this and it put the descripts in place. Very nice. I have to go in and figure out how to format them now as they are all kind of caddy-whompus (is that a word?) about the page there.

This being done, it does leave me with a question please...

If I had to do this special snippet of code on these pages, why then does ZenCart allow one to put descriptions in the Admin when adding a new category? I'm a little confused as to why it would let me add those descriptions and then now show up on the site without special scripting.

Thanks,
k

::: Inspector of another kind of code :::

30 Aug 2006, 2:47 AM
#7
drbyte avatar

drbyte

Sensei

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

Re: Category ~ "Product-General" clarification

The descriptions show up at the top of the category page.

If you click on a category, it brings up a listing of products/categories within that category. At the top of that listing, is your category description.

If that's not happening, then your category likely only has 1 product in it, and is going directly to the product rather than forcing the customer to view a list and have to click "again" to see the details. You can turn this behaviour off in Admin->configuration->Layout Settings->Skip 1-prod categories.

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

30 Aug 2006, 2:49 AM
#8
krow avatar

krow

New Zenner

Join Date:
Aug 2006
Location:
Southern US
Posts:
38
Plugin Contributions:
0

Re: Category ~ "Product-General" clarification

Gosh.. that was simply stated and perfectly correct. I'm going to go zen-out now to see if one day I get as good at ZenCart as you guys.

Thanks again,
k

::: Inspector of another kind of code :::