Jump to content

Slight Image Problem would like advice please


Guest

Recommended Posts

Hi all I have had some great help over past weeks and a small please help needed again.

on my main Cats i have about 10 images that are a bit too big ...BUT when you click on those images ( which i have upload to show and replace those blue folder images) you then goto the sub cats section which shows that same big image and thats is ok ( as the sub cat image but i need to reduce these images when they show in the main cats section.

Any advice

main Cats page:

http://www.buskersmoorcroft.co.uk/cart/ind...viewCat&catId=2

when you click on imageto goto Sub Cats

http://www.buskersmoorcroft.co.uk/cart/ind...viewCat&catId=6

so : Sub cats image ok ...but main cats image too big ( problem is they both refer to the same image?? when you click on them)

please please help i am very near the end of completion after a 3rd re install ;)

Link to comment
Share on other sites

Guest degsey69

Hi there,

Looking at the site I think I know what you mean, you should show the catergory pictures small, perhaps like mine.

http://www.mpc-direct.com/index.php?act=viewCat&catId=18

Is this what you want? So that you can see the catergories all at once nearly instead of scrolling down the page. You should resize the images using photoshop to 100x67 pixels, effectively creating your own thumbnails.

Rename this images and upload again through admin into the catergory section (after deleting the old images first), so basicaly you have the same image twice in 2 sizes one for cats, one for products. In the subcatergory Cubecart resizes the image and saves as a thunbnail anyway.

Also in cubecart.org there is a free mod called fix thumbs and that is good to set the thumbnail images in the catergory more uniformly. ;)

Link to comment
Share on other sites

Hi thanks for that but its not quite what i want.

I am happy with the size of the second sub cat image but i want the first cat images ( like your first page ) too be smaller.

I think even if i do 2 lots of images one small than other wont make any difference because when you upload an image for your main cats it uses that image to display the second cats grouping.

;) i know it may sound confusing: but basically i want the size i have now is ok for second cats only but i need to show the same image small ( like yours...thumbnail size) when customer just click a main cat section then click on the small thumb image which then goes to that product which shows that image bigger ( like it is now) :) sorry if its confusing even more.

Link to comment
Share on other sites

can any one tell me do i need to upload 2 seperate files of each image to get this effect?? or can it be done automatically some how vuia altering scripts?

Link to comment
Share on other sites

Guest Brenty

can any one tell me do i need to upload 2 seperate files of each image to get this effect?? or can it be done automatically some how vuia altering scripts?

I see what's happening - You want a thumbnail for the sub-category list (For instance when you click Moorcroft 2006 Range as the main category, with the subcategories displayed), and then you want the same sub-category image displayed at the top of the sub-category when the products are being listed underneath.

This is really something that CubeCart should do as standard using the GD functionality (With a few lines of code to make it work).

The other way is to force the image size display through the skin's image HTML. You're using the Killer skin, I've only just started looking through the code, so can't tell you at this moment where to find the code that displays the images (and subsequently would allow scaling of them accordingly). I do know that this is somewhere in the page content - viewCat controls the category display (Where the items are listed underneath), not sure if this covers the sub-category display yet or if that's in another file.

Hope that can at least point you in the right direction until I or someone else can throw some code onto here.

EDIT:

OK, I found the code that displays the sub-categories. It was in the file I mentioned above, and this is the section of code that needs to be modified:

<!-- BEGIN: sub_cats -->

<div id="subCats">

	<!-- BEGIN: sub_cats_loop -->

	<span class="subCat">

		<a href="index.php?act=viewCat&amp;catId={TXT_LINK_CATID}" class="txtDefault"><img src="{IMG_CATEGORY}" alt="{TXT_CATEGORY}" border="0" title="{TXT_CATEGORY}" /></a><br />

		<a href="index.php?act=viewCat&amp;catId={TXT_LINK_CATID}" class="txtDefault">{TXT_CATEGORY}</a> ({NO_PRODUCTS})

	</span>

	<!-- END: sub_cats_loop -->

I'm off to have my supper, I'll post up a MOD on here later with the code changes for you and anyone who has this specific problem.

Link to comment
Share on other sites

Guest Brivtech

Here's the fix - it's been passed to me. Always backup your files before editing them.

In skins/Killer/styleTemplates/content/viewCat.tpl

at the beginning, (5 lines down) in the section... <!-- BEGIN: sub_cats -->

is the code for displaying the images. As there is no image size set, you will get the image displayed to whatever size the image originally is.

To change this, you need to add the following in the code:

width="100" height="100"




Add it here where the ###### is:




	<!-- BEGIN: sub_cats_loop -->

	<span class="subCat">

		<a href="index.php?act=viewCat&amp;catId={TXT_LINK_CATID}" class="txtDefault"><img src="{IMG_CATEGORY}" ###### alt="{TXT_CATEGORY}" border="0" title="{TXT_CATEGORY}" /></a><br />

I've used 100 pixels as an example, however, these are larger than the normal folder icons. Play around with it and see how you get on with different dimensions.

I notice the images on your website are not equal height and width, so you will need to either put up with disproportionate scaling, or use a size that has a 1:1 ratio.

Link to comment
Share on other sites

Brivtech you are a star :D that is fantastic just what i was after very easy to follow and alter took all of 30 secs to do.

I am sure this would be very handy for many otherssuch a simple mod and all is solved.FANTASTIC!!

My only thing left to do is to try to see if there is a way to include the " stock " code ( like in the end of the checkout) so that customers can see if its in stock or not straight away. I know i can just add this TEXT to each product's description but would be nice to show this is the lower product viewing cats.

similar to this site ( this is what was wanted all along really) But i think this next task is for another posting which i have done already ( about 2-3 days ago)

Thanks for all your help anyway. Cheers :wacko:

Link to comment
Share on other sites

Guest degsey69

That looks nice now!

I noticed that there ia a gap on one of the lines, this can be eliminated by playing with the size of the width and height in this case by decreasibg the value until they all fit say 98x98 etc :wacko:

Link to comment
Share on other sites

That's the same method I used for the site in my sig, Bellissimo Glassware - the static size is set so your visitor's browser resizes the images. When clicking a subcat, you see the full-size image at cat page. :)

Only downside to this is that your browser is slowed a little since it has to re-size images before displaying them.

Link to comment
Share on other sites

Thanks every one i am nearly there now, I have learnt a lot and especially to do what the customer wants ( they can be a pain some times when they dont understand anyhting ) My client keeps saying can you just add this or take away that as though its a simple word document..lol

any way many thanks again to all that have helped.

Link to comment
Share on other sites

  • 8 months later...

I'm having the same problem but this fix did not work for me. I also have the problem of different sized images for each category. What am I missing? Is there a way to put the sub categories in a table so size doesn't mater? I also have this problem on my index page with latest product images if I use more than 4.

Any ideas? I'm new to CC3 so be gentle with me please.

http://www.cutenkinky.com/cart2/index.php?...Cat&catId=4

BC

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