Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 08-12-2004 19:18:14

gldweb
Member
Registered: 03-17-2004
Posts: 166

Category Image On Ste_cat

Hi there - I am trying to have the image of the category to display on the Online Store - Category (ste_cat) without success. I have tried inserting the code below and all I get is the "Photo not Available" graphic.

Code:

(CGIGET TYPE="SUB" VALUE="ste_cat_show_image" PARAMS="(CGIVAR)category_imgsm(/CGIVAR)")

The image is there but for some reason when I check the properties in the View Source from the browser it is pointing to none.gif.

I am trying to display the same image that is displayed in the Store Home page. I believe this is called the Online Store - Splash Page. Please see what I am talking about here:




Any help would be appreciated.

Thanks!

Offline

 

#2 08-13-2004 00:35:49

EagleWolf
Member
From: Daytona Beach, FL
Registered: 07-27-2003
Posts: 979

Re: Category Image On Ste_cat

The only thing I can think of is that image is either not named right in ccp admin, or the image is missing or corrupt.


Chris
<a href='mailto:webmaster@equivity.com'>webmaster@equivity.com</a>
-

Offline

 

#3 08-13-2004 11:52:22

gldweb
Member
Registered: 03-17-2004
Posts: 166

Re: Category Image On Ste_cat

I verified that the graphics are named correctly in ccp admin and in the media/images/category directory on the server. I confirmed that the images are not corrupted - I can view them using an image viewer. In any case, the images have been displaying correctly on the Splash Welcome page.

Could it possibly be something with the code I am using?

Any other thoughts would be greatly appreciated!

Thanks!

Offline

 

#4 08-13-2004 12:09:18

EagleWolf
Member
From: Daytona Beach, FL
Registered: 07-27-2003
Posts: 979

Re: Category Image On Ste_cat

I guess I am a little confused - you want to show the category images where?

Are you trying to have the images of the categories show up on your splash page? So that first page people see have the images of the categories on it?

The reason I say this is becuase on that URL you gave all images show but on for the Fax Thermal.


Chris
<a href='mailto:webmaster@equivity.com'>webmaster@equivity.com</a>
-

Offline

 

#5 08-13-2004 12:30:26

gldweb
Member
Registered: 03-17-2004
Posts: 166

Re: Category Image On Ste_cat

Sorry about the confusion.

Yes, the url I provided in my post, all the images expect for the Fax Thermal image are correctly displayed. The client hasn't provided me with the images for that category.

What I am interested in doing is when you select one of the categories - let's say Toner Cartridges - I would like the same image that was displayed on the previous Splash Welcome page displayed here. What you currently get here is the "Photo not Available" graphic.

I hope that makes more sense.

Thanks!

Offline

 

#6 08-13-2004 16:22:27

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Category Image On Ste_cat

Just update the image name to use the same one as in the main category.


Nick Hendler

Offline

 

#7 08-13-2004 16:53:16

gldweb
Member
Registered: 03-17-2004
Posts: 166

Re: Category Image On Ste_cat

I am sorry Nick, I am not following you here. What image name are you referring to?

I want the image to vary based on the category displayed on this page. Shouldn't the same code used in ste_cat_default.txt file work here?

Code:


(CGIGET TYPE="SUB" VALUE="ste_cat_show_image" PARAMS="(CGIVAR)category_imgsm(/CGIVAR)")
 

Thanks!

Offline

 

#8 08-13-2004 17:09:38

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Category Image On Ste_cat

Oh.  I see.  In this case, you'll need to update the routine 'ste_cat_desc' in the file ./cgi-bin/library/modules/ste_cat.pl.  Look for:

Code:


$sql_statement = "

SELECT category_name,category_active,category_descsale,category_desc
FROM category
WHERE category_id=$dbins_fd_ref

";

my @catdisp = database_call('category','SELECT',$sql_statement);

foreach $row(@catdisp) {

($category_name,$category_active,$category_descsale,$category_desc) = @$row;

And change to:

Code:


$sql_statement = "

SELECT category_name,category_active,category_descsale,category_desc,category_imgsm
FROM category
WHERE category_id=$dbins_fd_ref

";

my @catdisp = database_call('category','SELECT',$sql_statement);

foreach $row(@catdisp) {

($category_name,$category_active,$category_descsale,$category_desc,$category_imgsm) = @$row;

That will get the 'category_imgsm' column and it's value populated when you need it.


Nick Hendler

Offline

 

#9 08-13-2004 17:34:15

gldweb
Member
Registered: 03-17-2004
Posts: 166

Re: Category Image On Ste_cat

Wonderful! That did it. Thanks!

BTW - glad to have you back in the forum. I know you have busy coding ver. 6 . We have missed you!

Offline

 

#10 08-16-2004 11:44:26

gldweb
Member
Registered: 03-17-2004
Posts: 166

Re: Category Image On Ste_cat

One slight problem I just noticed. I have a multiple category levels - the main category level and then about three different sub-category levels. I would like to have the image to only display on the main level categories and not the lower level sub-categories. Is this doable?

Thanks

Offline

 

#11 08-16-2004 21:56:18

hellraiser
Member
From: Vermont, USA
Registered: 08-12-2004
Posts: 58
Website

Re: Category Image On Ste_cat

thanks, nick, this helps a great deal! I have been looking for the ability to have the category image show with the category, but need help with one more thing...

I need to have the image next to the category description a bigger size, while keeping the normal image size setting (imgsm) for when the category appears in another category.

can I add a column in the category table for a bigger image; create a folder in the images directory, define it somewhere, add it to the cgi file you posted above, and have that (bigger image) appear in the category head element ????

any ideas please let me know.
Thanks 

Offline

 

#12 08-26-2004 14:31:33

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Category Image On Ste_cat

To do this, add another column to the SQL:

Code:


$sql_statement = "

SELECT category_name,category_active,category_descsale,category_desc,category_splashdisp
FROM category
WHERE category_id=$dbins_fd_ref

";

my @catdisp = database_call('category','SELECT',$sql_statement);

foreach $row(@catdisp) {

($category_name,$category_active,$category_descsale,$category_desc,$category_splashdisp) = @$row;

Then change:

Code:


&display_print('ste_cat_desc');

To read:

Code:


if ($category_splashdisp eq "Y") {

&display_print('ste_cat_desc');

} else {

&display_print('ste_cat_descsub');

} ######### End of if statement.

Then, under HTML Pages & Elements | Manage Site Elements, add a new element with the reference name 'ste_cat_descsub' and use HTML without an image tag there.


Nick Hendler

Offline

 

#13 08-26-2004 17:50:35

gldweb
Member
Registered: 03-17-2004
Posts: 166

Re: Category Image On Ste_cat

It looks like "hellraiser" hijacked this thread and my question didn't get answered. Here it is again:

One slight problem I just noticed. I have a multiple category levels - the main category level and then about three different sub-category levels. I would like to have the image to only display on the main level categories and not the lower level sub-categories. Is this doable?

Thanks

Offline

 

#14 09-09-2004 10:30:41

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Category Image On Ste_cat

Yes, just change the display type for 'Sub Category Listing Display Type' for the Main Categories under Store Catalog | Manage Categories.


Nick Hendler

Offline

 

#15 10-19-2005 15:12:20

elric911
Member
From: San Jose, CA
Registered: 02-21-2005
Posts: 1
Website

Re: Category Image On Ste_cat

Hi there,

I'm trying to do the same thing, basically having a main image for each category on my client's site.

I've followed these instructions, but the image still shows up as the "none.gif" image...please help save my monitor from flying out the window!!

webmaster,08/13/2004 05:09:38 PM wrote:

Oh.  I see.  In this case, you'll need to update the routine 'ste_cat_desc' in the file ./cgi-bin/library/modules/ste_cat.pl.  Look for:

Code:


$sql_statement = "

SELECT category_name,category_active,category_descsale,category_desc
FROM category
WHERE category_id=$dbins_fd_ref

";

my @catdisp = database_call('category','SELECT',$sql_statement);

foreach $row(@catdisp) {

($category_name,$category_active,$category_descsale,$category_desc) = @$row;

And change to:

Code:


$sql_statement = "

SELECT category_name,category_active,category_descsale,category_desc,category_imgsm
FROM category
WHERE category_id=$dbins_fd_ref

";

my @catdisp = database_call('category','SELECT',$sql_statement);

foreach $row(@catdisp) {

($category_name,$category_active,$category_descsale,$category_desc,$category_imgsm) = @$row;

That will get the 'category_imgsm' column and it's value populated when you need it.

Offline

 

#16 12-16-2005 11:54:09

osluk
Member
Registered: 07-22-2005
Posts: 166

Re: Category Image On Ste_cat

Is this still a current fix.
I can get a photo not found to appear but not the correct image.




Ideally I want the image to the left and the text description to the right.



Any help would be appreciated.

Cheers Chris

Offline

 

Board footer