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?

Comments

rszrama’s picture

Status: Active » Closed (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.

joachim’s picture

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?

rszrama’s picture

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. : ?

joachim’s picture

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.

joachim’s picture

Status: Closed (won't fix) » Active

Oops.