1 reply [Last post]
strompf's picture
Offline
Joined: 12/27/2008
Juice: 38
Was this information Helpful?

Hi folks,

I'm looking for something specific, and before starting to 'roll my own', I would be really happy if you folks can give me some feedback. Here it comes:

The problem

I would like all products to be displayed in rows on the front page, including a 'add to cart'-button and preferably, a Qty-field where the shopper can enter the number of products he or she desires.

I love the 'collapsing panes' that are used extensively in the Administer-section of Drupal. It would be really cool if those can be used, for example one such pane per category. This way, alle products in large shops are still available through one simple interface.

The solution
'Roll my own': I came a long way through using Catalog in combination with uc_extra_column, but it misses the Qty-field and the collapsable panes. However, the code in uc_extra_column is only 50 lines long. I started reading the Pro Drupal Development book yesterday, and the example in chapter two of this book is somehow similar. So, maybe this isn't too hard to develop myself. Unless, of course, somebody has done this already.

What do you folks think? Please let me know!

Regards,
Jeroen.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Order directly from front page with all products displayed i

What you're looking for would best be handled by a custom form in a module. You can easily add collapsible fieldsets to the form and put the various products into those fieldsets... You might have to figure out how to get your data displayed in a table properly. In your custom form's submit handler, you can use the Ubercart function uc_cart_add_item() to loop through all the fields and add the appropriate products to the cart.