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

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

Share this post


Link to post
Share on other sites

Thank you very much Jack @Jack_mcsfor your support of the OSC community.

Especially for your excellent support and for SHARING.

Cheers

Valqui


Please do not falsify my words. Are you interested in knowing who does it? Send me a PM.

The Phoenix Club won't allow me to join - why not?

Setting up a new Frozen site with so many nice addons available on the market. 

:heart: Community Oscommerce fan :heart:

 

Share this post


Link to post
Share on other sites

I have recently installed this extension on my fresh OSCOM Phoenix and I must say that I find really nice and useful.

Thanks a lot!!! 👍👍👍

 

Unfortunately, I have come across one small issue in it.

The extension works perfectly for categories (i.e. in index) but it gets "lost" when it comes to sub-categories (i.e. in index_nested).

 

Having investigated this issue a bit, I discovered that the links that this extension creates for sub-categories lack the part that points at categories.

What I mean is that normally the links to categories have such a form:

[...]/index.php?cPath=24

but sub-category links are somewhat different and look like this:

[...]/index.php?cPath=24_28

 

Your extension creates them in their shortened form, like this:

[...]/index.php?cPath=28

i.e. without the category part of the link.

Such links actually do their job, i.e. they will take us to the sub-category we have chosen, but clicking on one of them breaks the path in the breadcrumbs bar (it shows "Catalog" and then the sub-category only, missing the category at all).

At the same time, it also shuts the view of the subcategories (that I have activated) in the Categories menu on the left (i.e. only the first-level categories are shown).


As I said before, I really like this extension (the same as many others that you have created) so I just thought that it might be something that you would want to fix in the next release.

What do you say?

Share this post


Link to post
Share on other sites
12 minutes ago, Pedros said:

Such links actually do their job, i.e. they will take us to the sub-category we have chosen, but clicking on one of them breaks the path in the breadcrumbs bar (it shows "Catalog" and then the sub-category only, missing the category at all).

At the same time, it also shuts the view of the subcategories (that I have activated) in the Categories menu on the left (i.e. only the first-level categories are shown).

Those are issues with Phoenix, not this addon.

Share this post


Link to post
Share on other sites

@Jack_mcs It depends on the point of view.

Phoenix apparently requires the long version of the links to display the correct path in the breadcrumbs bar.

If you want to make your extension work with it correctly, then such long links should be used.

It's that extensions are supposed to work with the main software that they are created for and not the other way round.

 

Also, I believe that replacing the short links with their long equivalents will not be a big deal for you, will it?

Once they are replaced, your extension will work just perfectly as it is supposed to, as I cannot find any other flaws in it.

I'm no programmer but I'm sure that for you it is a piece of cake and you will be able to release a fully functional and much needed add-on.

Share this post


Link to post
Share on other sites

The code works correctly with Phoenix. Plus, it is a non-issue as far as I'm concerned. It doesn't have any affect on SEO and I don't think it would confuse customers. But if it bother you, can try this change, though I've no idea if it will work since, as mentioned, the problem is in Phoenix. In each of the template modules, find

cPath=' . $sub_cat['categories_id']

and change it to

cPath=' . tep_get_path($sub_cat['categories_id'])

 

Share this post


Link to post
Share on other sites

A little unfair to say " the problem is in Phoenix " when the code in this addon is extremely outdated. 

Use/extend (as appropriate) the category tree CLASS. 


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
1 hour ago, burt said:

A little unfair to say " the problem is in Phoenix "

I didn't mean it that way. The code that sets the cPath, which is what the op is talking about, is standard oscommerce code. As mentioned in this thread it describes not being able to display the breadcrumb path in Phoenix. The op is asking me to change the code in this addon to fix that. I can't do that because Phoenix doesn't show the full breadcrumb. As mentioned, I don't see it as a problem. But if it is a problem, it is because of how the core code is working and I was just pointing that out.

Also, as mentioned previously, this addon hasn't been updated since Phoenix was released so I make no claims that it will work with Phoenix.

Edited by Jack_mcs

Share this post


Link to post
Share on other sites

@Jack_mcs The change of code that you suggested didn't work as expected but it showed me the path, so to say :D .

I have replaced all the three occurrences of:

'cPath=' . (int)$categories['categories_id']

with:

tep_get_path((int)$categories['categories_id'])

...and now your extension works just perfectly. 👍

 

I am no programmer so I have no idea if this code is valid; the only thing I know is that it does work.

Still, if you think it should be corrected or modified, just let me know, please.

 

As for now, I can finally activate the index_nested and index_products parts knowing that they will show both the complete and correct breadcrumbs path and the second-level of sub-categories in the left menu box.

Once again, thanks a lot for the extension itself and for the directions of how to fix it!

 

BTW Do you think that I should also replace the code from your original suggestion?

I don't really know the role of this "if" condition in which this part of the code is, and as I said I am no programmer so I can't tell if it can be important in some circumstances.

Share this post


Link to post
Share on other sites

I don't think the use of categories['categories_id'] in all files isn't correct since the code uses a different name. But if it works for you, then it is fine. But, to be clear, are you saying the breadcrumb now shows the full path?

Share this post


Link to post
Share on other sites

@Jack_mcs What I can confirm is that, when using this add-on, the breadcrumbs path is no longer broken or incomplete when it comes to showing sub-categories, which before changing the code simply disappeared from the breadcrumbs path.

There is another issue with the breadcrumbs path and multi-category products, which then has nothing to do with your add-on, and which is unfortunately still not fixed. :(

Share this post


Link to post
Share on other sites
6 hours ago, Pedros said:

There is another issue with the breadcrumbs path and multi-category products, which then has nothing to do with your add-on, and which is unfortunately still not fixed.

Then I misunderstood the issues. I thought they were the same but apparently not. Thanks for reporting the results. I will apply the changes to the next version.

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

×