Drupal Commerce Issue Queue

Undefined index: product_display

Thu, 04/23/2015 - 06:00

After updating core to 7.36 now getting error:

Notice: Undefined index: product_display in commerce_product_reference_node_types() (line 1456 of /profiles/commerce_kickstart/modules/contrib/commerce/modules/product_reference/commerce_product_reference.module).

Cannot see the product content type.
Content still displays but cannot manage it.

Please help!

Categories: Issue Queues

Switch to using getBundle() to check wrapped entities' types

Mon, 04/20/2015 - 06:27

The code $line_item->type->value()

On line: 1434 and


On line: 1506

Should be replaced with $line_item->getBundle() and $line_item_wrapper->getBundle() repectively.

This causes me the following error and upon changing the lines above my code seems to work without issue. This is a common kind of error but I know it can be caused by all sorts of custom commerce modules/code but I've double checked my code and from what I kind find in the online documentation, I'm not doing too much wrong.

"EntityMetadataWrapperException: Unable to get the data property type as the parent data structure is not set. in EntityStructureWrapper->getPropertyValue() (line 438 of /var/www/vhosts/example.local/httpdocs/sites/all/modules/entity/includes/entity.wrapper.inc)."

In my code I'm wrapping my code in a check to make sure the line_item->type == "product" which seemed to work fine but I guess somewhere inside commerce it just doesn't agree with my method of checks. Note: I'm not sure why any of my line items would not return a type :/

Categories: Issue Queues

How to use order subtotal in rules after it is completed

Fri, 04/17/2015 - 19:06

I need to fire a rule when an order is first paid in full, that will update some referenced field values based on the order amount without taxes (i.e. subtotal), but I cannot find any value available other than the Order total (which includes the taxes).

Is this possible? Are the taxes paid for an order (or the order total components in general) stored somewhere that I can pick up with a Rule after the completed checkout?

Categories: Issue Queues

Changing different attributes does not keep the first selection

Fri, 04/17/2015 - 01:56

I'm having tree attributs, with behint 9 different produkct. On the add to cart form I can change the attributes per select box. I change for example the last attribute. Now, if i even change the first at Changing the attribute i changed befor does not hold the selection i made.

Is there an solution to hold all selection the user makes independently in which order it was done?

Categories: Issue Queues

Import currency based on default country

Thu, 04/16/2015 - 08:43

Now that https://www.drupal.org/node/2464771 is landed, we can create a default currency based on Drupal's default country in hook_install.

Categories: Issue Queues

Create a Shopping cart block

Thu, 04/16/2015 - 03:08

- Shopping Cart View
- Shopping Cart Block Plugin - embeds the Cart View(s), settings available.

Categories: Issue Queues

Revamp the Add Product admin form

Thu, 04/16/2015 - 00:24

Right now, the following things should happen:

  • Prices should only show enabled currencies for the selected store
  • A store should be selected by default, or change routing to remove that field, and have something like "admin/commerce/products/add/product/STORE_NAME"
Categories: Issue Queues

Create a default store in commerce_store_install()

Wed, 04/15/2015 - 21:50

By default, there use to a store by default, now that seems to not be the case?

Should there be a store by default?

Categories: Issue Queues

Fix tests so they actually work again with 8.x-2.x

Wed, 04/15/2015 - 20:36

As core moves rapidly, and there have been many changes with how testing works, we need to track how to fix this again, and adding tests to the new functionality.

Related PR's:

  1. Add inline_entity_form to travis - https://github.com/commerceguys/commerce/pull/175 [Pending]
  2. Depend on entity_reference, add commerce_store to tests - https://github.com/commerceguys/commerce/pull/176 [Pending]
  3. Rely on commerce_product for module test - https://github.com/commerceguys/commerce/pull/177 [Pending]
  4. Fix product tests as commerce store has now branched off - https://github.com/commerceguys/commerce/pull/178 [Pending]
  5. Fix commerce product third party settings + tests https://github.com/commerceguys/commerce/pull/179
Categories: Issue Queues

cart checkout does not redirect to checkout after "update cart" is used

Wed, 04/15/2015 - 02:44

I noticed playing with commerce that I'm not redirected to the checkout when using the checkout buttom. This happens if the "update cart" button is used before.

Any solution?

Categories: Issue Queues

Missing page title on product edit page when not administrator

Tue, 04/14/2015 - 14:20

I have user roles that can create and edit their own products (commerce product entities, not nodes with referenced products).

  • When I (administrator using admin theme) visit /admin/commerce/products/541/edit I see "Product: [sku]" as the page title
  • When they (not administrator using default theme) visit it the page title is "Home"

Is it because they don't have access to the parent menu item?
(Maybe related to this a core bug?? #1973262: User pages display incorrect title instead of "Menu link title" when link paths are added to a default menus)

Categories: Issue Queues

Profile can be already loaded in $items in commerce_customer_field_widget_form()

Tue, 04/14/2015 - 03:50

Threre is part of commerce_customer_field_widget_form():

function commerce_customer_field_widget_form(&$form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {
  // Define the complex customer profile reference field widget.
  if ($instance['widget']['type'] == 'commerce_customer_profile_manager') {
    $profile_type = commerce_customer_profile_type_load($field['settings']['profile_type']);

    // Do not attempt to render the widget for a non-existent profile type.
    if (empty($profile_type)) {
      drupal_set_message(t('Field %field_name attempted to use the non-existing customer profile type %type.', array('%field_name' => $field['field_name'], '%type' => $field['settings']['profile_type'])), 'error');
      return array();

    // Build an array of customer profile IDs from this field's values.
    $profile_ids = array();

    foreach ($items as $item) {
      $profile_ids[] = $item['profile_id'];

And in ajax callback $items can contain profile fields and profile object (and not a profile_id):

$items = array(
  'profile' => array(
    'profile_id' => 11,
  'field_first_name' => array(/*...*/),

($items is filling in commerce_order_order_form_validate() function)
So, if profile is already loaded, there will be notice at "$profile_ids[] = $item['profile_id'];" string:

Notice: Trying to get property of non-object in commerce_customer_field_widget_form

Categories: Issue Queues