Print Page | Close Window

Make header MOD

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart Build To Order
Forum Name: Customizing BTO
Forum Description: Interact with other users, resellers and developers about customizing BTO
URL: https://forum.productcart.com/forum_posts.asp?TID=5139
Printed Date: 21-November-2024 at 12:56pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Make header MOD
Posted By: Stephen09
Subject: Make header MOD
Date Posted: 19-May-2012 at 2:16pm
Hi I just bought Product Cart BTO and I have seen people who have headers on each category that are like a css background with the text typed over it like in this sites case:
http://www.maingear.com/boutique/pc/configurePrd.asp?idproduct=1217" rel="nofollow - http://www.maingear.com/boutique/pc/configurePrd.asp?idproduct=1217
I have seen a post that they tried it and I am not a asp guy I do more php ect. so I out of my zone in moding the code. So if anyone could help me mod the configprdcode page or anything that could make this possible any help would be appreciated.
(i noted on this sites code they made the category name appear in a div that has an id that the css targets to put the background picture in)

Thanks ,
Stephen T.



Replies:
Posted By: Greg Dinger
Date Posted: 19-May-2012 at 2:41pm
Hello Steve,
 
One point you should be aware of is that Maingear is a fairly heavily altered code base which has been worked on by multiple dev teams over the years, so while that is certainly an example of what can be done, that particular site has seen a lot of coding hours go into it.
 
Regardless, what's been done in this regard is fairly simple so long as one is familiar wtih ASP.  If you look at category images in a site such as http://www.sportco.com" rel="nofollow - www.sportco.com , each is presented in the stock form as a surface image.  In Maingear, what they did was alter the ASP so that the dynamic image reference pulled from the database was referenced as a background.   I take it you already discovered that. 
 
As for why this was done, or why you need it, I'm unclear about that and somewhat curious.  I'm not seeing what Chris and the guys over at MG achieved by this strategy, so rather than focussing on why they did it, perhaps you could share what you are trying to accomplish?  If you have a backaground are you then going to set HTML text over it?
 
Trying to coach you as to how to do this via the forum might be difficult as it will be largely dependent upon the precise layout you seek to achieve.   However, if you scroll down in viewcategories.asp, just below the H1 tag, you will find a section titled "Show large category image".  It is in that area that you would begin editing your page if you want to experiment with such a change.   Just keep a backup copy you can revert to if things go poorly. 


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: Stephen09
Date Posted: 19-May-2012 at 3:20pm
I am trying to make it so its less boring by adding a image on the top of each section I am not familiar with asp but I am sure I can learn a few things. All I want is the ability to have an image above the section of choices so like the section of cases it would just have a cases header just to make the look and feel better. like as shown in a diferent post:
http://www.dinopc.com/shop/pc/configurePrd.asp?idproduct=1093" rel="nofollow - http://www.dinopc.com/shop/pc/configurePrd.asp?idproduct=1093
or something just to make it less plain.

Thanks for your response,
Stephen


Posted By: Greg Dinger
Date Posted: 19-May-2012 at 3:46pm
ok, now I understand that you are referring to the BTO categories within the configurator section.  I was misled by looking at the background image at the very top of the maingear page. Now I see your point.
 
And you have yet again turned to a site that is heavily altered.  Dino has been around for quite a while and has been pretty extensively tweaked.
 
At a high level I feel certain that you will have to make edits to the BTO configuration stuff in the admin so that the appropriate images which you want to associate with each such category can be edited.  Then you need to work your way through ConfigurePrdCode.asp and locate the section that displays those title bars, apply logic changes and probably CSS class changes in order to show these images on the front end. 


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: Guests
Date Posted: 19-May-2012 at 6:20pm
At a simple level, you could find the following in /pc/ConfigurePrdCode.asp:
<p><b><%=CATDesc%></b></p>
and change that to, for example:
<img src="images/BTOcats/<%=CATDesc%>.jpg" alt="<%=CATDesc%>">
where you would name the image by the same as configuration category.
 
Or maybe:
<div style="background: url("images/BTOcatbg.png")"><%=CATDesc%></div>
where you'd have a set background image for all of them and then have the configuration category text displayed on top.

That should give you enough hook to hang your hat on to make it look less plain.


Posted By: Stephen09
Date Posted: 19-May-2012 at 10:58pm
I tried what you said which if i could get that to work It would be excatly what I wanted but every change i make in the code doesn't matter i added a div it wasn't in the page its like it was strped away or reset when loaded????? I even added a div and made an id and put css but that did not show either.


Posted By: Stephen09
Date Posted: 20-May-2012 at 3:49pm
I am 17 and how much would it cost to just have this placed (a header image-all the same image like what was said just have the text on top just restyled as bigger and white) in as you can imagine it took a while to save to get this program.

I have spent hours on this and IDK I did :

	
<tr>
<td colspan="4" class="pcSpacer"></td>
</tr> 
<tr <%=strCol%>> 
<td colspan="4">
<div style="background: url("images/header.jpg")"><%=CATDesc%></div>
<% if requiredCategory=-1 then
ReqCAT=1
else
ReqCAT=0
end if%>
</td>
</tr>
and made the :<td colspan="4"> have a class and tried to make it styled in CSS and every time I look at the code when on my site it looks like i did nothing I have no idea why i double checked to see if i uploaded it right and I re-downloaded it from my site and its all there in the code.


Posted By: Greg Dinger
Date Posted: 20-May-2012 at 3:57pm
Drop me your contact information at http://www.greybearddesign.com/contact.asp" rel="nofollow - http://www.greybearddesign.com/contact.asp
 
If possible, I would like to see a mockup of the site design you are working on.


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: Guests
Date Posted: 21-May-2012 at 1:20pm
Originally posted by Stephen09 Stephen09 wrote:

I am 17 and how much would it cost to just have this placed (a header image-all the same image like what was said just have the text on top just restyled as bigger and white)

PM me from the forum and I'll get you sorted out.


Posted By: Guests
Date Posted: 31-May-2012 at 4:48am
Hamish,

I hope you'll pick up on this.

Stephen simply needed simple markup hooks to hang his CSS on. 

I really think EI should change the markup here to facilitate that and to make PC more designer-friendly.

There are several places this heading is called for under various contexts in the ConfigurePrdCode.asp file. 

It would be much nicer for designers if the markup were more accessible. Rather than variations on
<p><b><%=CATDesc%></b></p> 
something more like:
<div class="btoCatHead"><%=CATDesc%></div> 

Once I showed Stephen where these instances were in the code, he modified it as I describe above and wad ducky happy with the look of his BTO confige pages. Honestly, the markup should be more friendly for designers here, IMHO.


Posted By: Hamish
Date Posted: 02-June-2012 at 5:46pm
Hi Sean & Stephen.
     I'll add it in our enhancements log for consideration.

One thing to note on the BTO code Stephen is that the code repeats (twice I think) within the file that presents the BTO categries (I don't recall why but there is a good reason :-) )
That may be why when you changed the file you didn't see the change reflected on your site. 

Stephen,   Have you got this sorted on your site now?


-------------
Editing ProductCart Code?

See http://wiki.earlyimpact.com/developers/editcode" rel="nofollow - WIKI Guidelines for Editing ProductCart's ASP Source Code



Posted By: Hamish
Date Posted: 02-June-2012 at 7:15pm
Ooops again, I see Sean has sorted this for Stephen. Excellent :-)  

-------------
Editing ProductCart Code?

See http://wiki.earlyimpact.com/developers/editcode" rel="nofollow - WIKI Guidelines for Editing ProductCart's ASP Source Code




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net