Maybe I am totally missing something here.....

I have set a price per role for wholesaler. Item price for wholesaler role is $8, default is $10. The 'Price' on the product page shows up correctly in the listing:

List price: $11.00
Cost: $5.00
Price: $8.00
Weight: 10 lb
Dimensions: 2 in × 2 in × 4 in

However in the very top line it shows the default price next to SKU and both the cart and the checkout the price is still set at the default price. What am I doing wrong?

Let me know if I can provide anymore information.

Comments

ryndog’s picture

I should mention that I have tried viewing the catalog by using the 'Wholesale' view option as an admin, and also logging in a user account that is set to the role of Wholesale, therefore ruling out its a user permision issue.

Bandy’s picture

I have this problem with UC 7 RC 3 and 4 but with RC2 works fine.

yakbuttertea’s picture

Have the same problem. For me it worked good with the RC3 and Ubercart Price Per Role 7.x-1.x-dev (2010-Nov-12) version somehow not with the latest version. But now with RC4, no version is working correctly. With the patch on http://drupal.org/node/1366378 the price is showing correctly but when item added to cart, the wrong price is shown (default, not according to role).

Bandy’s picture

Info: Also the problem with Ubercart 3.0

ParisLiakos’s picture

Status: Active » Needs review
StatusFileSize
new538 bytes

Seems ubercart doesnt use sell_price when something is added to cart, but price..i wonder if it was always like that or this behavior just changed

ParisLiakos’s picture

Category: support » bug
Priority: Major » Critical
yakbuttertea’s picture

Tested and works like a charm thank you rootatwc.

UPDATE: if you use attributes it doesn't work.

Bandy’s picture

Thank you for the patch rootatwc.

ParisLiakos’s picture

Status: Needs review » Needs work

oh, i didnt have attributes when making the patch.if i find time i will try to check it as well
Putting it back to needs work according to #7

caw67’s picture

works!

jboeger’s picture

So what is the current status with this patch? It works unless you are using attributes?

Thanks in advance.

anthonyjhall’s picture

Does anyone have ideas on how to make this work with attributes?

theladebug’s picture

StatusFileSize
new1.33 KB

Hi -

This is because the most recent version of ubercart no longer supports hook_uc_cart_item.

I've written and attached a patch to solve this issue by using hook_uc_product_alter instead.

theladebug’s picture

StatusFileSize
new1.33 KB

or here it is with the proper naming convention

yakbuttertea’s picture

Tested and works great!
@theladebug: Thank you so much... Now we can have a more elegant site :)

rexgonzaga23’s picture

Thanks #14 the patch worked ...

websiteadminguy’s picture

Applied #14, still have same issue.
Role price shows in the "price" field, the display price is the default value. Value added to cart is the default.
Doesn't work on products with attributes or ones without.

Ubercart 3.1, Drupal 7.14

Any input would be appreciated, thanks!

yakbuttertea’s picture

I have UC 3.1, D7 and 7.x-1.x-dev (2011-Sep-06). I believe it is the latest version of UC price per role and followed #14 exactly and it works great. What version of UC price per role do you have?

websiteadminguy’s picture

7.x-1.x-dev 2011-Sep-07

jboeger’s picture

Same as #17 for me... applied patch but I still see the default pricing and default price is added to cart.

I need this to work pronto, bounty available!

DrupalDummie’s picture

Sorry if this is a dumb question but that's my style lol. How do you install this patch listed in #14 because I tried and failed due to a gross inability to do simple things.

DrupalDummie’s picture

StatusFileSize
new23.59 KB

This is the error message I get. What am I doing wrong?

g089h515r806’s picture

#5 patch works.

DrupalDummie’s picture

Thank You g089h515r806 that patch applied!
But I still have the same issue. But I found the patch that did fix my issue here... http://drupal.org/node/1366378#comment-6275576 in #3 comment

katlian’s picture

Thank you rootatwc and ladebug! I have been struggling with this all morning. Applied both patches (#5 and #14) and it works perfectly.

davident’s picture

Just patched #5 and #13 against 7.15 and Ubercart 3.1 on a site with many attributes and everything is working great

jpschroeder’s picture

For people still having trouble with this, we found an error that made the module not working when the nid and vid get offset:

<?php
      $node_array[$row->nid]->role_prices[$row->rid] = $row->price;
?>

This is on line 293 of the price per role module. You see it sets the node array by nid, but earlier it created that array using the vid. A quick change fixes it:

<?php
      $node_array[$node->vid]->role_prices[$row->rid] = $row->price;
?>

Hope that helps someone out there who is pulling their brains (as we did)

Dan Z’s picture

Status: Reviewed & tested by the community » Needs work

Yes, #27 is covered in #1366378: Per role prices wont show in node edit page. The patch there also makes sure that $node->vid is fetched.

Dan Z’s picture

Status: Needs work » Reviewed & tested by the community

Lots of people report that the patches work, and they work for me, too, so changing status.

DevJoshLopez’s picture

Status: Needs work » Reviewed & tested by the community

when will this be committed to the dev version?

DanZ’s picture

It's ready to be committed, but you have to get the maintainer's attention and time: http://drupal.org/user/246492. Good luck. He's very busy.

DanZ’s picture

Status: Reviewed & tested by the community » Fixed

Committed #5 and #14. I'll be co-maintaining 7.x-1.x.

Status: Fixed » Closed (fixed)

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