Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I... categories main page help required?


offie

Recommended Posts

Posted

Hi, I have seen a website which has used the oSc design and I like the look of their home page which has 9 imges on the main page which are also clickable to go to the relevant section.

 

The best way to see what I mean is to visit their website, www.rashmian.com

 

I have searched the contributions section but can not find how to do this, does anyone have an idea on where I could find either the contribution or code and how to make my home page look like this?

 

I have used the featured products contribution but this does not do what I was hoping.

 

Thanks in advance.

 

Michael

Posted

The Categories Images Box addon can do this -- see my sig for the link. You'll need to play whit the settings a bit to get it to look exactly like that.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Posted
The Categories Images Box addon can do this -- see my sig for the link. You'll need to play whit the settings a bit to get it to look exactly like that.

 

Regards

Jim

 

Thanks Jim, I'll give it a go.

 

Michael

Posted
Thanks Jim, I'll give it a go.

 

Michael

 

Hi Jim, sorry to bother you again but just a little query.

 

You state in your install file that the modifications to the supplied files are marked with "Categories Images" to make them easier to find.

 

I found a file comparison application which works great, called ExamDiff. When I load the pages such as index.php it highlights the differences in a yellow background and areas where there is no text on either side it highlights with grey. I got round to changing all the differences in the index.php and includes/filenames.php but when I got to the includes/languages/english.php I realised that not all the changes have to be made because in my english.php I have areas amended so that it shows dates etc in the UK format. It then dawned on me that not everything has to change as I dont want to go back to the US date version etc. I have also modified several other files with different contributions.

 

The big (or little) question is, can you tell me how many changes are critical in each of the 6 files to make your contribution work?

 

For example, in the main index.php file my file comparison program has highlighted 8 differences in the files, now all of these differences may not be critical to your contribution but might have an effect on other contributions and because I have loaded several contributions over the last couple of weeks I am not sure which parts definately need changing.

 

I have changed the parts which were highlighted in grey but have now left the others alone until I get a response from you.

 

Perhaps in your install file you could state how many changes are needed in each file as well as saying that files are marked with "Categories Images" to make them easier to find.

 

Unfortunately I do not know what is meant by files are marked with "Categories Images" to make them easier to find because I have nothing showing which looks like a category image.

 

Thanks for any help and sorry my post is so long.

 

Michael

Posted

I meant that the code is marked with

// Categories images box

to indicate the following line is changed, or

// Start Categories Images Box  
//////////////// <code here> /////////////////
// End Categories Images Box

for changes involving multiple lines of code. Anything that is not marked should not need to be changed. If this is still not clear, compare the files in the distribution to stock osCommerce 2.2RC2a -- any changes that show up need to be made in your code.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Posted
I meant that the code is marked with
// Categories images box

to indicate the following line is changed, or

// Start Categories Images Box  
//////////////// <code here> /////////////////
// End Categories Images Box

for changes involving multiple lines of code. Anything that is not marked should not need to be changed. If this is still not clear, compare the files in the distribution to stock osCommerce 2.2RC2a -- any changes that show up need to be made in your code.

 

Regards

Jim

 

Thanks once again Jim, I will have another go now.

 

Michael :)

Posted
Thanks once again Jim, I will have another go now.

 

Michael :)

 

So sorry to bother you again Jim but does the code in the stylesheet.css provided with the download need adding to my stylesheet.css?

 

Also what is the file admin.xcf used for, it is not mentioned in your install documentation?

 

I have now looked in all the php files supplied and have found all the code marked with the categories image box as stated, thanks for the help with that.

 

Michael

Posted

Everything in the catalog folder needs to be added to your files. The rest is documentation, database (which needs to be run against your database) and examples. The stylesheet file is used by the install.html file only, and the admin.xcf is the original of the admin.jpg that I forgot to take out of the distribution.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Posted
Everything in the catalog folder needs to be added to your files. The rest is documentation, database (which needs to be run against your database) and examples. The stylesheet file is used by the install.html file only, and the admin.xcf is the original of the admin.jpg that I forgot to take out of the distribution.

 

Regards

Jim

 

Fantastic Jim, never known such quick replies.

 

Thanks for the info and I am pleased to say that I have now made all the required changes and am about to see what it looks like, fingers crossed.

 

Michael :)

Posted
Fantastic Jim, never known such quick replies.

 

Thanks for the info and I am pleased to say that I have now made all the required changes and am about to see what it looks like, fingers crossed.

 

Michael :)

 

Hi Jim, I have changed everything and the admin side looks as its supposed to be but the categories are not showing on my home page.

 

I have installed the contribution featured products:

 

http://addons.oscommerce.com/info/651

 

Do you think the code that was changed for this has affected your contribution.

 

Michael

Posted

Featured Products installs in the same file, so it could interfere if you're not careful. Or you may have just pasted the code in the wrong location. Look in the page source for the comments

<!-- categories_images //-->

If you can find that comment, the code for the box should be right after that.

 

If you don't see it, check that you have Show box set to true in your admin, and that you have some categories set up to show in the box.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Posted
Featured Products installs in the same file, so it could interfere if you're not careful. Or you may have just pasted the code in the wrong location. Look in the page source for the comments
<!-- categories_images //-->

If you can find that comment, the code for the box should be right after that.

 

If you don't see it, check that you have Show box set to true in your admin, and that you have some categories set up to show in the box.

 

Regards

Jim

 

 

Hi Jim, my admin is set to:

 

Title Value Action

Show box True

Show images in box True

Show name in box True

Show description in box True

Box style Rows

Box columns 3

Box frame style Simple

 

I also used the compare pages program to make sure I put the code in the right places. Which file do you want me to look in for the page source categories_images.

 

I may take out/reverse the featured products section so that this contribution works instead if that is where the problem is.

 

Michael

Posted

You should be able to get both addons to work. It just needs some work to put the code in the right places.

 

The comments should show up in the page source when you view the Index page for your store (Top level, not in a category.)

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Posted
You should be able to get both addons to work. It just needs some work to put the code in the right places.

 

The comments should show up in the page source when you view the Index page for your store (Top level, not in a category.)

 

Regards

Jim

 

Hi Jim and good day.

 

I have looked at all my code again and for some reason not all of it saved so i have changed it all again and double checked it. It all looks to be there now.

 

However when I set up as:

 

Show box True

Show images in box True

Show name in box True

Show description in box True

Box style Rows

Box columns 3

Box frame style Simple

 

The images are not showing. I have tried it in Rows and Grids and the images are not showing.

 

Another problem is that when I have it in Stock View or Simple view the relevant boxes load ok (without the images as above) but when I change it to Plain view I get an error message which says:

 

Fatal error: Cannot instantiate non-existent class: borderlessbox in /mystore/includes/modules/categories_images.php on line 146

 

Please help again, (nearly there)

 

Michael

Posted
Hi Jim and good day.

 

I have looked at all my code again and for some reason not all of it saved so i have changed it all again and double checked it. It all looks to be there now.

 

However when I set up as:

 

Show box True

Show images in box True

Show name in box True

Show description in box True

Box style Rows

Box columns 3

Box frame style Simple

 

The images are not showing. I have tried it in Rows and Grids and the images are not showing.

 

Another problem is that when I have it in Stock View or Simple view the relevant boxes load ok (without the images as above) but when I change it to Plain view I get an error message which says:

 

Fatal error: Cannot instantiate non-existent class: borderlessbox in /mystore/includes/modules/categories_images.php on line 146

 

Please help again, (nearly there)

 

Michael

 

Forget the message about missing images Jim, when i went back into admin/catelog I now get an extra box to load images which were not there before. I have juist tried it with any image and they load ok. Its just the error on plain view I need to sort now. Thanks

Posted

Sounds like you missed an edit in catalog/includes/classes/boxes.php.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Posted
Sounds like you missed an edit in catalog/includes/classes/boxes.php.

 

Regards

Jim

 

Thanks so much Jim, that sorted it.

 

Just so you know it does not mention this file, boxes.php, in the install documentation. It mentions 3 files on the catalogue side and 3 files on the admin side. It would not matter if users were just transferring/swapping their files for yours but as I was editing my files I printed off the install instructions so I could cross each one off as I did them.

 

Having said all that its been fantastic to get all your help and so quickly as well, I could not have done it without you.

 

All the very best

 

Michael :D

Posted

Just another quick question which will be helpful to other users as well.

 

Is it possible to limit how many categories are shown? I would like to limit it to 9 at the moment even though once I get everything uploaded I will have far more than 9 categories.

 

Can I choose which category to show? If I can limit the amount shown I would like to change which categories are shown on a regular basis.

 

I know I can change how many are shown in the grid and I have checked that that works fine but ideally I want a grid design with 3 rows only with each row having 3 categories only. 9 categories in total.

 

Thanks, Michael

Posted

Sorry about the missing file in the instructions. I'll fix that in the next release.

 

You can limit the number of categories shown in the box by adding a bit of code to catalog/includes/modules/categories_images.php. Find this at line 33:

										 and c.categories_id = cd.categories_id 
									 and cd.language_id = '" . (int) $languages_id . "' 
								   order by c.sort_order

and add the following immediately after that:

									   limit 9

Use whatever number of categories that you want to show in place of the 9 I used. Having a category selectable on an individual basis will take a bit more changing. I'll put that on the wishlist for the next upgrade.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Posted

So I am wondering if this too is my answer?

 

I am trying to edit the TEXT of my categories link/list on the home page.

I have the new categories in the DB with the correct naming, I have edited my home page image files.

 

I cannot find any image slices for this such as logo.gif etc...

I cannot find anything in the knowledge base (maybe I am blind)

 

I have searched extensively for .php files to find anything concerning categories, categories_id, categories_name or anything linking to but cannot find it.

 

So how do get the text links to change on site?

 

here is a cropped screen shot the default template categories list.

 

categoriesedit.jpg

 

any help appreciated

Posted

Your category names are set in Admin -> Catalog -> Categories/Products -- if that's what you are asking. If not, I have no idea what you want.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Posted
Your category names are set in Admin -> Catalog -> Categories/Products -- if that's what you are asking. If not, I have no idea what you want.

 

Regards

Jim

 

yes that is what I want...well sort of.

 

I have already changed them in admin/catalog/categories & products

 

however they are not changing on my web site...so that is really what I am looking for. how to get them to change on site?

so I was wondering if the contribution referred to earlier in this thread would allow me to change them.

Posted

No. The category names are a basic function of osCommerce. If changing them in the Admin doesn't work, you have something seriously wrong somewhere. If you've added something to the site recently, that's probably the cause. If you are using a template, that is another place to look.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Posted
If changing them in the Admin doesn't work, you have something seriously wrong somewhere. If you've added something to the site recently, that's probably the cause. If you are using a template, that is another place to look.

 

Regards

Jim

 

Nothing new added to the site other than editing a few image files that are not related to the issue.

 

I am using a template

I have already edited the default template homepage, categories page, products page, and cart page images to what I want the categories links to read.

 

problem is they won't show even though the template image and the categories in osc back end have been changed. so any thoughts on where/how I get them to change?

Posted
Sorry about the missing file in the instructions. I'll fix that in the next release.

 

You can limit the number of categories shown in the box by adding a bit of code to catalog/includes/modules/categories_images.php. Find this at line 33:

										 and c.categories_id = cd.categories_id 
									 and cd.language_id = '" . (int) $languages_id . "' 
								   order by c.sort_order

and add the following immediately after that:

									   limit 9

Use whatever number of categories that you want to show in place of the 9 I used. Having a category selectable on an individual basis will take a bit more changing. I'll put that on the wishlist for the next upgrade.

 

Regards

Jim

 

 

Again thanks, that works fine. Now all I need to do is alter the size of the images shown.

 

At the moment it is doing the following: 576px × 576px (scaled to 100px × 80px). Where do I need to go to alter the scaling part and have a fixed size, probably width 150 x height 200. Is it in the index.php, stylesheet.css, boxes.php or categories_images.php

 

Thanks, Michael

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...