0

I'm working on a book repository website very similar to Islandora which is based on Fedora Commons and Drupal.

Books's information stored in repository outside Drupal. Apache Solr is configured on server and Drupal to search repository and display result in Drupal.

everything works fine, now I want make this books purchasable in Drupal.

As these search results are not nodes and there is not a node per book, I'm looking for a way to adding this non-node based items to cart!

any suggestion may be helpful!

http://www.ubercart.org/forum/support/14856/non_node_based_items

1

Having dealt with this exact circumstance before, we had a content type named 'bundle' which was purely a placeholder for the product details in Ubercart.

The user views the product and clicks 'add to cart' and in the cart is an instance of this 'bundle' with the product details in it.

Its far from a good solution and I would definitely be looking at creating a node for each of the products you have for sale - You could even create the nodes when 'added to cart' so you didnt need to add any in advance.

Ubercart has a great API for manipulating cart contents and line items, have you looked at that at all?

  • can you provide links to useful parts of API? – Mohammad Ali Akbari Aug 31 '12 at 6:47
  • 1
    There are lots of functions that will assist you. Have a look at drupalcontrib.org/api/search/6/uc_cart. Note 'uc_cart_add_item' and 'uc_cart_get_contents/item' and 'uc_cart_update_item' and 'uc_cart_update_item_object' – Christian Sep 4 '12 at 2:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.