...

View Full Version : Please help me, I'm stuck...



sbuijs
09-06-2005, 09:39 AM
Hi, thanks for reading my question! I need help :D

I'm building a website with a shop function. It works like this.
I you choose your category and then the articles shows (see image, you see the category)
http://www.ysland.nl/vb.gif
If I click on the category you see all the items (see image)
http://www.ysland.nl/vb1.gif
If you click on the article you'll see the price (see image)
http://www.ysland.nl/vb2.gif

What I need is a button that opens a webpage and shows all the articles and all the prices in a tabel (see image)
http://www.ysland.nl/vb3.gif

if there's a way to export it to excel It would be more then great!

The file that the store uses and the can be modified can be downloaded here:
Zipfile (http://www.ysland.nl/pricetotal.zip)
I think this is very easy for an expert!

Please tell me how to make this or please help me..

Thanks sander :thumbsup:

neocool00
09-06-2005, 02:26 PM
Your images were not viewable to me, but here is some help on the excel part: http://www.codetoad.com/asp_excel.asp

sbuijs
09-06-2005, 03:36 PM
and now?

nikkiH
09-06-2005, 04:06 PM
Just query the database and write it out as an html table. Very standard.
A simple Google search would tell you how.

Setting content type to match Excel will automatically open it in Excel, but only if the user has it installed. You can also embed it in the document.
Otherwise you need a third party plugin or such.
I would not recommend doing this for anything other than an intranet application. On the internet, users very likely don't HAVE Excel -- it's not a standard Windows install, nor is it available for *nix or Mac systems AFAIK.

sbuijs
09-06-2005, 04:21 PM
Just query the database and write it out as an html table. Very standard.
A simple Google search would tell you how.

Setting content type to match Excel will automatically open it in Excel, but only if the user has it installed. You can also embed it in the document.
Otherwise you need a third party plugin or such.
I would not recommend doing this for anything other than an intranet application. On the internet, users very likely don't HAVE Excel -- it's not a standard Windows install, nor is it available for *nix or Mac systems AFAIK.

The "problem" is that the every user has their own prices. So Just query the database and write it out as an html table isn't an option is it?

nikkiH
09-06-2005, 08:13 PM
What I need is a button that opens a webpage and shows all the articles and all the prices in a tabel

Where are "all the articles" and "all the prices" stored if not in a database?

retrotoys.nl
09-06-2005, 08:14 PM
Where are "all the articles" and "all the prices" stored if not in a database?

in an SQL database.

nikkiH
09-06-2005, 08:24 PM
Okay, so what is the actual problem you are trying to solve that a query of that database doesn't resolve?
You can filter query results however you want.

Note that the query output can be anything you want. HTML, text, CSV, Excel...whatever.

sbuijs
09-07-2005, 01:05 PM
The actual problem is that I would like to show all the data from all
categories + prices

neocool00
09-07-2005, 01:15 PM
What fields do you have in the categories and price tables and what are the relationship between the two (ie. foreign key)? If you give us a structure, hi-lighting what fields you want from each table, we can help you write a sql statement that can do it.

P.S. Images still don't display for me, but that could be a firewall issue on my end since I'm at work and most sites are blocked ;)

nikkiH
09-07-2005, 02:02 PM
Yeah, I still don't see why a simple query and output wouldn't give you what you want. Perhaps you just need help with the SQL?
Images display fine for me, so it must be your firewall, neo.

sbuijs
09-07-2005, 03:01 PM
Hi,

I'm not sure what u mean.
The zip file I added that's the commerce page that shows everything
as a user is logged in they get 2 prices. one price for the reseller and one for the enduser.
They can only see all the category's. If I want to see the products I need to click on the categorie and then I see all the products of that categorie.

I need a list off all products from all categories with the enduser price and the reseller price; product name and sku name . The best solution is that their are 3 buttons
1 export to excel one export to CSV and one show on ASP page.

See the website live if u like:

Website: www.ysland.nl/portal goto inloggen
User: demo
Password: demo

Online Shop / KM-1500

if you click on online shop you'll see all the categorie's if you click on (for example) KM-1500 you'll see all the products for that categorie

the commerce.asp file:
http://www.ysland.nl/pricetotal.zip

Pictures you didn't see:
http://www.ysland.nl/pic.zip

neocool00
09-07-2005, 04:10 PM
@subijs,
The correct sql statement will do just what you are looking for. What I was asking for was the layout of the tables in sql that correspond to categories and products. That way we can help you write a simple join sql statement that will return all categories with all products for each category. But without knowing the sql table structure, it would be hard for us to suggest, especially in regards to a pre-made application (as it sounds like that is what you are dealing with).

--neo

sbuijs
09-07-2005, 04:15 PM
@subijs,
The correct sql statement will do just what you are looking for. What I was asking for was the layout of the tables in sql that correspond to categories and products. That way we can help you write a simple join sql statement that will return all categories with all products for each category. But without knowing the sql table structure, it would be hard for us to suggest, especially in regards to a pre-made application (as it sounds like that is what you are dealing with).

--neo

Ok, how can I discribe the structure?
Is this something u can use?

http://www.ysland.nl/portal.sql

sbuijs
09-07-2005, 04:19 PM
The portal had some modifications for the pricing

so the sql changed

http://www.ysland.nl/ModifiedPortal.sql

nikkiH
09-08-2005, 02:13 PM
Do you have access to phpMyAdmin or similar for your database?

sbuijs
09-08-2005, 02:21 PM
Do you have access to phpMyAdmin or similar for your database?

I use enterprisemanager to maintain the database

nikkiH
09-08-2005, 05:08 PM
SQL Server?

I need the table name(s) and field name(s) you want to list, as well as any relationships(foreign keys) involved.
A screen cap would be optimal if you can / are comfortable doing that.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum