1

I was wondering what is the best way to allow users to add coupons to CartThorb? Does CartThorb allow coupons to be added from templates, if not where should I start from to enable this functionality?

I realize the question is vague, so I don't expect concrete answers, anything to point me into the right direction will do.

Appreciate it.

3
  • How do you mean "add coupons"? Do you mean enter a coupon code for a discount? Or create new coupon codes which will offer discounts? Commented Jun 3, 2013 at 20:59
  • did it work for you, i am trying to add coupon to CartThorb and facing the similar issue for my site <a href="couponmonk.us">www.couponmonk.us</a>
    – user2450
    Commented Dec 4, 2013 at 20:11
  • Please post this as a comment on the original question, as it is not an answer to the question. Commented Dec 4, 2013 at 22:55

1 Answer 1

1

I'm actually working on a similar issue right now. We have a website where specific member groups have solspace user editable member templates but don't have control panel access. Attached to those profiles, are channel entries where they can display extra information about events in their area.

The first road I'm starting down is to make it so that the coupon is one of the fields in that entry, but not editable from the public side. When an entry is created, one of the fields will be the CartThrob "Coupon Code Field", so they could actually create their own codes using that custom field. But the actual settings field is not accessible, except to the staff that has control panel access. From there I will be modifying the coupon settings field to already have the default values in place upon entry creation, so staff can change the actual values if need be.

So this solution would apply to members that don't have control panel access, and can be done with solspace user or if it is desirable to have channel profiles automatically created then profile:edit (creates profile entries upon edit) or zoo visitor (creates profile entries automatically). I just don't know exactly how I would keep it all straight if two members create the same coupon code, maybe I'll make it so that a unique value needs to be pre-pended based on that unique member id or another value unique to that entry or member. Or tell them, "This is your code, period, full stop."

The second road will be to try a variation of this price field changer extension http://cartthrob.com/forums/viewthread/4547/#21625 (Also found in the SDK, but having an issue with that version on the most recent version of EE).

Essentially the channel would have a very basic coupon plugin type that would do nothing more than set the custom data that makes the price field changer set or unset the price based on the cart contents. This second way would make it so that coupon prices can be controlled from the actual product's channel entry, so it stays consistent. If it ends up that we really need to make it so that coupons stay in their own channel, then perhaps relationships or asigned author IDs will keep things organized... but now my head is starting to swell.

2
  • I should add that part of the conundrum with on our setup is just how much control should be given to this member group. Ultimately, they could create a coupon that makes every item in the store free and that is not desirable. But we do want coupons connected to specific members for commissions tracking etc. It's really the staff members that should have control of the pricing and settings, but we do want things to be done in an automated way with a default set of options already set upon entry creation.
    – oliverb
    Commented Jun 4, 2013 at 0:46
  • We were going to use zoo visitor, but not every member group should have a channel profile upon creation. Profile:edit could do it, as the template tags would provide the profile edit tags only for this member group. We're moving ahead with solspace user as the extra step to setup the initial profile channel entry can be done by staff instead. The coupon and the coupon type showing up in the orders channel fields is what is used for tracking the source of the purchase.
    – oliverb
    Commented Jun 4, 2013 at 0:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.