Drupal Commerce Issue Queue
Custom Field without Drupal handling
A little background: we play tug of war with the number of fields (fields not instances) ever growing on our site and the performance of having those fields specifically in the checkout process for a commerce order. I was curious if defining these field within the specific .tpl file would 1) Alievate this problem with drupal and the fields vs performance tradeoff, and more importantly 2) Not break the drupal commerce order.
Such a field would be added to the order array as $order->my_field. I guess I am asking how commerce order would react and if the data would still be saved properly, such that the field does not possess its own tables and is almost invisible to the overarching drupal.
Checkout.js disables continue conflicts with autocomplete
Hello there,
I'm running in a very strange 'bug' with the javascript in commerce checkout which disables the button to avoid it's clicked twice.
It seems this javascript also reacts on pressed 'enters'.
This conflicts with an autocomplete in the checkout-pane's. When you use an autocomplete (to be precise, for an entity reference) and you type some first letters, the autocomplete shows some options. If you choose an option with key arrows and press enter on the selected option. The commerce checkout javascript is also called, which disables the option to goto to the next step.
Selecting the autocomplete option by mouse, doesn't trigger the javascript (which is offcourse good). Using an enter in a textfield, also doesn't seem to trigger the javascript.
I have absolutely no knowloedge of javascript, but seems an extra check to see, if the pressed key comes from the submit button may be the solution.
Hopefully my issue is clear.
Create Order Button Remove Duplicates
At the top of the view for admin/commerce/orders we have a button to create an order in the admin backend as opposed to through the checkout process. Where is this button generated? My issue is when using the order types module in conjunction, each order type gets its own create X button at the top which can pose a problem. I would like to override this to limit the buttons to a particular set or possibly change the button to a select list.
My hunch is that this is drupal core generated, but where do I find / hook to override it and restore the clean nature of commerce order?
Different SKU for same book title, renting it & tracking the availability.
Hello,
I don't know this is the right place to ask it. I have to build a inventry for a library system. Where I will have different copies of same title, so I want to keep unique identifier for each copy and keep that as SKU for the item. I will have some other atributes too.
My all book will be listed even if no item of a title is in inventory, user can add it in his/her wishlist(my account) section. But when he try requesting the bundle( 2 items one time), only available title will be shown to him from the wish list.
At admin side I want the request to be listed and for each title available SKUs in select list. I will select one SKU & close the request & it will make that SKU unavailable from the inventry to be requested next time till I update this to be available.
Any body can suggest me anything regarding this...like how it can be done with drupal commerce? Whether it can be done or not by available modules? If I get to code...how much things I am already having in this contributed module for this kind of system..
I am newbie to Drupal commerce so I am not able to figure it out..
Thanks
Calling entity_view on a product causes permissions errors if no "View Product" permissions
I am writing a module called Commerce Product Add-on that puts products as add-ons on the Add to Cart forms of other products. It works for the most part.
Part of what it does is add another view mode for product entities. This view mode is used for this context.
We call this to add the displayed product to the form.
entity_view('commerce_product', array($product_add_on->product_id => $product_add_on),'commerce_pado');
However, for people without the View Product permissions, like anonymous users it throws an error.
Notice: Undefined index: path in template_preprocess_entity() (line 1020 of /Users/mattrobison/Documents/Projects/memberdrop/sites/all/modules/entity/entity.module).Notice: Undefined index: path in template_preprocess_entity() (line 1028 of /Users/mattrobison/Documents/Projects/memberdrop/sites/all/modules/entity/entity.module).
Now, this might be related to the entity api module. Not sure exactly.
But is there a way to bypass the access permission for just this view mode? Because the error goes away when I set the permission I. I'd rather not make that a requirement. Just asking for insight.
Thanks!
limit of visible product references after upgrade from Drupal core from 7.19 to 7.2
•I am setting up a site using Drupal Commerce with three different product groups defined by both product and content type
•Each type has 80 individual products
•A portion of these products are variable – meaning that I am consolidating them by allowing multiple values in the product reference
•When I was in Drupal core version 7.19 I was able to see all 80 product references to select from when creating display nodes
•Now that I am in Drupal core version 7.2 the list of available product references cuts off after 50 items
•So for example if I delete product #1 then product #51 becomes visible – and it doesn’t seem to matter how many different product and related content types exist
•However if I create the products via a feed they still create just fine with all the relevant information
•I can see a work-around by fiddling with the sequence of the products listed in my .csv so that the “individual” products come after the 50 item cut off, but it seems less than perfect
This appears to be related to the file at: commerce/modules/product_reference/product_reference.module
at this line:
function commerce_product_reference_options_list($field, $instance = NULL) {
changing the line to this:
foreach (commerce_product_match_products($field, $instance) as $product_id => $data) {
addresses the problem on my local server, however does not work when attempted on a development site on a shared server
Quick reference default - reference product display from commerce product type gone
I have just upgraded to commerce 7.15 and Drupal 7.20 and have noticed the following issue when trying to set the default product display type to my commerce product - the quick reference default collapsible block is no longer present (see screenshots before and after) - /admin/commerce/products/types/product.
I have an old version of the site running on 7.15 and commerce 7.x-1.3 which does have the functionality present (not sure at which point I lost it).
I have approx 16 product content types - a simple original one with standard fields that is for products that do not have attributes so therefore 1 to 1 relationship commerce product to product display, all the other templates are for various attribute driven products that have different fields e.g. colour, length, grade, height etc etc. This has all been working well and I have been using commerce feeds + tamper to import approx 10,000 products of various types.
Today I went to create a new product manually and noticed that when choosing the standard product display from content > add content > product display (also using inline entity form 7.x-1.1) when I go to create the commerce product from within the inline entity form it is not showing me the standard commerce product type but one of my custom commerce products with additional fields instead. As the quick reference default option has disappeared I cannot check and rest the relationship between my product display and my commerce product.
I am using an omega responsive sub theme and also have a multisite attached which uses its own database but shares the same codebase.
Also using many contrib modules but very little template customisation. My modules are mostly up-to-date with only a few out of date. Unfortunately I cant display a link as its on our dev box and firewalled. Included contribs (not extensive):
- inline entiy form
- commerce UPS
- commerce extras
- postal code filter
- sagepay direct
- commerce Checkout Progress
- Commerce Extra Price Formatters
- Commerce fancy attributes
- Commerce Search API
- Commerce Wishlist
- Physical Product
- Product Attributes
- Database search
- Search facets
- Search views
I have to say I'm majorly impressed with where commerce is right now and the number of contrib modules now available...
Due to go live in 3 days so any help appreciated!
EDIT:
I have tried commerce repair...
function buildContent in commerce_product.controller.inc should be removed
This function attached labels in #markup which makes it hard to alter these fields in a natural way, and it makes it really hard to figure out where the label is set and how to alter it. This way of attaching labels to fields is unnecessarily convoluted and complicated.
Payment instructions translation
Hi i'm using this module for a multilingual project.
I found that the message inside "Payment instructions" is untranslatable.
Any ideas to translate it?
Thank you
Add uid property to line items
Currently line items have no property 'uid' which is ok as you can get it by joining the commerce_order table. However, if you just want to know how many a customer already bought of a specific product / list all purchased products of a customer this is a unnecessary join and decreases performance. And you can't use EntityFieldQuery for that purpose.
In my use case I need to check if a customer violates product purchase limits after he clicks "checkout" on the cart review page. If I need to join the commerce_order table for each checkout I'm afraid of performance impact after a year or two when the order table grew quite large (hopefully).
Or is my fear arbitrary?
Adding the uid to line items would add redundancy which should however not be bad as orders never change their 'owner'. I like the concept of avoiding redundancy, too. But sometimes it makes sense for performance reasons.
How to add a status more information- with link to a product?
Hi, right now I have the status: active and disable. When the status of a product is disable the "add to cart" button is disabled and a text not available is showing.
I would very much like to add a 3d status: information. With the possibility to add a link to the "add to cart" button to an information page.
Something like It is not in stock now, but if you email us we can have it for you in a week or so...
Is this possible please?
Adding a new status between active and disable with the possibility to add a link to the button to a webpage? Is there a module for this, or a lookalike may be?
Thanks a lot in advance for considering this!
Greetings, Martijn
Checkout rule is working only on localhost
I'm trying to grant a user a premium role after completing the payment process but the rules are executed only from localhost. On the Server, no rules are triggered.
Anyone have a solution ?
{ "rules_prestataire_gold_rule" : {"LABEL" : "Prestataire gold rule",
"PLUGIN" : "reaction rule",
"REQUIRES" : [ "rules", "commerce_payment", "commerce_checkout" ],
"ON" : [ "commerce_payment_order_paid_in_full", "commerce_checkout_complete" ],
"IF" : [
{ "user_has_role" : {
"account" : [ "site:current-user" ],
"roles" : { "value" : { "4" : "4" } }
}
}
],
"DO" : [
{ "user_add_role" : {
"account" : [ "site:current-user" ],
"roles" : { "value" : { "7" : "7" } }
}
},
{ "user_remove_role" : {
"account" : [ "site:current-user" ],
"roles" : { "value" : { "4" : "4" } }
}
}
]
}
}
Views cache breaks cart buttons
We have a considerably performance-savvy view that we want cached, but it just won't work.
Stops working when cache is enabled.
To reproduce:
- Create a node display type 'foo'
- Create a view page on path '/mypath' consisting of node displays of type 'foo'
- Enable views caching 5min/5min
- Reload views page twice
- Add to cart
Is it by design that the cart buttons now stops working?
Ive looked around for views issues as well which could result in this, but alas, without result.
Views 3.5 & Ds 1.5
Any clues?
Thanks!
Just Migrated from Ubercart and cannot make add to cart buttons
Hi, I just migrated a whole site with about 45000 products over from Ubercart into a fresh installation of commerce (didnt know if it would work with kickstart), I'm getting the hang of commerce, but no matter what I do I cant make add to cart buttons for products (I also dont know how stock is handled in commerce yet so I think those numbers weren't brought over, although the field in the sql table to see if items can be viewed and purchased or whatever area all set to 1). I looked at the guide on the commerce homepage and set up the 'product' field on the content types: Product and Product Display according to the guide and for the teaser/default display modes. i.e. I set the product field to required and checked 'render field from referenced products...' (The other fields are not be identical with each other, but I assumed this didnt matter) I made the basic catalog by following the guide and it doesnt have add to cart buttons (everything else works) I also tried to make a add to cart button in a custom view I made using the 'Field:Product' selection (I don't have the option of Commerce Product: Add to Cart form, I actually dont have any commerce fields selectable from views)
If someone could help me I would be EXTREMELY appreciative
P.S. If I can install kickstart and I would fix this problem I would be open to doing that, but I'm new to commerce so I just dont know.
Provide event "Before deleting a commerce order"
Currently the only event that reacts on order deletion is "After deleting a commerce order.".
However, if you need to do some tasks depending on the orders line items properties you can't do this because at this time the line items are already deleted. The $order object passed to the event lists the line items ids but you can't load the line items anymore.
So there there needs to be a hook/event that fires before they get deleted.
In the meantime - is there a workaround?
Any performance comparison between Commerce running on PostgreSQL and MySQL?
I used Drupal with PostgreSQL some times and my impressions were that it runs faster, but have problems with many contrib modules, because of the lack of testing, as the majority of Drupal projects use MySQL. With a recent project, with some thousands of orders, some screens get a little slow and this question came in my mind: Drupal Commerce would have a better performance running on PostgreSQL?
I'm thinking of doing some benchmarks, but maybe someone else made something like this before and could share a little tips on the topic.
Combine does not work with different line-item types and custom comparison properties
If you add some comparison_properties via hook_commerce_cart_product_comparison_properties_alter() which are available on one line item type but not on another you will get an "Undefined property"-error from the commerce_cart_product_add() function.
There should be either checked whether a property exists or not before accessing it. Or you pass not only current $comparison_properties but also the line-item type to the hook.
I prefer the second solution as it would give devs the possibility to declare different comparison properties for different line-item types.
Revisit the product query limit introduced in Commerce 7.15
I installed the latest Commerce 7.15 on my EveryLabels.com.au website. All good except that when I went to create new products on the 'Add Content' form, it only showed up a limited number of products - about 50 - and so I could not make up any new products in that category.
For now the solution to my problem has been to go back to Commerce 7.14 and all works again. But I'd like to upgrade to 7.15. Does anyone know if there is a setting to change that will make the products reappear?
Add products to multiple categories using checkboxes
Is it possible to assign products to multiple categories like Prestashop or other cart applications? I tried it with "check boxes/radio buttons" selections, but it shows only radio buttons.
Will Drupal Commerce be ported to Drupal 8?
Here at the company, we are using Drupal Commerce heavily and we are really focused on help improving it, but as one of our greatest focus is webapps development, we are keen to start using Drupal 8, because of the great improvements for the developer experience. This raised me the doubt: will Commerce Guys want to upgrade Commerce to Drupal 8? As a company, naturally your focus wouldn't always be to use the latest version.
D6 + D7 sites were, at some level, easy to maintain in parallel, but i think that D7 and D8 will be so different, that could be difficult for the team to keep a high level switching from one to another on different projects.
Seeing http://www.drupalcommerce.org/roadmap, we can see that you have this in mind, but Open Atrium also did a roadmap saying that would be ported to D7 some years ago, but we know that migrate a distro isn't an easy task.
Is D8 still on your radar?