If anyone is interested, here is a patch to also include uc_price_per_role attributes when cloning a product node. (I'm not entirely sure this is the Right Place for this functionality, but it works)
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | uc_attribute_clone-revised.patch | 2.54 KB | garethsprice |
| uc_attribute_clone.patch | 1.37 KB | benjf |
Comments
Comment #1
garethsprice commentedHaving an issue where uc_price_per_role data is cloned (Even without this patch), but the "Default Sell Price" is set to $0.00 when cloning.
Is this because the price is fetched via the Ubercart API, which is returning the uc_price_per_role value?
Anyone else having issues cloning Ubercart products and retaining the Default Sell Price?
Comment #2
garethsprice commentedTracked this down to (I think) if the user who is doing the cloning is eligible for a discounted price, when it does the initial node_load to load the node which is being cloned, uc_price_per_role fires and adjusts the $node->sell_price value.
Attached is an inelegant workaround that, prior to saving, will pull the original sell_price value directly from the database using db_query and push it into the row for the cloned node.
Comment #3
avpadernoI am closing this issue, since it's for a Drupal version no longer supported.