Author |
Message |
catpuke
Newbie - One Blade
Joined: 20 Apr 2006
Posts: 12
Location: dallas
|
 edit the actual "view cart" stuff
How do I get the 'view cart' code to display %%image%% instead of %%userfieldtwo%%? I have it set so that %%image%% is my small version and the cart seems to be showing my large one, which I assume the code is pulling %%userfieldtwo%%. I can edit code decently, I just can't seem to find where that dang bit of code is! It's probably right in front of my face, eh?
Also, this has nothing to do with the cart display, but how could I use - at the top of my product pages - a different image according to the product category? They are images that say what category the user is looking at, basically. I can post this in a different part of the forum if I need to.
_________________ www.catpukeshirts.com
|
Tue Apr 25, 06 8:43 am |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
For your "View Cart" issue, go into the manager -> Cart Display
Change the field that has "db_user1" and change it to "image".
On your product page issue:
Are you using the default ppinc file?
If so, find this:
Code:if ($rowCount == (1+$minCount)) { #first one
$ags_row_item=0;
$ags_tot_item=0;
$myans .= '<tr><td colspan=3><table width="100%" border=1>'."\n";
}
And change to something like:
Code:if ($rowCount == (1+$minCount)) { #first one
$ags_row_item=0;
$ags_tot_item=0;
$myans .= '<tr><td colspan=3><img src="agora.cgi?picserve=%%CategoryID%%.jpg"><table width="100%" border=1>'."\n";
}
Then name your image the same name as the category and place in the 'html/images' directory of the store.
HTH!
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Tue Apr 25, 06 9:18 am |
 |
 |
catpuke
Newbie - One Blade
Joined: 20 Apr 2006
Posts: 12
Location: dallas
|
You guys are awesome. Thanks so much for the help, and quick response too!
_________________ www.catpukeshirts.com
|
Tue Apr 25, 06 11:17 am |
|
 |
catpuke
Newbie - One Blade
Joined: 20 Apr 2006
Posts: 12
Location: dallas
|
quick question about this again, can i do this in the store header so the title remains above the cart display? I tried putting it in the script and it worked, only the image shows up with the red x. when i check the properties of that image, the URL of it is correct except it didnt convert the %%CategoryID%% agorascript to finish the filename. I see agorascript in the header, so i know it's gotta work somehow!
_________________ www.catpukeshirts.com
|
Tue Apr 25, 06 11:38 am |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
Try using $category instead of %%CategoryID%%
BTW, what is the URL to your store?
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Tue Apr 25, 06 12:37 pm |
 |
 |
catpuke
Newbie - One Blade
Joined: 20 Apr 2006
Posts: 12
Location: dallas
|
www.catpukeshirts.com/catcart
i havent adited the first page yet.  you can see the missing image at the top. The image is in my sites images folder, not the cart's image folder. It worked fine when I was running the script from the productpage file like you initially suggested, it's just the cart was appearing above the title and it looked weird.
$category is still showing up as %%CategoryID%% in the file name. I can edit code alright, but this is where I get lost. hehe I really do appreciate the help!!
_________________ www.catpukeshirts.com
|
Tue Apr 25, 06 1:30 pm |
|
 |
catpuke
Newbie - One Blade
Joined: 20 Apr 2006
Posts: 12
Location: dallas
|
its been a long day, hehe. i was uploading my $category edit to the wrong folder. anyway, i got the right folder this time, and the filename for the .gif is missing the category name, instead of just showing up as %%categoryID%%
_________________ www.catpukeshirts.com
|
Tue Apr 25, 06 1:42 pm |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
I'm not seeing the info that I suggested in the productPage.inc file...
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Tue Apr 25, 06 1:48 pm |
 |
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
Ahh... I see what you've done... You have taken the 4a layout and edited it to be a 3 across layout....
Okay, at the top of the file, before the <!-- agorascript-pre stuff put something like:
Code:<img src="agora.cgi?picserve=%%CategoryID%%.jpg">
Something else that can cause the files not to display properly is some of the info in your store_header.inc file.
Namely:
Code:<head>
<title>Cat Puke Shirts - The Finest Shirts on teh Interweb!</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<body bgcolor="#996600" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="MM_preloadImages('../images/nav_home1.gif','../images/nav_about1.gif','../images/nav_tees1.gif','../images/nav_girly1.gif','../images/nav_contact1.gif','../images/nav_faq1.gif')">
ALL of that info MUST b removed from the header file.
For info on proper placement of this info, please review the following threads:
http://www.agoraguide.com/faq/viewtopic.php?t=1156
http://www.agoraguide.com/faq/viewtopic.php?t=358
HTH!
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Tue Apr 25, 06 1:55 pm |
 |
 |
catpuke
Newbie - One Blade
Joined: 20 Apr 2006
Posts: 12
Location: dallas
|
Alllrighty, got the nasty CSS out of the way and placed in the right place (thank you for that info!!), but I'm still getting the %%CategoryID%% in the file name.
_________________ www.catpukeshirts.com
|
Tue Apr 25, 06 2:53 pm |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
Gee, that's funny... I am seeing the %%CategoryID%% being replaced
by the category name and the image being displayed...
BTW,
You still have some javascript in your store_header.inc file...
This javascript needs to go in the free form logic, like the other javascript...
HTH!
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Wed Apr 26, 06 4:14 am |
 |
 |
catpuke
Newbie - One Blade
Joined: 20 Apr 2006
Posts: 12
Location: dallas
|
Oh, I moved the IMG tag back to the productpage. It works just fine there, its the storeheader that gives me problems with the agorascript. ::shrugs:: I'm going to attempt moving the cart, since I can't get the title to work.
As far as the js(assuming you're talking about my image-replace rollover stuff), I'm not sure how to add it to the Free Form page. Still learning! Thank you for all of your advice though, it's helping a ton
_________________ www.catpukeshirts.com
|
Wed Apr 26, 06 6:29 am |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
Nope, not talking about the image rollover, it is already where it needs to be...
it's the form validation that isn't where it should be...
HTH!
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Wed Apr 26, 06 8:46 am |
 |
 |
catpuke
Newbie - One Blade
Joined: 20 Apr 2006
Posts: 12
Location: dallas
|
I'm not sure what you're talkin' about. In my store_header file, the only 'form' stuff is in the 'view cart' coding... at least that I know of!
_________________ www.catpukeshirts.com
|
Wed Apr 26, 06 1:35 pm |
|
 |
scottcrew
Moderator
Joined: 13 Feb 2004
Posts: 7516
Location: The West Side of MI USA
|
The javascript that you are trying to implement the forcing of an option selection.
I suppose that it isn't the header, rather the productPage...
_________________ God Bless!
Bonnie - AgoraCart Moderator
Get a Gold Membership
|
Wed Apr 26, 06 1:40 pm |
 |
 |
|