Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Category Images


Jack_mcs

Recommended Posts

This addon is a bootstrap module that displays the category images on the home page. The category description can also be displayed via a setting.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Jack

 

Just installed the latest version of this addon and have the following error when selecting the sort by name option.

1054 - Unknown column 'c.name' in 'order clause'

select c.categories_id, c.categories_image, cd.categories_name, SUBSTRING(cd.categories_description, 1, 1000) as categories_description from categories_description cd left join categories c on c.categories_id = cd.categories_id where c.parent_id = '0' and cd.language_id = '1' order by c.name limit 12

[TEP STOP]


 

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

A new version has been uploaded with these changes:

  • Added an option to choose which category description to use.
  • Added a see more link to the category description.
  • Added css for total control of the appearance.
  • Changed the category name into a link.
  • Moved the css changes from the install instructions file to the user.css file.

NOTE: If you already have this installed, be sure to uninstall it before doing anything else.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

It uses the equal height module. You may need to install that in admin->Modules->Header Tags. Depending upon your version of oscommerce, you may need to upgrade the module in your shop to this one or this one

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

@Jack_mcs

Thank you. I'm using the latest version of Edge. I do not see any Equal Height header tag available. I *think* @burt replaced it with a CSS solution instead.

With that in mind, do you have a preference of which of the two add-ons you suggested to use? Or, is there a CSS solution instead?

TIA

Malcolm

Link to comment
Share on other sites

If you are using the latest version with Gary's change to it then that is the same as the second addon I mentioned. I don't know if that still requires the equal height module to be installed or not so you may want to try enabling the one already in your admin. If it doesn't work, try the first one I mentioned.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

@ArtcoInc 

Jack has coded in row list-group at

<div class="row list-group" itemtype="http://schema.org/ItemList">

so that should be enough to invoke the inbuilt .css solution (edge)...and it should equalise the output...

If a "group" of boxes is inside a "row list-group", they should be good.

Link to comment
Share on other sites

Gary: Thanks for checking.

ArtcoInc: You may need to adjust the width and/or column count in the settings of this module. 

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

@Jack_mcs @burt

On 10/2/2017 at 5:51 PM, Jack_mcs said:

It uses the equal height module. You may need to install that in admin->Modules->Header Tags. Depending upon your version of oscommerce, you may need to upgrade the module in your shop to this one or this one

I did need to install one of the add-ons you suggested (it did not display properly without one). The first one you suggested worked. The second one didn't.

You *might* want to include this info in the installation instructions. :cool:

Thank you both for your help!

Malcolm

Link to comment
Share on other sites

  • 1 year later...

I'm not sure I understand your question but I think you are wanting to change the appearance of the sub-category pages. If so, yes, that is possible but it would involve a bit of coding. A new module would have to be created for the sub-category section. Duplicating the current one would work, once the names are all changed. then the code in it would have to be edited to just show the sub-categories. It's not the sort of thing I can walk through in a support thread since it involves too much.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

15 minutes ago, ce7 said:

So if you see the image attached, there are many tiers of sub-categories, and right now with your categories images, once click on the ones have sub-categories, it will show products only. Instead, I like to be able to show only sub-categories, and if no sub-categories then show up the products. And if you click on the next tier sub-sub categories, it did the same thing till the final tier of the sub-categories, no more sub-category and show only products.

I don't recall if you mentioned the version of oscommerce you are using but in the CE version, there are modules to display the sub-categories. Are you using those?

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

@ce7I wasn't referring to an addon. The CE version comes with category listing modules. You just need to install them in admin.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

9 hours ago, ce7 said:

Thank you for reply. I had the category listing set asTrue all the time, but it doesn't show the category or sub-category at all from the beginning..... 

Just to be clear, there are two category listing modules: one in the index nested group and one in the index products group. They only apply to those groups and will only show sub-categories belonging to the category being shown.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

@ce7All versions of oscommerce have used the index.php file to show the categories that are nested (sub-categories) and the categories that have products. For the ones that have products, the products were shown instead of additional sub-categories. But there was a code change available to show both.

In the CE version,  the code to list the categories for each section was moved to modules in those module groups. All those modules do is display the sub-categories of the category currently showing. Neither will show products. You can use the included new products module if you want to show new products in those sub-categories or install an addon like Featured Products if you want to control which products show.

If you want the products to be controlled by the category modules, you will need to edit those modules. Though that is defeating the purpose of the modules and I don't recommend it.

This line of questions is beyond the scope of this support thread so please open a new thread if you wish to continue it.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

You would need to edit the css for this addon.I can't say what to change specifically since it would vary with the theme.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 8 months later...

A new version has been uploaded with these changes:

  • Added a version for Phoenix.
  • Added an option to allow controlling which categories are displayed.
  • Added a module for sub-categories.
  • Added a module for categories with product pages.
  • Changed install text to mention the equal heights addon.
  • Corrected mistake in the module that was storing some of the settings in the wrong place.
  • Corrected mistake in the css that would prevent other css from working.
  • Moved the css code from user.css to the ext/css/category_images,css file.
  • Replaced unused variable with the correct code. Found by member @Moxamint.

 

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

@Jack_mcs

Thank you for your contribution! I have just installed your new version into Phoenix.

1231034133_ScreenCapture2019-07-17.jpg.23c8445911ac3b3039197ccea54091a6.jpg

(please ignore the colors, background texture, and other CSS changes)

In your Install_Readme.txt file, you state:

5 - If the boxes are not aligned properly and you are using a Bootstrap shop,
    you may need to install this addon:
    https://apps.oscommerce.com/2G1Sc&new-equal-height-module-bootstrap

I have installed it. As you can see from the screen shot above, it had no effect. Do you have any suggestions for getting these boxes equal height in Phoenix?

Thanks in advance!

Malcolm

Link to comment
Share on other sites

3 hours ago, ArtcoInc said:

I have installed it. As you can see from the screen shot above, it had no effect. Do you have any suggestions for getting these boxes equal height in Phoenix?

That addon only works in BS3 shops because it uses the "equal-height" class and that class is not used in BS4 (Phoenix). I haven't looked at the code in Phoenix to see how that problem is handled but the following should allow that addon to work. In the includes/modules/content/index/templates/category_images.php file, change this line

<div class="card-body category-images-item">

to

<div class="card-body equal-height category-images-item">

But to be clear, the main reason the two boxes are so different in height is because the second one is missing the image. If you add an image for it that might fix the problem. If you don't have an image for a particular category, creating one for a replacement, like "No Image Available" would be the best choice.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...