Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
I would like to inverse the layout of the price chart formatter so that the table looks like the following:
Quantity | Price |
1-5 | $5 |
6-10 | $4 |
Is this something that can be themed or does it require another formatter? Any assistance would be much appreciated.
Thanks
Paul
Comment | File | Size | Author |
---|---|---|---|
#5 | 1339712-commerce_price_table-vertical-orientation.patch | 2.93 KB | mr.baileys |
#5 | price-table-in-views.png | 6.06 KB | mr.baileys |
#5 | commerce-price-table-settings.png | 17.67 KB | mr.baileys |
Comments
Comment #1
pcambraNice request!
Yeah, we could totally provide two field formatters for the price table, one horizontal (current one) and other vertical (your suggestion), it would just be a new formatter in the module with a different theme table approach.
It'd be great if you could provide a patch for this :)
Comment #2
pnigro CreditAttribution: pnigro commentedThanks!
Instead of a new formatter, what if a check box is added on the formatter settings form to select between horizontal and vertical layout?
Comment #3
pcambraThat would be good too, but then you should make sure you set the formatter options correctly so they're displayed in views too.
Comment #4
rei CreditAttribution: rei commentedHi, I would love this feature to choose the horizontal and vertical layout option.
any progression ?
Comment #5
mr.baileysPatch attached that adds an option to the display formatter allowing users to choose between horizontal (default) and vertical orientation.
Partial screenshot of the price table in a view:
New setting:
Comment #6
mr.baileysComment #7
pcambraLooks great! thanks as always mr.baileys :)
I'll test it soon!
Comment #8
pcambraAnd committed
Thanks!