-
18 May 2012 7:33 AM #1
Best way to design a shopping cart (with multiple components)
Best way to design a shopping cart (with multiple components)
Hello,
I searched over the forum but couldn't find what I'm looking for.
I would like to create a shopping cart with two blocks (see the attached file):- A list of products with
- Some information (thumbnail, name, ..) about the product on the left
- A selectfield, under the product name, to select a quantity
- More information about the product on the right (prices, ...)
- A delete icon, to remove the product from the list
- A recap with total price and shipping cost
Any help would be greatly appreciated.
sencha.PNG
- A list of products with
-
21 May 2012 6:18 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,684
- Vote Rating
- 435
I would use a Container with a dataview and a container as it's items and each item has a height of 50%.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
22 May 2012 3:47 AM #3
Do I have to set a flex value for both container?
I would like to stretch the products list depending on how many products are displayed. Thus the second container would be automatically placed below my list.
-
22 May 2012 4:26 AM #4
I solved it thanks to this thread: http://www.sencha.com/forum/showthre...st-in-fieldset
Scrollable did the trick.Code:Ext.define('App.view.order.basket.Main', { extend: 'Ext.Container', xtype: 'basket', requires: [ 'SF.view.order.basket.Articles', 'SF.view.order.basket.Summary' ], config: { layout: 'vbox', items: [ { xtype: 'basket-articleslist', scrollable: false }, { xtype: 'basket-summary' } ] } });
Hope this helps


Reply With Quote