Jump to content

Text for Category


Guest Denver Dave

Recommended Posts

Guest Denver Dave

Once we click on a category and display the public product list for the category, the category image may be displayed if we have one, but I don't see a way to collect or display text for the category.

Since we are looking at using the category to define the basic product and will have many products for different sizes to allow us to track stock levels, it would be useful to give information about the general category (for example a certain type of shoe) and not have to repeat it on every one of the 12 products listed - size 1, size 2, size 3, through size 12.

Any ideas?

===========

found this mod - investigating:

http://www.cubecart.com/site/forums/index.php?showtopic=9032

Link to comment
Share on other sites

Here's a thought. Using paintshop pro (or your favorite image editor) create a jpeg for each category with only text. Make it 300 x 60 px and experiment with size, font, background colors, etc. Then upload to admin\view categories\edit\upload image

Link to comment
Share on other sites

Guest Denver Dave

I've got the category description saving in the database as evidenced by being able to pull it up and edit the description again. However, it doesn't seem to want to display on the website when the category is displayed. Seems like I'm either not defining the macro correctly or not requesting it correctly. I'm not very familiar with how .tpl files work, what is the easiest way to trouble shoot this back?

Link to comment
Share on other sites

Guest Denver Dave

Here is the code that effects the category path:

Before: $view_cat->assign("CURRENT_DIR",getCatDir($currentCat[0]['cat_name'],$currentCat[0]['cat_father_id'], $currentCat[0]['cat_id'], $link=TRUE));

gives:

Products in: /Candles/Aromatherapy/Bergamot Lime

with the first 2 levels being links

After:

$view_cat->assign("CURRENT_DIR",getCatDir($currentCat[0]['cat_name'],$currentCat[0]['cat_desc'],$currentCat[0]['cat_father_id'], $currentCat[0]['cat_id'], $link=TRUE));

gives:

Products in: /Bergamot Lime

does not show the two cateories above

Is the above code trying to assign a value for the "CURRENT_DIR" element of the $view_cat array using a getCatDir function? If so, what does the cat_desc have to do with this?

======================

Here are the directions from the .html file:

Find:

$view_cat->assign("CURRENT_DIR",getCatDir($currentCat[0]['cat_name'],$currentCat[0]['cat_father_id'], $currentCat[0]['cat_id'], $link=TRUE));

Replace it with:

$view_cat->assign("CURRENT_DIR",getCatDir($currentCat[0]['cat_name'],$currentCat[0]['cat_desc'],$currentCat[0]['cat_father_id'], $currentCat[0]['cat_id'], $link=TRUE));

Link to comment
Share on other sites

Guest Denver Dave

Sorry, kind of talking to myself here. Trying to track down why the category text is not showing up. In viewCat.inc.php about line 194, I placed the following code:

//**** davehack category text

$view_cat->assign("TXT_CAT_DESC",$currentCat[0]['cat_desc']);

echo 'category description= ' . $currentCat[0]['cat_desc'] . '<br>';

with the following result on the web page which is correct:

category description= 100% soy wax, 100% essential oils, and fragrant oils create a cleaner burning candle.

Now I'm not sure how to test if the $view_cat array was populated properly.

I think I've added the {TXT_CAT_DESC} and I placed an html comment right before it which is present in the generated html which leads me to believe I modified the correct .tpl file:

<!-- davehack category text -->

I'm using the Killer skin - maybe that is making a difference?

Any suggestions how to track down where the category description is disappearing?

===========

Wait got categories to work. Depends where I put the {TXT_CAT_DESC} in the .tpl file. Parser must be using the comments:

<!-- BEGIN: view_cat -->

<div class="boxContent">

<span class="txtContentTitle">{TXT_CAT_TITLE}</span>

<br clear="all" />

{TXT_CAT_DESC}Description here<br>

<!-- BEGIN: sub_cats -->

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...