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)

Comments

garethsprice’s picture

Having 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?

garethsprice’s picture

Issue tags: +Ubercart, +clone, +uc_price_per_role, +node_clone, +uc_attribute_clone, +sell_price
StatusFileSize
new2.54 KB

Tracked 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.

avpaderno’s picture

Issue summary: View changes
Status: Active » Closed (outdated)
Issue tags: -Ubercart, -clone, -uc_price_per_role, -node_clone, -uc_attribute_clone, -sell_price

I am closing this issue, since it's for a Drupal version no longer supported.