Allow Conditional Actions to display text in a cart pane

joachim - October 8, 2009 - 11:15
Project:UC Discount Framework
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

Here's a use case which at the moment I think I can only solve with code:
- store has a member discount
- 1) if the user is a member, the cart should say 'This subtotal includes your member discount'
- 2) if the user is not a member, the cart should say 'Become a member to get a discount on these products!'

Could this be done with CA?

I'm thinking if uc_cart provided a 'Display on the cart' action, then a discount applying predicate could supply the text?
I'm not sure I properly understand all the workings of the cart and CA, so I don't know if the flow of things would allow this -- eg, could it go in the same predicate or would an extra one be needed?

#1

rszrama - October 11, 2009 - 00:17
Status:active» won't fix

Conditional Actions is more of a decision engine than a tool used for displaying components on the cart page like this. I'd really just have to recommend either a couple of custom blocks w/ the block visibility adjusted based on user role or a simple cart pane in a custom module.

#2

joachim - October 11, 2009 - 10:34

Right.

But I don't think this use case is obscure or unusual. Customers like to see a confirmation that they are getting their discount.

And the block solution means replicating the condition elsewhere in code, which completely destroys the point of having CA -- because the store admin can't change the way the discount works, because the block code won't follow.

So if UC discount can't handle this case, that raises the question -- is the CA-based implementation of UC Discount sufficient?

#3

rszrama - October 11, 2009 - 19:33

I don't see any reason why UC Discount couldn't provide a cart pane that checked for discounts and notified the customer there... I guess I just don't see how this figures into a core solution. : ?

#4

joachim - October 11, 2009 - 21:36
Project:Ubercart» UC Discount Framework
Version:6.x-2.x-dev» 6.x-1.x-dev

I don't understand all the flows involved that well, and I figured that since UCD is largely a bunch of stuff on top of CA, it should happen in CA. Plus I wondered if there be any other cases where CA outputting to a cart pane would be useful.

But let's move it to UCD.

#5

joachim - October 11, 2009 - 21:36
Status:won't fix» active

Oops.

 
 

Drupal is a registered trademark of Dries Buytaert.