Jump to content

Recommended Posts

On 10/17/2018 at 2:10 AM, Jack_mcs said:

@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.

@Jack_mcs    Hi Jack,

Thank you very much for your reply. Trying to fix the category problem still... so leave this later...

Can I please have another question, this time it is related to category image. I like the design provided. I also have Jim's theme switcher installed. If i change the theme to UI setting, then category background remain white, and the text disappeared (if it is dark UI background.)

Is it possible to have category image working with UI setting, so whenever change the theme, the css setting can go together with UI changes?

Many thanks!  Lyn

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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.

 

Share this post


Link to post
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


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

@ArtcoInc The add-on works fine on Phoenix but as Jack_mcs states above a category image is needed - no coded change is required - (the add-on is called category images)! :)

Share this post


Link to post
Share on other sites

There are some sizing utilities which might do a job for you;

https://getbootstrap.com/docs/4.3/utilities/sizing/

h-100
or
mh-100

might work


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

@Jack_mcs Sorry, this could be just me but... on ipad view (using an emulator - chrome inspect page tools, which might be the issue, don't know), the sub-category names wrap nicely but the category names do not, overflowing the container on Phoenix. On Frozen (again on ipad view) the containers are not filling the screen width.

Share this post


Link to post
Share on other sites

@HeatherbellI only have a local test shop set up with this addon but they display correctly. If you will PM me a link to your site I will take a look to see what it might be. I can say that there is not any css for mobile devices so I suspect that is what is needed to fix it. 

Share this post


Link to post
Share on other sites
Posted (edited)

@Jack_mcs

16 hours ago, Jack_mcs said:

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.

I had considered that too. The screen shot above was from early in my testing. Afterwards, I did indeed add an image to the second category. No change ...

2070281391_ScreenCapture2019-07-18-A.jpg.cf8418cb6407f84ef3ec07f6cbea03cb.jpg

*** HOWEVER ***

16 hours ago, Jack_mcs said:

 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">

 

This works!

127847592_ScreenCapture2019-07-18-B.jpg.7667a3ef67f4b6ac5e7eb515300ab481.jpg

You may wish to include this in your next update of this module.

Thank you!

M

(and yes, I am still working on making everything look 'pretty' with CSS)

 

*** UPDATE ***

To make this work, I needed to apply the code edit above *AND* the New Equal Height Module. If I turned the Equal Height Module off (after applying the code edits), the boxes revert back to different sizes.

HTH

Edited by ArtcoInc

Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites
7 hours ago, ArtcoInc said:

To make this work, I needed to apply the code edit above *AND* the New Equal Height Module. If I turned the Equal Height Module off (after applying the code edits), the boxes revert back to different sizes.

Yes, that is correct. The "equal-height" added to the code is just a flag to tell the equal height module where to look. They are both required for it to work. You will also need to make the code change in the other template files for this addon as well if the problem is seen for them. That part of the code is the same in each so it should be easy to find.

Thanks for posting that it worked.

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

×