Clicky

Am using Drupal 6 to build a shopping cart with Ubercart, plus the event_registration module. This is to provide the user with a “product” to enable them to book places for an event and, if required, book tickets on coach(es) to take them to the venue.

The node will contain various fields to provide information about the user including:

A type of booking dropdown (full booking or student booking) – different price for each.
A coach booking dropdown (no coach, coach from ---, coach from ---) - different prices for each.

In fact, there will be three pages/nodes as bookings will be allowed for up to three people. The “three people” page will, therefore, contain:

Various information fields (Name, address, etc) for first attendee
Type of booking for first attendee
Coach booking for first attendee

Various information fields (Name, address, etc) for second attendee
Type of booking for second attendee
Coach booking for second attendee

Various information fields (Name, address, etc) for third attendee
Type of booking for third attendee
Coach booking for third attendee


I need the product price to be the sum of the values of the six dropdowns.

How can I do this?

asked 08/24/2011 08:04

bogorman's gravatar image

bogorman ♦♦


13 Answers:
The help I can offer in this area will be very limited, but I know that product attributes (that can be shown in drop-downs) in Ubercart should allow for price differences. Attributes can alter a base price for the user when they select values on the product page. Let me know if that helps.

Otherwise, if you need to create a displayed price that totals up different things on the admin side of things (user can't select attributes), I'm guessing that that a much larger custom module will be required to make that work.


Best regards,
link
Ultrus's gravatar image

Ultrus

Hi Ultrus,
Yes, I already know something about attributes and have set them up. However, I still don't know how one can add some of the attributes to the price.
What I have found is uc_aac :  

http://drupal.org/project/uc_aac

but I can't get it to work. I am wondering if  I need to copy node.tpl.php from the Zen folder (my theme is a sub theme of Zen) over to my theme folder. It already has

id="node-<?php print $node->nid;

in it.

Brian
link
bogorman's gravatar image

bogorman

Hrrmm. Good question. One big alarm goes off in my head for this.

I still don't know how one can add some of the attributes to the price.


I see a lot of potential complexities when adding attribute price to displayed price. My big concern is adding some of the attributes to the displayed price, but not others, especially when selected attributes change the starting price (different attributes in the same list can have different prices). Do you see the same concerns with the logic?

Maybe I'm off on my understanding as it looks like uc_aac updates the price shown on the product page when you select attributes on that product page (cool!). If you continue to have issues with this module, the next step would be to post an issue there since I haven't used it yet. They author will be more intimately connected with his/her work. Also, make sure to read through the README.txt that comes with the module as that has helped me in the past.

Let me know if this helps inspire something. :)
link
Ultrus's gravatar image

Ultrus

Hi Ultrus,
Am still very confused about attributes and price. What I want to achieve is:


Booking Form for event:

Booking three places (there will be other pages/nodes for one and two. Three is the maximum number of bookings that can be made by one person).

Booking for Attendee one

Various fields contining information about Attendee 1......
......

Dropdown containing two types of booking (select one of them):

Full price booking:   £200
Student booking: £150

Dropdown containing type of coach booking required:

No coach
Coach from A to event:   £ 25
Coach from B to event:   £ 20

Booking two

same fields as above


Booking three

same fields as above



Depending on types of booking and types of coach required, the amounts and descriptions to be passed to the shopping cart.

I have a feeling that, because my understanding of Ubercart is limited, I am complicating things. It is rather like having three products on one page and ordering all three at once, plus being able to select prices with dropdowns. Perhaps I do not need to use uc_aac. Would the "standard" Ubercart module be suitable on its own?

Brian




link
bogorman's gravatar image

bogorman

Hi,
Have sorted out the attributes and options and seem to have set up a product page for an event with the various price options working ok.
The remaining problem is being able to display three "products" on the same page, make the necessary selections and send them all to the cart at once.
Appreciate your help on this.
Brian
link
bogorman's gravatar image

bogorman

Know you can do this with Views - I have one set up already - but to do it I have a Vocabulary "Catalog" which has Terms "Events" and "Publications". The View is filtered by "Publications" so the page shows all the publications.
The problem is, how do I filter the view to show three of the same Event?   I have found:

http://www.ubercart.org/project/uc_multibuy

which should do the trick, I think, if I can get three of the same event on the same page.

What do you think?

Brian
link
bogorman's gravatar image

bogorman

Hello Brian,
It's early. My coffee hasn't absorbed yet, and my Ubercart usage is limited at this time (much like your experience - I've created two simplish shopping site with it). With the lack of coffee (grouchiness at full flare), I would agree that you might be over-complicating things.

I'm not used to seeing "products" being limited to X purchases. For example, you wouldn't tell a buyer of books that he/she could only add three books to the shopping cart. That's why you may be having troubles there and it may not be supported by Ubercart. Why not let a person book 900 trips and make lots of money? -- I know it's probably more complicated than that... remember, lack of coffee..

At the moment I would try to treat the event as the "product" as I've seen on other event websites (I just made an event purchase myself at http://www.doitwithdrupal.com), and the one to three bookings set as attributes of the event. That way it's all on one "page". You may have to create multiple groups of attributes that look the same but have slightly different names on the back end. Just a thought.

Once you get that figured out, getting the price changes to happen in real-time on the event price page would be added eye candy (secondary to getting the bookings to work right first), which looks possible with the uc_aac module, but maybe not the uc_aac+uc_multibuy
 used together.

On the other hand, uc_multibuy looks like fun to play with. Not sure how I would integrate it as I'm not as close to your project as you are. Keep in mind that it may add an extra layer of complexity as well.

Using any CMS involves some give and take. If you try to make it do something very complicated and rigid, something is going to break and you'll need to add custom functionality (a custom module or two perhaps in the case of Drupal - requires some module building experience). You may need to bend the mind a bit to get things where you need it.

If you're into Drupal 7, I would also recommend taking a look at Drupal Commerce, Ubercart's predecessor. It was designed from scratch by the same authors as Ubercart with a lot of major improvements (so I hear, haven't tried it yet). It may have some additional flexibility for you?

Let me know if that helps conceptualize something.

Best regards,
link
Ultrus's gravatar image

Ultrus

Thanks for your advice.

Think I have described my approach badly.   I know it may seem strange to have a page/node with only three bookings on it. The reasons for this are:
a) we run events for young people. Multiple bookings are usually arranged by parents who rarely, if ever, want to book more than three places.
b) I found it difficult to make the system more flexible. Also, we already use this on our conventional (non-drupal) site and it seems to work well.

So....I intend to create several "products" for the bookings with the following SKUs:
SS-31
SS-32
SS-33
(one, two and three for the three bookings page)
SS-21
SS-22
(one and two for the two bookings page)
SS-1
(for the one bookings page)

I then intend to create a View filtered so as to display the right number of bookings (one for a single booking, two for two bookings, three for three bookings).  Am not sure how to use the Filter in the Views UI. Can I use wildcards like "SS-3*" ? If so, how can I enter this into the UI?

THEN, I have the problem of providing one submit button for all the bookings on the page. Thought I might use:

http://www.ubercart.org/project/uc_multibuy

Don't know about applying the patch. Have never done that before.

Would value your advice, Ultrus, on whether this is a sensible idea.

Regards

Brian

link
bogorman's gravatar image

bogorman

Hello Brian,
Could you send a link to your working site? Maybe that would help on brainstorming. I'm thinking there may be some confusion on what your old site calls a product and what Ubercart calls a product.

I was doing some reading here on how SKU numbers were handled:
http://www.ubercart.org/docs/user/10962/product_skus_and_adjustments

It looks like Ubercart requires a SKU for a "product", and offers "SKU adjustments" for attributes. Looking at your one, two, and three booking product types at a glance (without knowing your old system which may work to benefit with clear slate), I see "SS" being your product sku, and "-1", "-21", "31" as SKU adjustments. Maybe? I don't think that offers much though in specifying booking info for eacher person.

Looking back at your comment, it looks like you may be linking to separate forms depending on the number of bookings correct? If that's the case, why not offer three booking info sets on the "product" page itself by default? I'm still trying to visualize, but from a normalization standpoint your current "working" solutions seems odd to me. For example, you mentioned that parents "rarely" make more than three bookings. That means they make more than three bookings sometimes, correct? Why not accommodate that and treat a product as a product and a booking/attendee as a booking/attendee? :)

That still leaves many questions open. If you could elaborate more, I'm happy to continue bouncing ideas. I hope I'm not making your head spin off or anything. I'm just trying to get an understanding on your game plan before attempting a Drupal solution that makes the most sense. So far I'm hearing "I want what I had before", and am trying to figure out how Ubercart or Commerce would accommodate that or an improved solution.

Best regards,

Chris
link
Ultrus's gravatar image

Ultrus

Hi Chris,

Sorry for delay
 
Link to the (orphaned) booking page is:

http://www.faith.org.uk/events/Summer11.htm

It is orphaned now as the session has taken place. It will give you an idea of how I would like to create it in Drupal. Of course, it would be nice if I could have a flexible booking method to allow booking of a flexible number of places but I did not know how to do this.

My idea of using the SKU numbers to create different "products" of the same event was to enable several to be displayed on the same page.I would then filter these out in the view which displays, say, all our events, leaving the unnumbered events to appear on the normal products page. Once I had done this I would have to get the uc_multibuy module to work.

Brian
link
bogorman's gravatar image

bogorman

Hi Chris,

Think I have found a way to do this but can't get it to work at present.

The link to refer to is:

http://drupal.org/node/1047840

(post number 4)

Am still working on it!  In the meantime if you have any comments, pse say.


Regards
Brian
link
bogorman's gravatar image

bogorman

Hi Chris,
Am afraid I have not succeeded in creating a page/node with a number of products on it and one submit button for them all.
Have decided to revert to the standard method of just making several single bookings where users want to do this.  It really is almost as simple and, as each is submitted, the cart will show the accumulated price.
Thanks anyway for your help.
Brian
link
bogorman's gravatar image

bogorman

Because no one was able to answer the question
link
bogorman's gravatar image

bogorman

Your answer
[hide preview]

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×36

Asked: 08/24/2011 08:04

Seen: 333 times

Last updated: 09/20/2011 09:15