The Amon Carter Museum recently went live with a new online store using the Ecommerce module set. We developed a couple of custom modules for purchasing museum memberships and adding extra billing/shipping information.

You can see our new store at www.cartermuseum.org/store. Yes, the rest of www.cartermuseum.org is built on Drupal.

Please take a look if you get a chance! Provide feedback, constructive criticism, or ask questions.

Many thanks to the Drupal community!

Comments

stuartgoff’s picture

Great looking site. I would say one of the best looking Drupal sites I've seen!

designerbrent’s picture

Very nice, robomalo. The site looks really nice.

Since I am currently working on an implementation of ecommerce, I do have a question for you. What are you using for the catalog? That looks really interesting and I haven't found anything like that to use. I've been playing with Taxonomy_context but haven't finished yet.

Thanks,
Brent

robomalo’s picture

Thanks for your kind words. All the products are queried and sorted by the views module. The products are a CCK type that have a drastically different themed preview than full node view. I know I didn't go into a lot of detail, but I hope this info leads you in the right direction. Feel free to ask anything else.

mimetic2’s picture

wow great site.I was wondering how you themed e-commerce? Did you use CSS or did you use views? The more detail the better :)

ALso on your checkout page, could you put the code to copy your information from the delivery to the billing? Thanks!

robomalo’s picture

I haven't followed any of my threads in a long time. Sorry about the delay!

The products are a custom CCK content type. The default product types were not flexible enough for our needs. Any CCK node can be product enabled.

The products are listed by views.module. Our custom view was configured to provide the url /store/$arg. We did some custom argument handling to display the products within categories (taxonomies). For example, /store/books returns all products within the taxonomy called "books."

We used CSS and themed the product content type to achieve our desired look.

If you were to go through the checkout process you would notice custom fields, improved usability, and more consistent options than the ecommerce comes with out of the box. Making this happen was pretty complicated and I wouldn't even know how to explain it on here. However, I can tell you it required multiple template.php overrides, custom hook_form_alter functions of ecommerce functions, custom javascript, and a LOT of patience.

Also on your checkout page, could you put the code to copy your information from the delivery to the billing?

I know the following code could be prettier, but it works none the less (it could be about 70% shorter using jquery functions). I just got it working and intended to clean it up later. This will only work if you have the jquery library loaded.

Include the following javascript as a separate file in your header:

if (Drupal.jsEnabled) {
  function copyBilling() {
    document.getElementById('edit-address-shipping-firstname').value = document.getElementById('edit-address-billing-firstname').value;
    document.getElementById('edit-address-shipping-lastname').value = document.getElementById('edit-address-billing-lastname').value;
    document.getElementById('edit-address-shipping-street1').value = document.getElementById('edit-address-billing-street1').value;
    document.getElementById('edit-address-shipping-street2').value = document.getElementById('edit-address-billing-street2').value;
    document.getElementById('edit-address-shipping-city').value = document.getElementById('edit-address-billing-city').value;
    document.getElementById('edit-address-shipping-state').value = document.getElementById('edit-address-billing-state').value; 
    document.getElementById('edit-address-shipping-zip').value = document.getElementById('edit-address-billing-zip').value;
    document.getElementById('edit-address-shipping-phone').value = document.getElementById('edit-address-billing-phone').value;
  }
  
  $(document).ready(function() {
    var a = document.createElement("a");
    var linkText = document.createTextNode("Click here to copy your billing information below.");
    a.appendChild(linkText);
    a.className = "copy-billing-link";
    a.onclick = function() {
      copyBilling();
      return false;
    };
    var linkContainer = document.getElementById('copy-billing-container');
    linkContainer.appendChild(a);
  });
}

Then you have to add the following div before the first field inside the shipping address fieldset.

<div id="copy-billing-container"></div>

How do you do this? Add a function like this to template.php. I omitted about 100 lines of code from this function, but this is all you need for the javascript to work correctly.

function address_form_alter($form_id, &$form) {
  $form['address']['shipping']['firstname']['#prefix'] = "<div id=\"copy-billing-container\"></div>\n";
}

This div is empty because javascript writes the necessary link in the div. If the visitor does not have javascript enabled, they don't get an option that doesn't work... a little DOM magic.

Reading back over this post I can see how all of this might be confusing. I am not very good at explaining months worth of work in a single post. I really hope I have been able to help. Please comment or ask questions and I'll reply sooner!

mimetic2’s picture

Hey thanks for the response! I actually ended up switching to ubercart (ubercart.org) because its much simpler/cleaner and the developers respond to you! But if i do intend on going back to ecommerce ever, i will definitely need the information you provided, so thanks a lot for that!

-Aaron

robomalo’s picture

I wish we were using Ubercart. The checkout process is much more streamlined. We were way too far into development when Ubercart got announced, and it doesn't have an official release.