Skip to main content

Questions tagged [commerce]

One of the modules that implements an eCommerce framework and ecosystem is the Drupal Commerce module.

Filter by
Sorted by
Tagged with
2 votes
1 answer
760 views

How to access commerce_product field of line-items using Rules to flag the Commerce Product?

Related to this question: How to mark product if it has already been purchased by current user? I have a Drupal Commerce shop, where I'm trying to use the Flag module to mark products to inform users ...
Nenotek's user avatar
  • 47
1 vote
1 answer
979 views

How to make content translation available for front page?

On my front page I have a language selector (English / French). The default language is French. The translation works only in the content of page (in the views) i want make the translation work in the ...
SeifBh's user avatar
  • 73
18 votes
5 answers
9k views

How to Filter view by comparing 2 fields. If field-a < field-b

I have a product content type that has 2 price fields. I want to create a view that shows all products where price-A is less than price-B. I was hoping I could just add a filter and select price-A ...
Fadzy's user avatar
  • 181
4 votes
2 answers
645 views

Can kint be used to debug templates?

Normally, I can use kint() in the place of dump() to debug my twig templates. The theming manual agrees. However, this doesn't work for me in Commerce 2. In commerce-product.html.twig, I added {{ ...
Patrick Kenny's user avatar
20 votes
4 answers
15k views

Programmatically creating an order in Drupal Commerce for anonymous users redirecting to payment page

Ryan has some great code that you can programmatically create an order <?php global $user; $product_id = 1; // Create the new order in checkout; you might also check first to // see if your user ...
user13134's user avatar
  • 558
15 votes
3 answers
17k views

How do I add an additional submit handler in commerce checkout form?

How do I add an additional submit handler? I have tried this but it did not work. function c_coupon_form_alter(&$form, $form_state, $form_id) { drupal_set_message($form_id); switch($form_id) {...
Ahmad's user avatar
  • 2,835
3 votes
3 answers
7k views

How do I use rules scheduler to disable and enable a commerce product entity based on certain date fields?

I have a commerce product type (entity not display node) with two date fields (enable_date and disable_date). What are the steps to create a rule/component and use rules scheduler to schedule these to ...
Nigel Waters's user avatar
  • 1,024
7 votes
6 answers
14k views

How can I import and export Drupal Commerce Products?

I have a Drupal 7 site and installed the Drupal Commerce module. In which I have added Commerce Product with Category like: Software Products Hardware Products Electronics Others I would like to ...
AshwinP's user avatar
  • 406
16 votes
4 answers
28k views

How do I display my products?

I have managed to create a product type and import my product data, so I now have a list of products. How do now go about getting the products to display? Do I have to build a content type from ...
Martin Duys's user avatar
16 votes
7 answers
13k views

How do I theme checkout pages?

how do I theme the cart and checkout pages in Drupal commerce? I have set content, account, billing, and payment parts. Is there any --.tpl.php file to create?
Badri's user avatar
  • 821
4 votes
4 answers
5k views

Adding validation to commerce pane form

I want to add validation to the user's details form. I've tried to use the #validate to add validation function, but nothing happens. This is the Code: function ...
doron's user avatar
  • 427
2 votes
2 answers
5k views

How to export drupal commerce products? [duplicate]

I need to export products generated by Commerce module. What can I do to accomplish this?
chefnelone's user avatar
  • 6,257
1 vote
1 answer
2k views

Error When Create Drupal Commerce Product Display

I have managed to create a product type and import my product data, so I now have a list of products. then i follow ryan szrama instruction http://drupalwatchdog.com/1/1/building-commerce-product-...
faizal ismail's user avatar
1 vote
3 answers
2k views

limit order quantity in drupal commerce

In my website I would like to limit product quantity to 1, meaning is that user can order only one of a product in one order. And my question is how to configure to set maximum quantity to 1 . Any ...
SAWAUNG's user avatar
  • 261
1 vote
5 answers
2k views

New line item every time an item is added (avoid grouping)

How can I avoid grouping of the same items (products configured identically) to be grouped in the same line item with a quantity count? I want every single item, even if an identical already exists ...
Victor Purolnik's user avatar
1 vote
1 answer
1k views

How to restrict anonymous users to a single product and quantity 1 using Commerce and Rules?

I have a slightly unusual use case in that I want to allow authenticated users to order multiple products and use the shopping cart but I want to limit anonymous users to purchasing products ...
Patrick Kenny's user avatar
7 votes
2 answers
4k views

Commerce checkout - Update cart pane after user select a shipping option (ajax)

I am working on a one page checkout and I'm trying to get the cart review pane updated with a shipping price while user selects a shipping option. I have attached #ajax information to the shipping ...
E. de Saint Chamas's user avatar
6 votes
6 answers
9k views

Alter cart unit price and total amount

I need help on this code which is invoked on calculate sell price rules event on cart view. Line items and order are properly modified. But nothing is displayed, old unit price amount and old total ...
sherpadawan's user avatar
5 votes
1 answer
4k views

Order Total not updating after I change the line item price

I have a custom form which on submit creates a new order, loads a product and a custom line item type. I then save the information from the form in the line item. The line item price is updated via a ...
benjy's user avatar
  • 1,496
5 votes
2 answers
6k views

Disable product when out of stock

I would like to disable a product as soon as it's stock drops to 0 in Drupal commerce. I think this might be possible by using rules, but then I don't know what will happen to the product display. I ...
Mike's user avatar
  • 539
5 votes
3 answers
7k views

How to load current user cart in Commerce 2?

In Commerce 2, how can I load the current user's cart? The current user may be either anonymous or logged in. The site has multiple stores and I won't know which store the user is currently on.
quantumized's user avatar
  • 1,249
4 votes
1 answer
2k views

Checkout page not found when order created through Drupal Commerce API for not authenticated (anonymous) user

I have the following code inside rules - action (being triggered by webform submission) <?php global $user; $product_id = 1; // Create the new order in checkout; you might also check first to // ...
Nathan Bomshteyn's user avatar
4 votes
2 answers
3k views

Overriding an entity add/edit form through alterroute

I want to create my own version of the add/edit form for an entity defined in contrib module (drupal_commerce). I assumed i'd be able to adapt the example here http://www.foreach.be/blog/how-...
Mathew's user avatar
  • 313
4 votes
2 answers
4k views

Custom PDF template in Commerce Billy

I have installed Commerce Billy module on my website. Then upon ordering I get this PDF with this layout. But I want to change the table displayed, because I've created some custom fields in it and ...
Karl Michael Linantud's user avatar
4 votes
2 answers
324 views

How to create audit trails/order revisions?

I've been working with Drupal Commerce for a few months now. As a non-profit, our organization hosts an e-commerce/e-learning site. We're a smaller organization with approx 20 staff users and <20,...
Shaun O's user avatar
  • 85
4 votes
1 answer
6k views

Adding a line item to an order from a module

I'm trying to create a gift wrapping module for Drupal commerce. I have created the checkout pane that has a select box for the user to choose if they want their order gift wrapped (and a field to ...
splatio's user avatar
  • 902
3 votes
2 answers
7k views

How to customize commerce order layout

I'd like to modify the current order layout visible at user/[uid]/orders/[order_id] Specifically, I'd like to list the billing and shipping info before the line item detail: billing and shipping ...
Dave Bruns's user avatar
  • 1,619
3 votes
1 answer
6k views

Customize commerce cart form page

Task I have been issued to alter the cart form view Shopping cart form (Commerce Order) on the site.com/cart page of the Drupal 7's commerce module. This includes adding extra choices such as sizes ...
Robin Castlin's user avatar
3 votes
2 answers
1k views

Anonymous cannot see cart in cart page

I need to debug an issue and don't know how to start. If I'm logged in the cart works just fine but, if I log out and put something in my cart I see the object in the cart widget but not my cart page....
Shyghar's user avatar
  • 1,084
3 votes
2 answers
1k views

Commerce - Views - Taxonomy - Add to cart issue

I am constructing an e-shop using Drupal Commerce. I've arranged my products in Categories and Subcategories using taxonomies and taxonomy-menu. All is nice till now. I also created a view, that ...
user avatar
2 votes
4 answers
1k views

Is Drupal Commerce ready for the real world? [closed]

I'm trying to make a decision between Drupal 6 + Ubercart and Drupal7 + Drupal Commerce... I'd much rather develop in 7 and am excited about Drupal Commerce but, as it is relatively young, have some ...
starsinmypockets's user avatar
2 votes
3 answers
2k views

Discount for Roles

I am using Drupal Commerce and I would like to know if it is possible to have discounted prices for registered users and much better for roles. For example, the nomral price is $100 but when a user ...
girok's user avatar
  • 31
2 votes
2 answers
4k views

How to add custom css file to subtheme of omega kickstart theme?

I have created a subtheme of "omega kickstart theme" and I want to add some custom css files to it. I searched and got some solution(which didn't worked for me), the solution is as follows: create ...
maaz siddiqui's user avatar
2 votes
1 answer
1k views

I can't get the SKU value for a commerce product in a rule action

I created a rule to be fired when a "New Commerce product is saved" Then I set a action to create a Product Display node and and another action to set the title for the Product Display to be the same ...
chefnelone's user avatar
  • 6,257
2 votes
2 answers
387 views

Implementing IP recognition and price conversion (2 parts)

The commerce (kickstart) site has default prices in USD. Site should convert the price to local currency for international visitors, based off IP or other means. Example: Widget Price - $2 (USD). ...
a20's user avatar
  • 123
2 votes
2 answers
754 views

What's the explanation for my product permission issue in a Drupal Commerce view?

I'm very confused with some permissions and product displays in Views. Maybe you can help me to understand it. I'm trying to make a view of product displays. In the view I include a relationship for ...
svelandiag's user avatar
2 votes
1 answer
802 views

Commerce Attribute price is not updating in cart

I am using commerce price attributes module then I am facing problem , price is updated on the product display node but not in my cart...also, there is no line item for the added price attribute. ...
rahulkumar.it's user avatar
2 votes
5 answers
4k views

Hide Title for Rendered Entity views

In display modes I set to hidden all Title fields, but Views still gives h2 title.
Optimus Prime's user avatar
2 votes
1 answer
1k views

How to create a page category of products in Commerce 2?

Usually in commerce 1 did: Display-products (node), in which field "Catalog" of taxonomy-term. Create a displays. Go to the term page and see all products! Great! In commerce 2 tried to do but failed,...
lukasss's user avatar
  • 31
2 votes
2 answers
2k views

Drupal Commerce: Theming the Add Products form (Bulk Production Creation)

I am using Drupal Commerce Bulk Product Creation to add products to my site. I would like to theme the Bulk Add Products form to make it more user-friendly to edit. I can use page--admin--commerce--...
big_smile's user avatar
  • 2,838
2 votes
1 answer
596 views

How do I prevent a product from being added to the cart?

A common question I hear is "How can I prevent a product from being added to the cart?" There are several reasons why you'd want to do this, most end up being related to some logic being required to ...
nvahalik's user avatar
  • 3,622
2 votes
1 answer
146 views

How to generate a Commerce order from a CSV?

I'm using Drupal 7 with commerce. Is there a way to generate an order from a csv or similar? the idea is that users could upload a csv (sku and quantity for now) with the items they want and the ...
Nacho's user avatar
  • 63
2 votes
1 answer
2k views

How can I implement a shopping cart limit? [duplicate]

Possible Duplicate: limit items in commerce shopping cart I`m using drupal commerce for my webshop, i want to limit products in the shopping cart which means when the user has a product in his ...
Reza Shadman's user avatar
1 vote
1 answer
3k views

Limit items in shopping cart [closed]

Is there a way to limit users on my site to buy only 2 items from a list of products? Am using Drupal 7 with Commerce module and Rules. I added a new rule to when adding or removing and item from the ...
saadlulu's user avatar
  • 1,760
1 vote
1 answer
73 views

Send mail to product owner with Rules

I have a Drupal 7 site running including Commerce. I'm asked to make the webshop work in a way that the mail send after completing payment is send to the product owner(s). So when creating a product ...
Joost's user avatar
  • 1,378
1 vote
1 answer
44 views

Fetch Customer Profile from Line Items

In a webshop I’ve build I want to send individual e-mails to owners of a prodruct in the shop after a product is sold. To do this I got this as a solution: Send mail to product owner with Rules But ...
Joost's user avatar
  • 1,378
1 vote
2 answers
1k views

I'm looking for a Drupal Commerce Shipping in-cart estimate

I am working on a Drupal Commerce site, we are trying to add a feature in the cart that would allow the user to input their zip/postal code or country and receive an estimate on shipping, before ...
user25554's user avatar
1 vote
2 answers
201 views

Correct way for Attributes in Commerce

I am building a small web site which offers photography services. So, basically, I offer some services and these services do have some additional options (attributes). For example, service: Single ...
pro100bear's user avatar
1 vote
2 answers
4k views

Discount based on a field in product display node in Drupal Commerce?

I want to create a pricing rule based on discount entered in a field in the product display node? Is it possible? I have been trying to do it but i can't see the discount field in the dataselector. I ...
Azmat's user avatar
  • 11
1 vote
4 answers
2k views

How to enable/disable Billing Information in Commerce depending on the payment method

Till now, I have been using only PayPal checkout on my Commerce site, and I have configured the checkout flow so all of the customer's information is collected over on PayPal's site. However, I am ...
Patrick Kenny's user avatar

1
2 3 4 5 6