Jump to content
Sign in to follow this  
jcall

[Contribution] More Category Boxes

Recommended Posts

And I'm in phpMyAdmin, but have no idea what to type in!

Any help?

The contribution came with a .sql file. Click on your catalog table in phpmyadmin. Look to the top menu for the SQL tab. Click it. Paste the code from the .sql file into the textarea and press GO. That's all there is to it. The hard part is writing the file.

 

Sheri

Share this post


Link to post
Share on other sites
My second child level is not indenting at all, but remains in the same position as it's parent. Do you know why this might be?

 

Another thing I have discovered:

 

As per the ReadMe file I compared more_categories.php and more_categories_50.php and transfered over the additional code to allow the enhancement contrib to work. I uncommented the already present enhancement code but when I uncommented this:

 

/* BoF - Contribution Category Box Enhancement 1.1 */
if (isset($cPath_array)) {
	for ($j=0, $n=sizeof($cPath_array); $j<$n; $j++) {
			$categories_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$cPath_array[$i] . "' and language_id = '" . (int)$languages_id . "'");
			if (tep_db_num_rows($categories_query) > 0)
			$categories = tep_db_fetch_array($categories_query);
	}
$cat_name = $categories['categories_name']; 
}
// EoF Category Box Enhancement

 

It causes my second category box to disappear when I click the parent level of my first box. The second category box reappears when I click a child level in the first box. Then horribly when I click on the 2nd child level I get this error:

Warning: implode() [function.implode]: Bad arguments. in .../public_html/catalog/includes/boxes/more_categories.php on line 134
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') and c.categories_id = cd.categories_id and cd.language_id='1' order by sort_or' at line 1

select c.categories_id, cd.categories_name, c.parent_id from categories c, categories_description cd where c.parent_id = '0' and c.categories_id in () and c.categories_id = cd.categories_id and cd.language_id='1' order by sort_order, cd.categories_name

[TEP STOP]

 

Hope someone can help. :(

 

Sheri

Share this post


Link to post
Share on other sites
As per the ReadMe file I compared more_categories.php and more_categories_50.php and transfered over the additional code to allow the enhancement contrib to work.

Sheri

 

OK, I solved the addition of the box enhancement contribution and placed the change in the more categories contribution so that the enhancement works as it should with the more_categories.php. BUT I am still stumped on the indenting problem of 2nd level subcategories. I have gone through the code, comparing it to both the box enhancement contrib and the original categories.php file and i think I have narrowed it down to the function that creates the additional category box. I have tried changing some of the differences found between the files but they either had no effect or horrible effects! Would anyone be willing to take a look at the code for this contribution to see where the problem might lie?

 

THANK YOU for just reading this far ;)

 

Sheri

Share this post


Link to post
Share on other sites

Hi there,

 

great contribution, got it working no problems. Just wondering if anyone had tried incorporating the ALLProds contribution with this.

 

This is the code I had in my categories.php which i somehow need to add into more_categories.php to call the allprods.php

 

$info_box_contents[] = array('align' => 'left',
						   'text'  => '<img src="../../images/spacer.gif" alt="" width="3" border="0"><img src="/images/pointer_blue_light.gif" alt=""> <font size=-2><a href="' . tep_href_link(FILENAME_ALLPRODS, '', 'NONSSL') . '">' . BOX_INFORMATION_ALLPRODS . '</a></font><br>');

 

Anyone got any ideas?

 

Cheers

 

stubbsy

Edited by stubbsy

Share this post


Link to post
Share on other sites
Just wondering if anyone had tried incorporating the ALLProds contribution with this.

stubbsy

 

Hi stubbsy,

 

I will be using the allprods contrib so this solution intrests me! I haven't installed allprods yet, so I don't know if this will work. Maybe you can give it a try and see?

 

In more_categories.php replace this:

$info_box_contents[] = array('text' => $infoBox['name']);

 

with this:

 

$info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_ALLPRODS, '', 'NONSSL') . '">' . $infoBox['name'] . '</a>');

 

What it *should* do is change your infobox header name into a link to your allproducts page.

 

Let me know if it works!

 

Sheri

Share this post


Link to post
Share on other sites
What it *should* do is change your infobox header name into a link to your allproducts page.

 

One more thing. If you think this would confuse the user (to have the name as a link and not really be connected with the title of your infobox) then you could define a class for just this link so that it looks like all of your other "regular" text or headings.

 

like:

 

$info_box_contents[] = array('text' => '<a class="allprod" href="' . tep_href_link(FILENAME_ALLPRODS, '', 'NONSSL') . '">' . $infoBox['name'] . '</a>');

 

then define A.allprod {} in your stylesheet.

 

This is the style I made up to return the heading to a "normal" heading so that it didn't look like a link.

 

A.allprod{
font-size: 12px;
 font-weight: bold;
 color: #000000;
 text-decoration: none;
 cursor: text;}
A.allprod:hover{
font-size: 12px;
 font-weight: bold;
 color: #000000;
 text-decoration: none;
 cursor: text;}

 

I just tried the changes on my site (although the link goes to nothing) and it works nicely.

 

Cheers,

Sheri

Share this post


Link to post
Share on other sites
Hi Jared,

 

I managed to get my last post sorted out and the more catagories is now working well with the multistores contrib.

 

I am trying to expand on the idea talked about earlier in the thread about having different color backgrounds for each infobox header. Now I have already done with images on one site but this time I after doing it with the stylesheet.

 

This is what I have so far:

 

if ($i == 0) {

 $info_box_contents = array();
 $info_box_contents[] = array('text' => $infoBox['name']);

 new infoBoxHeading_red($info_box_contents, true, false);

 

The different background colors showing fine, the problem lies in the infobox name, the code above displays the more categories box number ie 0, 1, 2 etc.

 

What is the correct code for pulling in the box name because I have tried all sorts of things and nothing I do works :blink:

 

Any help you can give would be greatly appreciated.

 

Thanks

 

Mark

 

Jared.....

 

Are you there????

 

Or have you departed this mortal existance for a higher plain?


Lifes a bitch, then you marry one, then you die!

Share this post


Link to post
Share on other sites

Hi Sheri,

 

that worked a treat.

 

Not sure if it would be an issue or not but it changed infobox header name into a link for all my category boxes.

 

Anyway it works a treat and can be seen here if anyone is interested

 

My Webpage

 

Thanks again Sheri

 

Dave

Share this post


Link to post
Share on other sites

hello there, first of all, many thanks to Jared for creatiing such an long-awaited contribution for us!

But I do have a little problem when it comes to using it i :blink: I don't know where I can disable my "default" category, can someone give a hint? THX a million

Share this post


Link to post
Share on other sites
BUT I am still stumped on the indenting problem of 2nd level subcategories.

 

 

WOO HOO!!! SOLVED IT!! :D :D

 

Here is the problem code for the indenting issue found in more_categories.php:

 

$categories_string = "  ";

 

It is ALWAYS the little things eh?

 

Here is the new code that will solve the indenting issue:

 

$categories_string .= "  ";

 

That little itty bitty dot does the trick. With very little php knowledge I would say it is an "append" character.

 

I am delighted that I was able to solve this issue on my own. I have learned a great deal about php.

 

Thanks again for this mod.

 

Sheri :thumbsup:

Edited by muskokee

Share this post


Link to post
Share on other sites

@Sheri: Great job! The dot does mean "append" in php. Good catch.

 

@Annie Lou: You disable the "default" category box in Admin >> configuration >> More Categories.

 

-jared

Share this post


Link to post
Share on other sites
@Annie Lou: You disable the "default" category box in Admin >> configuration >> More Categories.

-jared

Thx Jared, didn't realized that i'd to go configuration dept, well, I guess by now you know I'm a rookie:)

I'll let you know how I go with it, can't wait to play with it ^^ Thx again

Share this post


Link to post
Share on other sites
@Sheri: Great job! The dot does mean "append" in php. Good catch.

-jared

 

Thanks :blush: Only took me 2 weeks to nab that little sucker :blink:

 

Sheri

Share this post


Link to post
Share on other sites

Wondering if someone could help me with a problem I am having.. Using the contrib and its working great..

 

I got stumped when I started to modify the look of my site. I added rounded corners to the bottom of all boxes. The easiest way I found was to simply add my table and images in every box.php at the bottom right before the final </td></tr>

 

This works for every box, including the BOTTOM category box. I cannot figure out how to get the first category box with this contrib installed to read that code. I thought it would just be at the bottom of the more_categories.php file.. But that will just add the rounded corners to the bottom most box. Any above it, it doesn?t put the code..

 

Soooo.. Can anyone please tell me where I can insert code into the bottom of all the boxes more_categories makes? I need just above the final </td></tr> of each box.

 

Been at it for hours and hours. I would greatly appreciate any help.

Share this post


Link to post
Share on other sites
Wondering if someone could help me with a problem I am having.. Using the contrib and its working great..

 

I got stumped when I started to modify the look of my site. I added rounded corners to the bottom of all boxes. The easiest way I found was to simply add my table and images in every box.php at the bottom right before the final </td></tr>

 

This works for every box, including the BOTTOM category box. I cannot figure out how to get the first category box with this contrib installed to read that code. I thought it would just be at the bottom of the more_categories.php file.. But that will just add the rounded corners to the bottom most box. Any above it, it doesn?t put the code..

 

Soooo.. Can anyone please tell me where I can insert code into the bottom of all the boxes more_categories makes? I need just above the final </td></tr> of each box.

 

Been at it for hours and hours. I would greatly appreciate any help.

 

 

hah.. Ignore my post. Been trying for at least 3 hours to do this, 5 minutes after I post I realize im an idiot and I moved the ending /tr and my code to the bottom of the file by mistake, instead of the loop or whatever makes all the boxes.. ugh.

Share this post


Link to post
Share on other sites

Hello all,

 

I have the following problem with this great contribution:

 

When i add categorie boxes on the left (A,B on screenshot) the boxes on the right (C on screenshot) are moving down which make's my shop awfull to look at. I included a screenshot to clear my question up.

 

problem7bb.jpg

Share this post


Link to post
Share on other sites

Hi Jared,

 

Back again :blush:

 

I have installed ultimate SEO by chemo and am now having an issue with the "?infobox=0" being tagged onto the end of my .html urls. It probably is something I should ask on ultimate seo's as well but thought I'd query you first.

 

The other clash with the seo contrib is that all categories show in all boxes regardless of where I have them assigned in the admin. Not good :( :( I feel like crying. I *need* both contribs.

 

I'll search around both contribs to see if I can find where they seem to be rubbing eachother the wrong way.

 

Look forward to your thoughts.

Sheri

Share this post


Link to post
Share on other sites

I installed the more category boxes contribution. It seemed to work fine but when I clicked on admin-->catalog-->categories-->more categories, it said I wasn't allowed to see the page as if I wasn't administrator. Well, I am administrator so I don't understand why I get this message. Can someone help me with that ?

 

I don't know if that has anything to do with it, but I had a problem with the step 4 of the installation. Indeed it said that I had to put this code in admin/includes/boxes/catalog.php :

 

'<a href="' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXPECTED . '</a><br>' .
							   '<a href="' . tep_href_link(FILENAME_MORE_CATEGORIES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_MORE_CATEGORIES . '</a>');

 

Well, what is weird is that I actually had this code in my file :

 

//Admin begin
//								   '<a href="' . tep_href_link(FILENAME_CATEGORIES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS . '</a><br>' .
//								   '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES . '</a><br>' .
//								   '<a href="' . tep_href_link(FILENAME_MANUFACTURERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_MANUFACTURERS . '</a><br>' .
//								   '<a href="' . tep_href_link(FILENAME_REVIEWS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_REVIEWS . '</a><br>' .
//								   '<a href="' . tep_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_SPECIALS . '</a><br>' .
//								   '<a href="' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXPECTED . '</a>');
							   tep_admin_files_boxes(FILENAME_CATEGORIES, BOX_CATALOG_CATEGORIES_PRODUCTS) .
							   tep_admin_files_boxes(FILENAME_PRODUCTS_ATTRIBUTES, BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES) .
							   tep_admin_files_boxes(FILENAME_MANUFACTURERS, BOX_CATALOG_MANUFACTURERS) .
							   tep_admin_files_boxes(FILENAME_REVIEWS, BOX_CATALOG_REVIEWS) .
							   tep_admin_files_boxes(FILENAME_SPECIALS, BOX_CATALOG_SPECIALS) .
							   tep_admin_files_boxes(FILENAME_MORE_CATEGORIES, BOX_CATALOG_MORE_CATEGORIES));
//Admin end
 }

 

So the part I was supposed to modify was commented out, I don't know why. Anyway, I kinda went around that by uncommenting this part and making the needed changes but maybe I wasn't supposed to do so...

 

I also would like to say that my oscommerce language is French, maybe it could also have something to do with my problem.

 

Thank you very much for your help !

Share this post


Link to post
Share on other sites
Look forward to your thoughts.

Sheri

 

Hello again,

 

Turned off Ultimate SEO...the categories are still duplicated in each infobox. The url shows the proper infobox#.

Thought it was a conflict in the auto database install with USEO but it is not.

 

Why would the categories be dulpicating themselves in all category infoboxes?

 

Sheri :(

Share this post


Link to post
Share on other sites
Why would the categories be dulpicating themselves in all category infoboxes?

Sheri :(

 

ACK! Tried to edit the above post but the forum got stuck.

 

Here is the addition I wanted to add to the post

 

 

Another interesting thing: My database does not show these categories listed in the second infobox. I have left them all the same category to test whether just one would show up. That one category id is listed for all 25 slots...just the way I assigned it in admin.

 

Sheri

Share this post


Link to post
Share on other sites

Well,

 

Wincompare did it again :-" :-"

 

I have NO idea how a query in the boxes file got changed...but it did. I reverted back to the original line and PRESTO no more issues.

 

Sorry to waste space on this thread :(

 

Sheri

Share this post


Link to post
Share on other sites

Has it ever happened to anyone that, after installing the more categories contribution, you could not reach admin-->catalog-->categories-->more categories because it said you did not have access to it (see my post above) ?

Share this post


Link to post
Share on other sites
Has it ever happened to anyone that, after installing the more categories contribution, you could not reach admin-->catalog-->categories-->more categories because it said you did not have access to it (see my post above) ?

 

No. Never happened to me

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×