Closed (fixed)
Project:
Commerce Invoice
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Issue tags:
Reporter:
Created:
22 May 2012 at 06:36 UTC
Updated:
23 Nov 2012 at 10:14 UTC
Jump to comment: Most recent file
Comments
Comment #1
tomasbarej commentedHere's the patch.
Comment #2
tomasbarej commentedPrevious patch doesn't include new theme files so heres the fixed one.
Comment #3
c-logemannOh, that sounds very interesting. I will take a look at your patch as soon as I can.
Comment #4
c-logemann1. There are lot of these errors on field page (admin/commerce/config/invoice/fields) :
Notice: Undefined index: weight in _field_info_prepare_extra_fields() (line 429 of /var/www/commerce/web/modules/field/field.info.inc).
2. Where can an admin edit these fields? Even if you only think about field changes by code there should be a way to correct this.
Comment #5
tomasbarej commentedAttached patch fixed this. There was missing one 'weight' index in field definition.
Which fields you mean? The fields like Invoice ID and date of Creation are only on the Manage display tab where you can move it or hide it. Also all predefined and custom fields from Order entity is referenced in field display.
You mean that the Invoice ID and Creation fields should be also at Manage fields tab? I'm not sure if this is necessary if is not something that goes against Drupal entity logic. It's true that you can modify settings only of Invoice ID on the Invoice UI settings page (admin/commerce/config/invoice) so the Creation field is in some predefined format. We can decide where you should change the display of these two predefined fields.
Comment #6
marcoka commentedwhere exactly can fields be added? i searched for 10 minutes but can not find what exactly changed by this patch.
Comment #7
tomasbarej commentedWhen you properly clean caches after applying the patch you'll be able to set the fields on Invoice settings in Commerce store configuration (admin/commerce/config/invoice/fields).
The tabs Manage fields and Manage display should appear.
Comment #8
marcoka commentedok i got.
after this patch, checkout doesnt work anymore:edit: turns out i somehow shreddered my commerce :)
ps: is the patch against the dev?
Comment #9
tomasbarej commentedYes, it's against dev branch.
I need to properly test the newly added custom fields to the invoice entity. My private goal with these changes was to make the display of existing fields easier to alter with for example Display Suite module.
Comment #10
marcoka commentedanother problem that could be solved is the customization of the invoice, as a lot of people request that.
Comment #11
tomasbarej commentedIf you mean customization of how the invoice is displayed you can definitely can with these fieldable changes since you can use for example Display Suite and its custom layouts to changing invoice display.
Comment #12
c-logemannI didn't use commerce_invoice in this way but some people do and the feature is not problematic I think.
I checked the corrected patch and especially the theming is now working. So I committed it:
http://drupalcode.org/project/commerce_invoice.git/commit/a451bb8
@tomasbarej: But what about custom additional fields? Maybe if I add a textfield to the invoice entity (admin/commerce/config/invoice/fields).
Where can I modify the content of this field of a specified invoice? That was what I meant with my question 2 in comment #4.
Comment #13
c-logemann@tomasbarej: Why did you removed $return = date('Y') . '-' . date('m') . '-' . $id;.
I didn't recognized but now it's back with last commit:
http://drupalcode.org/project/commerce_invoice.git/commit/2497d0e
Comment #14
tomasbarej commented@C_Logemann: My first idea was to be able to manage the display of the entity using the Display Suite, that why I realize this fieldable patch. So I did not implement some form for that case when you want to edit some information in the invoice. Now, you're able to add additional information using rules or some custom code but there is no option to edit this information using Drupal backend.
@C_Logemann That was probably a mistake :)
Comment #15
c-logemannYes theming including ds is helpful. When I think about it would be best to only use rules for inserting maybe text in a custom textfield before the customer is notified about the generated invoice. In my opinion invoices in a lawful meaning should not be modified. So in my shop I define the PDF I am generating with views and the help of commerce invoice as the real invoice not the entity this module is saving in the database.
So who ever wants more field modification can reopen this or open a new issue as feature request.
Comment #16
lefeed commentedHi! Just a stupid question... I'm using the 7.x-1.x-dev and i'm trying(with no success!) to insert some text in a custom textfield using Rules. I mean:
1. I've added a "Company Name" textfield to the invoice from the Invoice UI
2. I've added a rule which reacts to the event "After saving a new commerce invoice"
3. When I choose "Add action" -> "Set a data value" my custom textfield "Company Name" doesn't show up in the Data selectors list.
What am I missing?