Ivo
|
| Posted: 05/09/2003, 6:22 AM |
|
I'm making a webshop with CC2, MySQL and PHP. You can find an example of the project at:
www.profiltra.nl/shoptest/Default.php
The problem is that I have to make to many steps to get the product in the shoppingbasket.
1. Default.php - Choose categorie
2. Items.php - Choose product
3. ItemView.php - Choose "Add to Shopping Cart "
4. Order.php - Choose quantity and insert
5. Shoppingcart.php - The product is in the shoppingcart!
I want to do the following:
1. Default.php - Choose categorie
2. Items.php - Choose buy product
3. Shoppingcart.php - The product is in the shoppingcart with quantity 1
4. Shoppingcart.php - Change quantity
I hope my problem is clear now and someone can help me.
Kind Regards,
Ivo
|
|
|
 |
guest
|
| Posted: 05/09/2003, 11:51 PM |
|
|
|
|
 |
RonB
|
| Posted: 05/10/2003, 2:59 PM |
|
- combine the category and item pages so the page opens with a default category and the category and item grids show up on the same page.
- in the itemgrid add a column with a link "add to cart" that leads to shoppingcart with the needed parameter added via url.
- In shoppingcart.php create a page beforeshow event that takes the parameters from the url(CCGetParam()) and inserts them into the orders table before showing the page. When the page is shown to the client he will see the order in the orders grid.
If you use an editable grid on shoppingcart.php quantity can be changed. You can change the label on the submit button to recalculate.
Ron
|
|
|
 |
Ivo
|
| Posted: 05/14/2003, 1:21 AM |
|
Thank you for your help. But I do not know how to make that script. With the page, open event, script: (CCGetParam(item_id)) I have the item id? And then write it to order table? Like this?
cn.execute("insert into orders(item_id) values (" & _
tosql(item_id,"Text") & "," & _
I hope you can help me! Thanks.
Ivo
|
|
|
 |
Ivo
|
| Posted: 05/15/2003, 12:01 AM |
|
And how can I make a editable grid in CodeCharge? If I make a grid now I only have a insert button, not a update..
|
|
|
 |
|