Postponed
Project:
Commerce Price Table
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
10 Feb 2013 at 12:30 UTC
Updated:
9 Apr 2013 at 16:18 UTC
Jump to comment: Most recent file
Comments
Comment #1
Cybso commentedComment #2
Cybso commentedForgot to change status.
Comment #3
Cybso commentedThe previous file was diff'd against the patch from http://drupal.org/node/1897824 and failed to patch against current 7.x-1.x. Fixed (and fixed a comment).
Comment #4
Cybso commentedThird try :-/. Sorry. Is there a way to delete uploaded files?
Comment #5
pcambraRelated: #691932: Add hook_field_schema_alter()
Re: no, history stays there :)
Comment #6
Cybso commentedAdded commerce_price_table_field_presave() to the items_alter hook. As with field_validate(), this could also be done by implementing hook_field_attach_presave(). Annoyingly this hook only provides $entity_type and $entity as variables, so you would have to copy nearly the whole code of _field_invoke() (field.attach.inc) into your own code (round about 25 lines).
Comment #7
pcambrait feels like you're rewriting some core code here for schema and property alters which I'm not sure they belong to the module, I'd rather wait to include this in case someone else needs it, I'm guessing this is a very particular and specific use case.
Comment #8
giuvax commentedI need something like this because I want to show a custom box to display the price table offers. An overridden table or block: and I need some more tokens if I want to do this with Views.
Is this something I can use?
Comment #9
pcambra@giuvax I don't completely understand your use case, but I'd say that a new formatter would be enough for you, also you can generate extra tokens without storing them in db
Comment #10
giuvax commentedI have just one case in price table: 1 bottle of wine costs X, 6 bottles cost Y.
So I want to put a little box on each node as advertisement to customers, so they know that buying 6 of them they have a discount. I want flexibility to generate this box but I haven't complete tokens control to do it and I don't want to show the standard price table because I want to write some extra formatted text on it.
Comment #11
pcambraIf it's a content box per product, just add a field to it, this won't help.
Comment #11.0
pcambrasp