Drupal Commerce Issue Queue

Displaying single product attribute widget not working

Tue, 07/22/2014 - 11:01

I'm working with the latest Drupal and Commerce and I'm having an issue where the Add to cart form setting to "Show attribute widget for single product forms" is enabled, but not showing. I'm not sure how to go about troubleshooting/fixing this. The client insists this widget be shown, as the product variation titles contain information specific to the variations. I have attached screenshots of the cart form settings and the display page for reference.

If there's any information I can share to help identify and solve this, please let me know, and I will.

Categories: Issue Queues

Error and notices when trying to edit a product in overlay when the product is also in the users shopping cart

Tue, 07/22/2014 - 08:37

I have come across a very odd problem were a product becomes un-editable via the overlay module as it throws an error as well as two notices and does not display the edit form.

If you edit the product directly by open the page directly bypassing the overlay module their is no error.

This problem only seems to happen to products that are in the users shopping cart. Emptying the shopping cart seems to make the error go away.

Notice: Trying to get property of non-object in commerce_product_line_item_populate() (line 1354 of /usr/www/sites/all/modules/commerce/commerce/modules/product_reference/commerce_product_reference.module).
Notice: Trying to get property of non-object in commerce_product_line_item_populate() (line 1361 of /usr/www/sites/all/modules/commerce/commerce/modules/product_reference/commerce_product_reference.module).
EntityMetadataWrapperException: Invalid data value given. Be sure it matches the required data type and format. in EntityDrupalWrapper->set() (line 736 of /usr/www/sites/all/modules/common/entity/includes/entity.wrapper.inc).
Categories: Issue Queues

Custom Database Table for external applications

Mon, 07/21/2014 - 12:17

1. first of all, I need to create the following custom tables using data from commerce and drupal. How do i achieve this.

id--------------(from commerce)
name--------------(from commerce)
contact name--------------(from commerce)
billing address--------------(from commerce)
phone--------------(from commerce)
email--------------(from commerce)
customer id in visual, if specified------------------(Custom field)
imported into erp ------------------(Custom field)

order id--------------(from commerce)
customer id (links to customer.id)--------------(from commerce)
shipping address (if different from billing address)--------------(from commerce)
contact name/phone/email (if different from customer)--------------(from commerce)
whether credit card was successfully charged, and amount--------------(from commerce)
imported into erp (true/false field that I suggested)------------------(Custom field)

order line
order id (links to order id in table "order")--------------(from commerce)
line number--------------(from commerce)
part id--------------(from commerce)
qty--------------(from commerce)
price (order-specific, may be different from the regular price, such as when discount coupon was used)--------------(from commerce)

Please tell, which columns of which tables have this information.
2. Secondly i need a script that will update this table anytime an order is placed.

Any idea?

Categories: Issue Queues

Notification if product variant has changed

Mon, 07/21/2014 - 01:36


I'm wondering, how to give the client, that purchased a product, the ability to register to his product, to recieve an email if the product has changed?
With a rule !? , but particularly how to embed a checkbox for register to this service? Could I use a given module for that?

Cheers Kai

Categories: Issue Queues

Add a quick buy button

Sun, 07/20/2014 - 22:55

Add an option for 'quick buy button' to allow user in one click:

  • add a product to shopping cart;
  • redirects user to /checkout page.

A client of mine required this feature and I created a simple sandbox project (https://www.drupal.org/node/2012412). But it's too simple and maybe it's not a good idea to have it as a single module. Maybe it's better to include it as a feature to Commerce?

I can create a patch with this feature included.

Categories: Issue Queues

View is empty with entity reference to unpublished node

Sat, 07/19/2014 - 22:27


I have a product that points to an entity type via entity reference. I have a view that shows all the products that reference an entity. When the entity is published the products are shown. If the entity is not published the view results in no products only when the user is not the admin user (uid 1).

This was working for a long time however, an update somewhere seems to have change the behavior. I'm fairly certain that it's not entity reference module because non-product entities don't have this issue.

Can anyone else confirm this behavior? Can anyone think of a work around or way to troubleshoot this deeper?

Categories: Issue Queues

Can't translate checkout completion message: source & translation are both shown as English

Wed, 07/16/2014 - 15:14

I'm trying to translate the checkout completion message from English to French on a website where Drupal was installed in French. From the very beginning, French has been the default language.

The default checkout completion message is accessible at admin/config/regional/translate/translate and also via the l10n_client (see captures). The Original text reads as follows.

Your order number is [commerce-order:order-number]. You can view your order on your account page when logged in. Return to the front page.

The problem is that the translation field has an English label. By this, the i18n UI is suggesting that the original text in French (when it isn't) and that I should be translated to English. Using the l10n_client, the default English string is only available for translation in the English UI (normally, it should only be available in the French Ui so that it can be translated to English). Makes sens, right?

Ignoring the English label (plain weird) and inserting and saving a French translation reverses the language of each string: the default English checkout completion message (which is defined in commerce_checkout.module) appears in the French UI and the newly added French translation appears in the English UI.

I've read through the issue Allow checkout completion message to be translated and can see that my version of Commerce includes the code of that issue's patch.

Anyone have any medicine or pills for this?!

Categories: Issue Queues

Warning on AJAX: htmlspecialchars() expects parameter 1 to be string in bootstrap.inc on line 1567

Wed, 07/16/2014 - 09:38

The following error happens:

Warning:  htmlspecialchars() expects parameter 1 to be string, array given in includes/bootstrap.inc on line 1567
on AJAX when clicking wheel settings icon on Manage Display (on Product display and 'Product Type'/Add to Cart Form).

Affected code in commerce_cart.module:

      $summary[] = t('Add to Cart line item type: @type', array('@type' => commerce_line_item_type_get_name($settings['line_item_type'])));
It seems that the commerce_line_item_type_get_name() is returning array instead of the string causing issues in check_plain().


  array(4) {
    string(113) "modules/cart/commerce_cart.module"
    string(1) "t"
    array(2) {
      &string(33) "Add to Cart line item type: @type"
      &array(1) {
        array(5) {
          string(6) "Coupon"
          string(15) "Training bundle"
          string(11) "Bundle Item"
          string(7) "Product"
          string(16) "Commerce webform"

It seems 0 value is passed into commerce_line_item_type_get_name() causing to return array instead of string.

$settings = array(5) {
Categories: Issue Queues

Move Line Item to other order?

Wed, 07/16/2014 - 05:16

I'm using Commerce as my own billing system.
I use it for 100% as admin in backend mode, so no frontend features of Commerce are used in my use case.

=> Now what would be a nice feature for me is the possibility to move an existing Line Item from one order to another order.

This is why:
For my recurring products, I use the Recurring framework and it works fine.
The recurring framework creates a single order for every recurring entity that is over its Due Date.
Because I don't want so much different separate orders, I would like to combine the different auto created Line Items from the different orders to one single order.

I have looked at the Order fields and "commerce_line_items" is the reference field that links one order to all its Line Items.
Then I created a view hoping that I could set this field to Editable (with Editable fields) and that is possible but I get so see my line items inside every order and I can edit them separately but I cannot assign them to another order.

Another possible solution would be to be able to modify the order admin screen and instead of only adding NEW line items, make it also possible to add Existing line items.
Of course there is some kind of danger that one single line items is referenced by different orders, but that could be solved in another way maybe...

Anyone a suggestion for this?


Categories: Issue Queues

Devel integration is not optional

Tue, 07/15/2014 - 10:58

If devel is not installed, any local task shared with the devel one will crash (for example, editing a store or an order).
The error is:

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "commerce.store_type_devel" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 150 of core/lib/Drupal/Core/Routing/RouteProvider.php).
This is especially painful today when devel doesn't run on latest core without patches.

This smells like a core bug, but tracking it here until I can find the cause.

Categories: Issue Queues

Same price for multiple attribute product

Tue, 07/15/2014 - 05:52

I'm building a drupal commerce. I have different products with different "attributes", for example a t-shirt which has different sizes. So I have a product type "t-shirt" which is referenced to a product display. Through inline entity form I can add different t-shirt sizes, which are tecnically different products. I need also the ability to give each size its own stock quantity.

But the price doesn't change. I have also a "surfboard" product which for example has 10 different sizes: the problem is I have to insert the price 10 times for every size of the surfboard, even if the price is always the same

Maybe I could have done this with https://www.drupal.org/project/commerce_option which works well, but I also need https://www.drupal.org/project/commerce_options_stock which doesn't seem to work properly. So I have to use a different products for every attribute set.

Just to be clear, the only different thing that different products referenced to the same product display should have is the stock quantity.

The question is: is there a way to insert the price once?

Categories: Issue Queues

Allow the owner of a Product to be updated

Sun, 07/13/2014 - 14:43


Can someone please advise how I can update the author for a product entity after it has been created? I don't see an option to do that.

Does it need to be done directly in the DB?

Please advise.


Categories: Issue Queues

Limit to referenced products?

Thu, 07/10/2014 - 08:57


I'm currently building a web shop with Commerce that will sell contact lenses. As it stands now, I'm using the Product Bundle module to add two separate products (contact lenses for right and left eye) of product type A to another product type B. Product type B will then be linked to a product display.

Product type B contains two product reference fields (one for the left eye and one for the right) that refer to products of type A. The thing is, apparently certain type of contact lenses can have 6 different attributes with different combinations. So each product reference field can contain more than a 1000 variations.

I have currently encountered a problem where I can only select about 992 (if I counted correctly) products per product of type B, total. So if I select 992 products in the product reference field for the left eye, any other product I select in the product reference field for the right eye is not being saved. This happens as follows:

  • I add a new product of type B
  • I fill in all the required fields and create a new display node in the same form
  • I then select all the variations I want to add for both the right eye as the left eye (2500 entities each)
  • I now click on the button to save my newly created product (of type B)
  • I return to the edit form and only the first 992 variations of my selection in the first product reference field are selected. Any other variation is deselected. Also, the display node I wanted to create was never created.
  • I receive no error message whatsoever

I thought that it might be a memory issue so I moved everything to a VPS where memory should not be an issue. But the problem persists.

Does anyone here know what the problem might be?

Categories: Issue Queues

Typos in Customer profile functions&#039; comments

Tue, 07/08/2014 - 09:58

I've noticed a few typos in the function comments for commerce_customer_profile_delete() and commerce_customer_profile_delete_multiple(). A patch is on it's way.

Categories: Issue Queues

Commerce Line Item: Delete button (remove) does nothing

Mon, 07/07/2014 - 05:10


I added Commerce Line Item: Delete button (Remove) to Shopping cart summary (Commerce Order) view. I wanted to add a simple remove button, but when I click it just goes to the second checkout step. If I click it there again it just refreshes the page, not doing anything.

What could be the problem?

Thank you!

Categories: Issue Queues

Display for Product Variation (Formatted with Components) uses unselectable &quot;Formatted Amount&quot; setting

Mon, 07/07/2014 - 04:57

Problem description:
In a shop I noticed unexpected difference in pricing display of different product-variation-types, while the admin interface showed exactly the same settings for all my variations.
After some trial and error in the settings, I found that reverting the format of "Price" to "Formatted Amount" (instead of the default "Formatted Amount with Components") showed me the Format was different (one product-variation had "Display the original price as loaded" selected, the other product variation had "Display the calculated sell price for the current user" selected).
Changing the Format Settings, saving, and then setting the format back to "Formatted Amount with Components" and saving again fixed the display.

So, it appears that the format you've chosen, still defines how the "Formatted Amount with Components" displays in the frontend, even though it's not configurable in the backend.

Possible resolution: adding the "Gear" icon (settings) to allow changing the Format Settings for the "Formatted Amount with Components" Format, would probably fix the problem.

Categories: Issue Queues