Active
Project:
Ubercart Userpoints
Version:
6.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Jun 2009 at 15:50 UTC
Updated:
23 Aug 2011 at 18:08 UTC
Jump to comment: Most recent
Comments
Comment #1
Anonymous (not verified) commentedeverything is possible :)
but not out of the box :(
what i would do to achieve this:
first you need to make sure you will not get mixed carts. if ppl put in allowed and not allowed products for your desired payment you will be in trouble at the check out. you can use hook_add_to_cart. check whats already in the cart and the disallow or allow putting the product into the cart.
now all you need to do is another hook when the payment options will be displayed. again, check whats in the cart and display only the payment option that you want. the hook you need is hook_form_alter.
you find details to the hooks at http://api.ubercart.org
Comment #2
Anonymous (not verified) commentedas i just did almost the same, here a little more help.
check if a product with a certain nodeID is already in the cart:
hook_add_to_cart:
in my cases there are two nodes in the shop that should not be in the cart at the same time. node 1 and 9. you can check for more options if you load the node object and check for anything in the node array.
Comment #3
abubin commentedI would like to request for this feature as well. A feature flag can be added into each product that says "allow to buy this item using userpoints". This way I could control which item can user userpoints and which cannot. Also, the above solution on checking to make sure no mixed of such products in the checkout cart.
Comment #4
celia_ccs commentedIf it would be possible to select the product types (content types) that could be bought using userpoints it would be awesome.
Comment #5
NathanM commentedWould also be interested in this.
Comment #6
jmonma commentedI'm implementing something similar right now.
You can achieve this by using the ubercart conidtional payment module (http://drupal.org/project/uc_conditional_payment) in conjunction with bara.munchies cart solution. The conditional payments module allows you to specify under what conditions to use userpoints vs other payment methods, so you can specify only certain product to use certain payment methods. Just make sure to implement something similar to bara.munchies solution to prevent the mixed cart issues he mentioned.