I noticed today that reverting a revision reverts the content of the product, but not it's upsell settings. Support for revisions would be nice.

I'm not sure what's needed, it might be as simple as using vid instead of nid in {uc_upsell_products}, and implementing hook_nodeapi('delete revision').

CommentFileSizeAuthor
#3 uc_upsell_681892.patch878 bytesgrendzy

Comments

torgospizza’s picture

Yep, that sounds about right - minor tweak to the SQL. If you have a patch I'd be glad to review it, otherwise I'll take a look at this asap. Thanks!

grendzy’s picture

Category: feature » bug

Hm, it seems this actually causes a bug. The query in upsell_products_admin() joins on the uc_product table, which will contain multiple rows per node when revisions are enabled. This makes the admin page at /admin/store/products/upsell have many duplicate rows. Note the join with {uc_products} is unnecessary.

grendzy’s picture

Status: Active » Needs work
StatusFileSize
new878 bytes

Here's a quick fix for the admin page. This doesn't enable reverting though.