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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pcambra’s picture

Category: support » task

Nice 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 :)

pnigro’s picture

Thanks!

Instead of a new formatter, what if a check box is added on the formatter settings form to select between horizontal and vertical layout?

pcambra’s picture

That would be good too, but then you should make sure you set the formatter options correctly so they're displayed in views too.

rei’s picture

Hi, I would love this feature to choose the horizontal and vertical layout option.
any progression ?

mr.baileys’s picture

Patch 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:
price-table-in-views.png

New setting:
commerce-price-table-settings.png

mr.baileys’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Component: Miscellaneous » User interface
Assigned: Unassigned » mr.baileys
pcambra’s picture

Looks great! thanks as always mr.baileys :)

I'll test it soon!

pcambra’s picture

Status: Needs review » Fixed

And committed

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.