ProductCart E-Commerce Solutions Homepage
Forum Home Forum Home > ProductCart > Customizing ProductCart
  New Posts New Posts RSS Feed - Page Navigation - Brand
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Page Navigation - Brand

 Post Reply Post Reply
Author
Message
knifepro View Drop Down
Newbie
Newbie


Joined: 18-February-2008
Location: United States
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote knifepro Quote  Post ReplyReply Direct Link To This Post Topic: Page Navigation - Brand
    Posted: 20-February-2008 at 11:02am

I would like to include to a Shop By Brand list on all my pages like the Browse by Category list? The Shop by Brand could be a drop-down menu or a full list. Has anyone else added a menu like this. If so I would appreciate the code help. I am new to ProductCart.

Brian

brian@theknifeprofessional.com
brian@heartlandbraidedrugs.com
www.theknifeprofessional.com
www.heartlandbraidedrugs.com
ProductCart v4.7
QuickBooks Sync
Mobile
Back to Top
Greg Dinger View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers
Avatar

Joined: 23-September-2006
Location: United States
Status: Offline
Points: 238
Post Options Post Options   Thanks (0) Thanks(0)   Quote Greg Dinger Quote  Post ReplyReply Direct Link To This Post Posted: 20-February-2008 at 11:19am

Preparing such a list is as simple as opening a recordset, looping through the records and writing the code in the form you desire (Assuming you want it dynamic.)  If you are comfortable with ASP scripting, viewbrands.asp would be a good page to reference for constructing such a module.  Or a developer could build that for you.

Alternatively, a hard-coded dropdown would also be easy to code. You would have to maintain it when the available brands change, but the code would be fairly simple.

 

Back to Top
knifepro View Drop Down
Newbie
Newbie


Joined: 18-February-2008
Location: United States
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote knifepro Quote  Post ReplyReply Direct Link To This Post Posted: 21-February-2008 at 3:27pm

I got the brand list to appear and link to the correct brand but if you click on a Brand that does not have any products then I get an error message in the brand list.

Here is the code I am using. Any suggestions:

<table>
                              <%
       'Show brands, if any
       query="Select * from Brands order by BrandName asc"
       set rstemp4=Server.CreateObject("ADODB.Recordset")
       set rstemp4=connTemp.execute(query)
       if not rstemp4.eof then%>
         <tr>
        <td>
                                     <%do while not rstemp4.eof%>
                                     <tr>
                                     <td>
                                     <a href="showsearchresults.asp?IDBrand=<%=rstemp4("IDBrand") %>&iPageSize=9"><%=rstemp4("BrandName")%>< ;/a>
                                     </td>
                                     </tr>
                                     <%rstemp4.MoveNext
             loop%>
                                   </td>
  </tr>
        <%end if%>
                                </table>

My development site is located at: http://208.75.248.150/store/pc/home.asp. I am new to ASP. I am using MS SQL database. Do anyone see a problem with over taxing the database?  I will have about 80 brands.

Brian

brian@theknifeprofessional.com
brian@heartlandbraidedrugs.com
www.theknifeprofessional.com
www.heartlandbraidedrugs.com
ProductCart v4.7
QuickBooks Sync
Mobile
Back to Top
netprofits View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers


Joined: 05-January-2006
Location: United States
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote netprofits Quote  Post ReplyReply Direct Link To This Post Posted: 21-February-2008 at 3:35pm

Whenever you're doing something like this where the ASP code needs to run on every page of the site to load information from the database (i.e. its in the header file), we recommend moving that code into the control panel and only running the routine when you modify your brands. You would create a new ASP page in the control panel that  creates your HTML list and writes it out to an HTML include file. Then your header.asp file would just include the brands list include file.

This is the same concept behind the Product Cart "Generate Navigation" function. It increases performance of each page and decreases load on your database.

You could review the pcadmin/gencatnavigation.asp to see how it does this.

NetProfits Internet Consulting

Certified ProductCart Developer

Our Site
Back to Top
Greg Dinger View Drop Down
Certified ProductCart Developers
Certified ProductCart Developers
Avatar

Joined: 23-September-2006
Location: United States
Status: Offline
Points: 238
Post Options Post Options   Thanks (0) Thanks(0)   Quote Greg Dinger Quote  Post ReplyReply Direct Link To This Post Posted: 21-February-2008 at 3:44pm

Dan - I explained the alternatives (the approach he has implemented versus generating an include file) to him yesterday when he asked me to bid the project.

The one thing he missed was to close and destroy the recordset and db connection. 



Edited by Greg Dinger - 21-February-2008 at 4:03pm
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.094 seconds.