7 replies [Last post]
meric's picture
Offline
Cool profile pic award.
Joined: 01/28/2008
Juice: 28
Was this information Helpful?

Greetings,

I've been trying ubercart and e-commerce(drupal) for a week now, and I thought ubercart is the better choice. I need an e-commerce module that handles domain registration, I tried UC's subproducts and product kit, but it doesn't fit to the requirements.

I have this setup :
Base product: A domain TLD (.com, org. net, etc)
- Whose attributes are:

  • Domain name (site.com, mysite.net, etc) - price is $0.00
  • Duration (1 years, 2 years, and so on) - prices are set

This is the basic product (which I have no problems with). Now, these aren't the only products I'll have, we also have other products: added services, that are optional, but requires dependency to a base product, like this:

Sub Products (Services):

Type 1
- Mail Forwarding (attributes below)
- Web Forwarding
Type 2
- Webhosting
- SSL

* These have dynamic attributes such that:

  • Domain Name - Value inherited from base product
  • Duration - Dynamic: duration's options depend on the base product (domain TLD), (e.g. a .com domain has different options and prices from a .net domain.)

I tried product kits for these but can't achieve the desired behavior. I also tried attributes /options as subproducts, but I have issues, like: with the dynamic attributes I need, and subproducts have to be removable, but cannot be purchased as a standalone product.

How will I do this with ubercart?

Any suggestions, comments and recommendations will be appreciated. Thanks!

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Base Products and dependent Sub products (Domain registratio

meric, such a complicated setup can't be handled by core alone, but I think there are some basic pieces that will be good for you to build upon.

First, there are no dynamic/dependent attributes at the moment. Hopefully eventually someone will get this done and share it, but in the meantime we're personally working on solidifying the core system.

Regarding your specific needs, the easiest but less than ideal situation would be to make the various domain types separate products. Customers would have to "Purchase your .org domain!" and you could set the attributes/options according to the domain type.

To offer something a little nicer for your customers, you might consider the following pointers as a starting point. First, create your domain name product. The price for the product should be based on the lowest duration, and you can use the attributes system to add an appropriate price increase depending on someone's duration selection. You don't have to associate a price increase for all attributes, so it would be no problem to add an attribute w/ options for the various suffixes that doesn't alter this.

For the dependent attributes, you can could make them attributes but assign no options to them through the forms. This will allow Ubercart to accept any value, since it defaults to a textfield that the customer can enter a selection on. In a custom module, you can hook into the add to cart form to change these textfields to select boxes. My recommendation would be to have them populated with the options for the default domain type/duration and then use an AJAX request when one of the attribute boxes are changed to get the new values for these boxes. Then when someone finally makes their selection and adds the product to the cart, these choices will show up.

This solution requires you to use some custom PHP and JS, but I think it's the best/easiest way to interface w/ the core product/attribute system.

Best of luck! And thanks for your kind words. Smiling

meric's picture
Offline
Cool profile pic award.
Joined: 01/28/2008
Juice: 28
Thank for the pointers

Thanks! I'll try and see what I can come up with.

I have these Domain Products in mind, based on TLDs:

  • Domain Name COM
  • Domain Name NET
  • Domain Name ORG
  • And so forth..
  • Right now I'm implementing the dependencies of these base-subproduct relations via a hook on my own module (function PHblocks_add_to_cart(), an) and modifications on the uc_cart and uc_products module.

    As for the dynamic attributes, I'm still trying to implement it with php and perhaps a little javascript.. But as you said, it would seem to be easier to incorporate AJAX for this. I forgot to add this in my previous post, but the selling process is a multi-page wizard, which goes sequentially like this:

    • Page 1: Customer searches for a domain name (we'll search for its available .com, .org, .net counterparts)
    • Page 2: A table of available domains are displayed (checkboxes). the customer selects the ones he wants to purchase.
    • Page 3: After selecting domains, I now display the domain products (via node_load(), node_view() on products classified as domains. the attributes of a domain product are:
      1.) Domain Name, no default option, I modified the attributes module to turn this particular attribute into a hidden textfield, and displays the domain name as a listed item.
      2.) Duration no problem, durations are properly set. See attachment on how I display these products.
      • Thing here is that I also have to display my subproducts (services) in such manner that it would appear as a component of the domain products.
      • The base products, and its subproducts all have "add to cart" buttons.
      • And those already added in cart should have the "add" buttons disabled and changed to "already in cart".
      • And while typing this, I just realized AJAX is a must-use for this to work. I have to change the behavior of "add to cart", since I have to alter/prevent its redirect.
    • Page 4: registration page;
    • Page 5: checkout/payment page
    • I know this really requires so much beyond ubercart's standard features. But I guess it would really entail a lot of work with custom PHP and JS.. I'm still feeling out drupal, as I've just been working with it for 1 and a half months only. And ubercart I only started testing out last week. Smiling

      I'm currently bleeding it out with page 3. Maybe I'll provide a screenshot of what I want to do with it next time.

      Thanks again and more power!

      *By th way: Do you know of any site/s that uses ubercart to sell/register domains?

AttachmentSize
domainprod.jpg 32.79 KB
Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
meric wrote:*By th way: Do
meric wrote:

*By th way: Do you know of any site/s that uses ubercart to sell/register domains?

I think someone asked about the feasibility of this a long time ago, but I can't remember who and I don't know of anyone else doing it now.

eugef@drupal.org's picture
Offline
Joined: 12/24/2007
Juice: 102
Re: meric wrote:*By th way: Do

I create site which have to sell domains.

So in a few weeks i will develop this possibility in Ubercart.

meric's picture
Offline
Cool profile pic award.
Joined: 01/28/2008
Juice: 28
Re: Re: meric wrote:*By th way: Do

Nice to see others planning to use ubercart for the same purpose as I do.

Well, good luck to your site, and hope to see how it comes up.

webmasterkai's picture
Offline
Uber DonorBug Finder
Joined: 08/09/2007
Juice: 299
Re: Re: Re: meric wrote:*By th way: Do

We've got enom integration working for domain name purchases. We just use an open attribute field and check for availability when they add it to cart.

Biodiesel * (ubercart + drupal) = Sundays Energy

eugef@drupal.org's picture
Offline
Joined: 12/24/2007
Juice: 102
Re: Re: Re: Re: meric wrote:*By th way: Do

Colud you produce to us some explanation of how you do it?