Or is there a way to do this already?

Comments

arski’s picture

Project: Ubercart Product Checkout Panes » Ubercart Webform Checkout Pane
Version: 7.x-1.x-dev » 7.x-3.x-dev
Category: feature » support
Status: Active » Closed (works as designed)

First of all, this module has nothing to do with webform panes. And second of all, if you check the readme for the UC Webform Pane module (which I assume you are referring to), then there is an explanation on how to do that, plus a sample template file.

sijuwi’s picture

Yes I see and have used the template, however I cannot selectively use webform panes per product. I realise I must have posted on the wrong issues

arski’s picture

Yes, for that you need the uc_product_pane module indeed (you didn't mention this requirement earlier). And if you want to have fields in the invoice shown that only belong to a webform that was shown for the product, you'll need to look into the code of either module and fetch the panes/data programmatically.

sijuwi’s picture

I thought I was posting in uc_product_pane issue. Just wanted to confuse everyone and myself :-).

I realise the only way to do this, as mentioned in another issue (http://drupal.org/node/1536366), is to not output if empty. Perhaps this could be part of the output template here?

arski’s picture

Title: Need webform data on invoice templates » Show only enabled panes on order view/edit/invoice screens
Project: Ubercart Webform Checkout Pane » Ubercart Product Checkout Panes
Version: 7.x-3.x-dev » 6.x-1.x-dev
Status: Closed (works as designed) » Postponed

hehe, you did, but you didn't mention different product-based data on templates in the original post, that's why I moved it to the webform checkout pane module.

I realize that figuring out which panes were displayed for the user when the product was ordered is not easy.. especially there is no "history" of displayed panes, meaning that if for an order placed 1 year ago, panes A, B, and C were displayed, and today the user would see panes A, D, X on checkout, there is no way of telling this from the order object.. If you want this -> submit a request to Ubercart, this module won't be able to fix that.

But even if you're happy to show pane data in an invoice based on the current pane configuration, you would need to recode the uc_product_panes_checkout_pane_alter function to figure out which panes you need.

To be honest, this _should_ be a feature of Ubercart: a hook that checks which panes should be displayed in order view/invoice based on what panes would be displayed if this was actually checkout. I added a feature request to Ubercart #1536366: Unused webform panes - fields showing in order view - we'll see what they do of that. Basically this is pretty much a core requirement that this module could _alter_ later - it would be silly if this module actually introduced that. But we'll see.

arski’s picture

Category: support » feature
Status: Postponed » Active

As the people at Ubercart mentioned, you can already configure which panes show up on the order screens. I suppose at the moment uc_pp only implements a hook to alter checkout panes - there is definitely space for adding a configuration setting that also does the same to order panes. Will take a look.

arski’s picture

Status: Active » Closed (won't fix)

I kind of thought for a few minutes what I could do here, but I don't really see a reasonable scenario that would require any additional improvements. The panes that are empty will already disappear on order screen, so basically.. not much point in doing anything here.

If anyone can explain a scenario that is currently not possible and that might benefit from adjusting order panes by product, please let me know and I'll take another look.