Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Category Images


Jack_mcs

Recommended Posts

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

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

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

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

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

  • 4 months later...

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?

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

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

Link to comment
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'])

 

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

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

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

Link to comment
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?

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 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. :(

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

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!

Sure thing you'll need to verify the code changes again as the ones that I have introduced, even though seeming to work, may as well be incomplete or incorrect from a programmer's point of view.

 

BTW I'm just wondering if the tep_get_path could provide the solution for the other issue...

Link to comment
Share on other sites

  • 4 months later...
8 hours ago, ce7 said:

I know this addon on has manufacturer_images.css,

It has category_images.css in the ext/css/directory. The manufacturers_images.css file is for a different addon. Try changing the background:white; setting to whatever you want.

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