Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

1.35sp3 Mod: How to turn off category products from showing. Rate Topic   - - - - -

 
  • rcaubin
  • Junior Member
  • Members
  • Join Date: 11-Jul 08
  • 10 posts

Posted 28 July 2008 - 11:57 PM #1

Total Steps: 4
Degree of Difficulty: easy to moderate
Files to be modified: 2

In order to use a "custom" landing page for categories, some of the default functionality would need to be disabled, such as the displaying of products.

Creating a custom landing page can be as easy as adding the appropriate html code to the Full Description of any category.

Here's the method I used to create "Show Products?" option for each category.
Note: this method can be used to apply other settings to categories.

Step 1. Create a language variable: show_products

---
Step 2. Create a new field in the cscart database table: cscart_categories with the following parameters

1. Field show_products
2. Type: CHAR
3. Default: Y

---
Step 3. File Modification: (1 of 2):
[skin]/admin/categories_pages/categories_update.tpl
(I'm using default blue for this example)

find this:
{if $settings.Addons.discussion == "Y"}
 {include file="addons/discussion/allow_discussion.tpl" object_id=$category_data.category_id object_type="C" title=$lang.discussion_title_category}
{/if}

add this after the above code:

<tr>
<td class="field-name" nowrap>{$lang.show_products}:</td>
<td> </td>
<td>
<select name="category_data[show_products]">
<option value="Y" {if $category_data.show_products == 'Y'}selected="selected"{/if}>{$lang.yes}</option>
<option value="N" {if $category_data.show_products == 'N'}selected="selected"{/if}>{$lang.no}</option>
</select>
</td>
</tr>


---
Step 4. File Modification: (2 of 2)
[skin]/customer/categories_pages/categories.tpl

find this:
{if $products}
{if $settings.Appearance.columns_in_products_list > 1}
	{include file="products_pages/products_multicolumns.tpl" columns=$settings.Appearance.columns_in_products_list}
{elseif $settings.Appearance.advanced_products_list == 'Y' && $client_env.is_javascript == 'Y'}
	{include file="products_pages/products_advanced.tpl" title=""}
{else}
	{include file="products_pages/products.tpl" title=""}
{/if}

{elseif !$subcategories}
<p align="center"><b>{$lang.text_no_products}</b></p>
{/if}
replace with this this:

{if $category_data.show_products == "Y"}
{if $products}
{if $settings.Appearance.columns_in_products_list > 1}
	{include file="products_pages/products_multicolumns.tpl" columns=$settings.Appearance.columns_in_products_list}
{elseif $settings.Appearance.advanced_products_list == 'Y' && $client_env.is_javascript == 'Y'}
	{include file="products_pages/products_advanced.tpl" title=""}
{else}
	{include file="products_pages/products.tpl" title=""}
{/if}

{elseif !$subcategories}
<p align="center"><b>{$lang.text_no_products}</b></p>
{/if}
{/if}


 
  • clips
  • Aged Resident Loon
  • Members
  • Join Date: 14-Jan 07
  • 1650 posts

Posted 30 July 2008 - 01:41 AM #2

Do you have an example of what you are doing here? I'm not for sure I understand.
Regards,
Jim

 
  • mdekok3000
  • Senior Member
  • Members
  • Join Date: 06-Feb 08
  • 883 posts

Posted 30 July 2008 - 03:30 AM #3

I don't really understand either. It sounds like you're making it so that categories don't show products.
[SIZE=2]
[/SIZE]

 
  • rcaubin
  • Junior Member
  • Members
  • Join Date: 11-Jul 08
  • 10 posts

Posted 30 July 2008 - 04:07 AM #4

Sorry about that guys :)

My site is still under development, but let's see if I can clarify it a little further.

The default behavior of any category's landing page is to show it's products below the full description.

Look at this website for example when you click on the diamonds category:
http://www.mondera.com/

Diamonds having loose diamonds as the primary category's product also has MANY subcategories (diamonds pendants, diamond earrings, engagement rings)

Because there's no point in showing a visitor all loose diamonds when more than likely they are interested in a very select group of them, turning off default product showing for this category is required.

The diamonds category is pretty much used as a place holder for within the category system. Displaying diamonds as products on this category's page would defeat the purpose of the website visitor's purchasing path that the company chooses (custom subcategory layout, predefined search results, etc...)

And setting up an option with Yes or No (default Yes) to show products maintains the original functionality of the CS-cart category system that will still be used by other categories not needing a custom layout.

Simple insert the custom landing page html in the Full Description and voila...

This option serves its purpose for now... However ideally what I'm going to code once our skin is done is a custom landing page admin addon for categories instead of using the built in behavior...

custom product details pages addon idea (I like brainstorming)
Each category can have it's own product details page that will be applied to all products in the category, otherwise use product, otherwise use default
Each product can have it's own product details page, otherwise use category, otherwise use default.

 
  • onture
  • Member
  • Members
  • Join Date: 20-Aug 07
  • 30 posts

Posted 19 June 2009 - 04:32 PM #5

Have you got a workaround for V2?

Sorry about that guys :)

My site is still under development, but let's see if I can clarify it a little further.

The default behavior of any category's landing page is to show it's products below the full description.

Look at this website for example when you click on the diamonds category:
http://www.mondera.com/

Diamonds having loose diamonds as the primary category's product also has MANY subcategories (diamonds pendants, diamond earrings, engagement rings)

Because there's no point in showing a visitor all loose diamonds when more than likely they are interested in a very select group of them, turning off default product showing for this category is required.

The diamonds category is pretty much used as a place holder for within the category system. Displaying diamonds as products on this category's page would defeat the purpose of the website visitor's purchasing path that the company chooses (custom subcategory layout, predefined search results, etc...)

And setting up an option with Yes or No (default Yes) to show products maintains the original functionality of the CS-cart category system that will still be used by other categories not needing a custom layout.

Simple insert the custom landing page html in the Full Description and voila...

This option serves its purpose for now... However ideally what I'm going to code once our skin is done is a custom landing page admin addon for categories instead of using the built in behavior...

custom product details pages addon idea (I like brainstorming)
Each category can have it's own product details page that will be applied to all products in the category, otherwise use product, otherwise use default
Each product can have it's own product details page, otherwise use category, otherwise use default.