7

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 ...


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

You need to define a new URL by using hook_menu. There, 'type' is set as MENU_LOCAL_TASK and URL is like 'node/%node/CUSTOM_CONFIG'. Code snippet from the hook_menu in node.module: $items['node/%node/edit'] = array( 'title' => 'Edit', 'page callback' => 'node_page_edit', 'page arguments' => array(1), 'access callback' => '...


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

You can follow the below step: Go to Content management -> Content Filter content for content type "Product" Edit your product content Click on "stock" link in top of page Set the "Stock" and "Threshold" quantity and check "active" check-box save the form. Edit: Code snippets to display total and sold item from stock: $output = ''; $array_sku = ...


3

There is already module File downloads in the ubercart which allow user to sell file with the product. Install the module File downloads from the module list. Assigning directory to file donwload: Go to Administration -> Store -> Configuration -> Product In the File download settings section, set the path of the directory of the files and save ...


3

Here's a pretty simple function which will return all the order objects for a user (D7): function my_module_uc_orders_by_user($uid = NULL, $status = 'completed') { global $user; $uid = is_numeric($uid) ? $uid : $user->uid; if ($results = db_query("SELECT order_id FROM {uc_orders} WHERE uid = :uid AND order_status = :status", array(':uid' => $...


3

You can add custom fields to Ubercart orders the same way you add custom fields to content types. They can be added by going to Store -> Configuration -> Orders -> Manage Fields (admin/store/settings/orders/fields) These fields would then be available on the order admin pages. Hope that helps.


3

If you want to use that "Order subtotal" in a Rules "Condition", you could try to first add a Rules condition Entity has field (related to the field containing that "Order subtotal"). That's also what is mentioned in the Rules UI when you're adding a "data comparison" condition, somewhere it says: The data selector helps you drill down into the data ...


3

Below are 2 possible alternatives for setting up a simple shopping cart without using the Drupal Commerce or Ubercart modules (as in your "I don't want a huge functionality like Drupal commerce does. No products, products sku."). Option 1: A lightweight e-shop If you're only looking for a simple and lightweight e-commerce solution, have a looking ...


3

use Drupal\uc_order\Entity\Order; $order_load = Order::load($order_id); //Load Order $ownerinfo = $order_load->getOwner(); //Fetch Owner Info $ownerID = $order_load->getOwnerId(); //Fetch Owner ID $ownerEmail = $order_load->getEmail(); //Fetch owner email


2

You may have to save the changes after you make them. After your decrement action, add another action to save the entity.


2

This is how I solved it: function mymodule_uc_cart_alter(&$items) { $items[45]->price = 29393; } In this example I'm just hardcoding the change to demonstrate how to change the value. Obviously you would apply your own logic here based on whatever your requirements are.


2

You can easily remove review by installing uc_optional_checkout_review module and set the check box of "Skip checkout review" at admin/store/settings/checkout menu.


2

I think it is likely because your first result is a "0" and php will evaluate that as a False, which stops your while loop from running.


2

Activate the following Übercart modules: Shipping Shipping Quotes Flat rate Go to http://yoursite.com/?q=admin/store/settings/quotes and click on "Add flat rate quote". Fill out the from and submit it. The next form should be the conditions form. Create the necessary condition(s), for example, 0 < order:order-total AND order:order-total < 100 as a ...


2

If you want to alter the cart item, then you can use hook_uc_cart_alter of ubercart. This hook is not in documentation of ubercart 7 but its still working for Ubercart 7. This is called every time the cart is rebuild (e.g. when products are added), so it's a good place to alter the cart item. I have checked uc_coupon module and hook ...


2

Thanks to Clive for pointing me in the right direction. As requested here is a code snippet I used in my module. I was able to take the code found in uc_product_class_form_submit() and make minor changes to make it work for my situation. Essentially, in my module, I'm using hook_enable to call a helper function which checks for an existing product class. If ...


2

In your custom module use the hooks defined in the Ubercart terms and conditions module.


2

VBO comes, out of the box, with some predefined (hardcoded) operations that can be applied to each row selected in the view. The available operations are shown within "Selected bulk operations" when configuring the VBO field. Obviously, something like Edit taxonomy terms isn't one of them. However using Rules (Conditions and/or Actions) you can execute a ...


2

Taking Chris's answer an putting it in Answer format for readability. Figured it out, perhaps this will be of help for someone :) $product_nid = 2; $some_data = array('attributes' => array( '1' => '1', ), ); uc_cart_empty(uc_cart_get_id()); $data = serialize($some_data); uc_cart_add_item($...


2

Assuming author of product is also seller, You can do this with a rule using loop and author:mail. Try importing this rule and see how it works { "rules_e_mail_seller_checkout_notification" : { "LABEL" : "E-mail seller checkout notification", "PLUGIN" : "reaction rule", "REQUIRES" : [ "rules", "uc_cart" ], "ON" : [ "uc_checkout_complete" ], "DO" : [ { "...


2

Make a new flat rate shipping quote called 'No shipping' with zero cost. Then in the Delivery method pane at checkout the user can choose between your shipping option and your no shipping option. You make shipping quotes at /admin/store/settings/quotes specifically the 'Add flat rate quote' link /admin/store/settings/quotes/methods/flatrate/add Obviously ...


2

You can hide it dynamically if no products in the order are shippable. We are using ubercart 7.x-3.4 and on the Checkout settings page /admin/store/settings/checkout (Home » Administration » Store » Configuration » Checkout) there is an checkbox 'Hide delivery information when carts have no shippable items.' Then, when you edit each product, the Product ...


2

Edit your product. Go to features. From the Add a new feature, Add both recurring fee and role assignment for your product. Hope this helps.


2

The Light Shop module is a simple and lightweight e-commerce solution which doesn't require the Drupal Commerce or Ubercart modules (as in your question title). Here is a quote from its project page: Session-stored basket. Adding to basket and its subsequent editing/checkout process is done using AJAX. Also it works fine when JavaScript is turned ...


2

First off, just a friendly reminder to get yourself on the latest release of Drupal 7 core ASAP, as there was a major vulnerability discovered in all versions of Drupal 7 prior to 7.32. As for your direct question, I don't believe you can set multiple order statuses for the same order at the same time. What you can do, however, is setup a couple of other ...


2

You can go for Ubercart Webform Integration This module integrates two other modules: webform and ubercart. It allows you sell products directly from your webforms. It is particularly suited to be used as part of a registration system.


2

Concatenating variables into an SQL query is usually a bad idea (search for SQL injection and you'll see why). The D6 version you're starting with: $result = db_result(db_query("SELECT value FROM {variable} WHERE name = '%s'", $variable)); uses parameters, you just need to convert that to use the newer query substitution in D7. The docs for db_query() have ...


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