13

To call the function of one module in another module: If the function is not in the .module file, call module_load_include() //Load node.admin.inc from the node module module_load_include('inc', 'node', 'node.admin'); Call the function from the other module function_you_want_to_call();


13

The most secure place to store credit card numbers will be on a third party service designed to securely retain that data. These service providers are PCI Level 1 compliant with code and systems in place to prevent the unwanted or unexpected exposure of sensitive card data. Many payment gateways support such "card on file" functionality, where they allow ...


8

There are new tools and resources for this: http://drupal.org/project/commerce_migrate http://drupal.org/sandbox/rfay/1233708 http://vimeo.com/26775252 http://www.commerceguys.com/resources/articles/215 http://www.commerceguys.com/resources/articles/ubercart-drupal-commerce-1 http://www.commerceguys.com/resources/articles/ubercart-drupal-commerce-2 http://...


8

Go to http://mysite.com/admin/store/products/classes Enter the machine name of your content type in the 'Class ID' text field. Enter a human-readable name for your new product class (and optional description) Click save Ubercart will now register the content type with the machine name that you added in the above steps as a product. Next time you add/edit ...


7

The payment gateway is the key. If your chosen payment gateway is available for Drupal Commerce, I would say yes, go ahead and use it. Even if not, there are compelling reasons to develop or help to develop the payment gateway. Drupal 7 is much more advanced, and will continue to be relevant for much longer. Drupal 6 will not be supported when Drupal 8 is ...


6

I have not found a better alternative to migrate module till date and I have done lots of migration including ubercart order migration. It has served me well for: ASP.Net (MSSQL server) -> Drupal migration D6 -> D7 Migration Rails (MySQL) -> Drupal Migration There are tons of other modules like node_export, views bonus pack, uuid features, deploy that ...


6

I've done exactly this before; I'll dump the code I used. Hopefully, it'll give you an idea. /** * Implements hook_menu(). */ function uc_giftwrap_menu() { $items['admin/store/settings/giftwrap'] = array( 'title' => 'Gift Wrapping', 'access arguments' => array('administer gift wrap'), 'page callback' => 'drupal_get_form', 'page ...


6

From the sounds of it, you actually want a whole e-commerce system, not just a shopping cart. Ubercart will do this for you, but the general trend now is to go with Drupal Commerce (project page | Commerce homepage). Both modules will allow for shopping carts, as well as integration with a variety of payment service providers. I'd personally go with ...


6

Drupal 7 doesn't use %placeholder style query placeholders. Furthermore, there's an error passing a list of strings to db_query instead of an array. Your query would be db_query('UPDATE {users} SET name = :name, mail = :mail WHERE uid = :uid', array(':name' => $name, ':mail' => $mail, ':uid' => $account->uid)); However, you should ...


6

The Basic cart module is the best solution for you... Basic cart is a very simple shopping cart / checkout process for Drupal, that just sends 2 emails after each order. Along with the shopping cart, this module also provides a block where you can view your cart's content. It's ideal for small websites with only a few products or other content ...


5

We're running a project with Drupal Commerce and it a great base for a store, but I'd say the key decision whether to use it is how comfortable you are with development. Commerce is a well designed e-commerce framework done the "drupal way", but unless you're comfortable with writing some custom modules to fill the in the gaps it's a lot slower getting up ...


5

You can change this in Ubercart settings using no extra modules... Go to /admin/store/settings/products/edit/general, which is in Store administration -> Configuration -> Product settings -> Edit -> Product settings in the menu. The text for 'Add to cart' is editable in the Add to cart button text section.


5

I would discourage you from messing with the database unless you really know what you're doing. You should better use the API and the function uc_order_delete(). Have a look at this example script: <?php include_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); global $user; if ($user->uid == 1) { $result = ...


5

In Drupal Commerce, we made the decision to add line item type dependent callbacks to the line item API. A product line item will function differently from a shipping line item will function ... etc. As a side effect, this means there is no such thing as a "generic" line item, just like there is no such thing as a typeless node. What needs to happen, if it ...


4

I believe this is more of a workflow question than, a lack of module(s) question. You can setup Ubercart so that you accept an order without accepting a payment. You can set the status of the order as non-processed. You then process their payment manually (via phone, online, inperson, etc), then, manually, change the status of their order to process.


4

Drupal Commerce sites: http://www.eurocentres.com/en http://www.commerceguys.com/customers/showcase Ubercart sites: http://www.topsite.com/best/ubercart High profile sites: http://www.infomagnet.com/content/high-profile-high-traffic-drupal-websites Government sites: http://govfresh.com/2010/02/5-government-sites-using-drupal-effectively-for-open-...


4

Commerce Kickstart 2 hit its 2nd release candidate yesterday so I would consider it stable to start working with. It is also very actively maintained so I guess there will be lots more bugfixes rolling out over the coming weeks as you start building your site. I have used it for an upcoming project and it was a major help in boosting development time. It ...


4

Check Cart Links API page: http://www.ubercart.org/node/1427 So, you have to enable Cart links module (included in Ubercart) and your link will be: http://example.com/cart/add/e Ubercart wil ask for confirmation for this action. If you don't want this confirmation I think you will have to write your own empty cart routine: Define in your own module ...


4

You can use "Conditional Actions" to achieve this. Its available under Store Administration / Conditional Actions. I believe there is a preconfigured conditional action for your request in Ubercart. Maybe you just need to enable it. If not just create your own.


4

You can use a view created with the Views Bulk Operations (VBO) module to delete orders. This module augments Views by allowing bulk operations to be executed on the displayed rows. It does so by showing a checkbox in front of each node, and adding a select box containing operations that can be applied. Drupal Core or Rules actions can be used.


4

(Assuming you are on Drupal 6, as it seems) you also need to copy the default node.tpl.php (e.g. the one from your base theme) in the same theme directory you are putting the override file (node-product.tpl.php) in order for the theme engine to pick it up: If you are implementing a suggestion, rename the file to the suggestion name it should have. Note ...


4

Yes, you can use the Maillog / Mail Developer module. Maillog provides an easy possibility to log all Mails for debugging purposes. It's possible to prevent the mails to being sent, so there is no need for an extra mail server to test the mail functionality of other modules or the Drupal core. Additionally you can immediately display the mail through the ...


4

Using the Ubercart API at api.ubercart.me, it is $orders = uc_order_load($orderId); $orders is an array, so $order = $orders[0]; See: http://api.ubercart.me/api/drupal/ubercart!uc_order!uc_order.module/function/uc_order_load/7


4

To save to anyone else the trouble, this is the view I created to achieve the above. $view = new view; $view->name = 'Spambots'; $view->description = ''; $view->tag = ''; $view->base_table = 'users'; $view->core = 6; $view->api_version = '2'; $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ $...


4

Go to admin/store/products/classes. From there you'll be able to assign a product class to an existing content type, after which you should see the Ubercart-specific settings on the content type edit form.


4

Agree with the above and I would also add several suggestions: - use Taxonomy and Taxonomy Access Control modules to control access to content and who can update which service node - use Computed Field module that would take a value from related content to change a value (price) of the service/order depending on who did the work and what was the final ...


3

I'm still using D6 but I did something similar with jQuery: Make a mymodule.module file that goes like this: <?php function mymodule_form_alter(&$form, &$form_state, $form_id){ if ($form_id == 'uc_cart_checkout_form'){ drupal_add_js(drupal_get_path('module', 'mymodule') . '/mymodule.js'); } } The format of your hook_form_alter may be ...


3

Would that checkout pane still be captured by hook_alter_form()? If so you could add #required to the field there. Let me have a quick try and I'll get back to you. EDIT: OK, this worked for me: function tools_utilities_form_alter(&$form, $form_state, $form_id) { if ($form_id == 'uc_cart_checkout_form') { // Make delivery date required $form['...


3

You can test this one - Put below code in your page (create new page content) and select input format "php" and hit preview button you will get what you want (if cart is not empty). <?php $items = uc_cart_get_contents(); foreach($items as $item){ while(list($key,$value) = each($item)){ if($key == 'qty')$...


3

One way of doing it is by using the Views Bulk Operations module. There is a patch which has recently been committed and offers the "Add to cart" action over here: http://drupal.org/node/1553700 Once your view is built (fields only) you can add a Content VBO field and choose the Add to cart action from there. In theory, redirection to the cart can be done ...


Only top voted, non community-wiki answers of a minimum length are eligible