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
1
vote
1answer
633 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 ...
1
vote
1answer
493 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 ...
18
votes
5answers
8k 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 ...
19
votes
4answers
12k 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 ...
14
votes
3answers
16k 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) {...
3
votes
3answers
6k 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 ...
7
votes
6answers
11k 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 ...
15
votes
4answers
27k 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 ...
16
votes
7answers
12k views

theming checkout pages in Drupal commerce

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?
2
votes
2answers
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?
1
vote
2answers
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 ...
1
vote
1answer
950 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 ...
4
votes
4answers
4k 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 ...
1
vote
1answer
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-...
0
votes
5answers
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 ...
6
votes
6answers
8k 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 ...
2
votes
2answers
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--...
5
votes
2answers
5k 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 ...
7
votes
2answers
3k 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 ...
7
votes
6answers
14k views

How to install the commerceguys libraries for Drupal Commerce 2.x?

While installing Drupal Commerce 8.x-2.x-dev on Drupal 8.0.0-rc4, I'm greeted by the announcements: Commerce Price requires the commerceguys/intl library. Commerce Tax requires the commerceguys/tax ...
3
votes
2answers
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....
3
votes
1answer
4k 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 ...
3
votes
2answers
6k 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 ...
2
votes
1answer
5k 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 ...
2
votes
2answers
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 ...
1
vote
2answers
3k 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 ...
4
votes
2answers
470 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 {{ ...
4
votes
1answer
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 // ...
2
votes
4answers
1k views

Is Drupal Commerce ready for the real world?

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 ...
2
votes
1answer
133 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 ...
1
vote
4answers
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 ...
1
vote
1answer
636 views

How Can I change the machine name of product type

How can I change the machine name of product type (in drupal commerce ) after it created and has several content , as example I has tv porduct type I want to change it to LCDTV , How can I change it?
5
votes
1answer
3k 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 ...
4
votes
2answers
225 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,...
4
votes
2answers
3k 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 ...
3
votes
2answers
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 ...
2
votes
1answer
2k views

Drupal Commerce 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 ...
2
votes
3answers
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 ...
2
votes
1answer
744 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. ...
2
votes
1answer
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 ...
2
votes
2answers
719 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 ...
2
votes
2answers
680 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-...
2
votes
2answers
237 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). ...
2
votes
1answer
436 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 ...
1
vote
2answers
173 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 ...
1
vote
2answers
310 views

What is the proper way to drop database references for an uninstalled drupal module?

I've uninstalled the Commerce Coupon 7.x-2.0-beta3 through the admin ui and removed the corresponding folder from the sites/all/modules directory. Now when I install the previous version of Commerce ...
1
vote
4answers
970 views

Unable to add field on a view

I am copying this question from https://stackoverflow.com/questions/25900553/unable-to-add-field-on-drupal-7-view as I can't see a move option sorry. This has been driving me crazy, so let me explain ...
1
vote
1answer
147 views

How to mark product if it has already been purchased by current user?

I have Drupal Commerce shop, that sells products that by their nature are most of the time not useful to buy twice. Exceptions do exist. So what I want is to show a field or add a class on products ...
1
vote
4answers
3k views

Automatic product variations pricing

I have a site where a client wishes to sell products that have a lot of different variations (ie size, colour, length etc), but each of these will make a slight change to the price. I know about the ...
1
vote
5answers
2k views

Hide Title for Rendered Entity views

In display modes I set to hidden all Title fields, but Views still gives h2 title.