"pre-checkout" page for adding promos, gift certs

carvertechcarvertech Member
in Help edited September 2013
Our client wants to run custom promos and gift certificates. I know FC doesn't support certificates, so our thinking is we'll run our own cert database, that the user can apply to their order using an intermediate "pre-checkout" page, which would then click through to the FC checkout page once all the necessary price/qty modifications had been made in the cart. Does this sound reasonable? I don't like the extra step, but I can't think of a better way.

Assuming this works, we'll want the pre-checkout page to say something like "please review your order" then list the current cart contents. I assume there is a way to retrieve the cart contents and format the results into a custom page. Can you please confirm?

What would be the best way of deducting the gift cert amount from the order? Does DC accept product line items with negative values?

Sorry if this is redundant - I've seen gift cert posts in the past, but nothing definitive.

Thank you
Comments
  • fc_adamfc_adam FoxyCart Team
    @carvertech,

    So there are a few ways you can tackle this. People have built out their own gift certificate style integrations in the past - and unfortunately there isn't a way to get them perfect, but you can get them close.

    So first things first, the intermediate page is possible to do by using and expanding on the concept of the SSO set up. Essentially you'd use the SSO as a way to capture customers as they go to checkout and then redirect them to your intermediate page. Do your thing there, and then forward them on with the required SSO attributes so they make it to the checkout correctly. On your intermediate page you can load in the current cart by using the fc_json cart object like you would on any other page of your website.

    So that is one way to do it. The other is to install an SSL certificate on your website to allow secure communication between the cart/checkout and your site. Then, you can add in a custom field to the cart or checkout as a way to enter gift certificates. The field would query the endpoint on your server to check the certificate code to see if it's valid and has a positive balance.

    So that covers how to allow for checking the balance - but what about applying it. That's where it gets tricky.

    Currently we don't allow for negative priced products, so the only way you'd be able to apply the discount would be to use a coupon. This is where it gets tricky - as the preciseness of the coupons depends on how many coupons you want to add to your store. Some people have set it up that they have coupons that increment in $5 or $10 amounts, and then round the gift certificates to those amounts as people use them. It's not perfect, but it is pretty close. You would then apply the coupon to the checkout that applies to the amount left on the gift certificate.
  • Oof! That's not what I was hoping to hear.
    We have quite a few clients on FC and right now 3 of them are asking for this. I don't relish the idea of having to move everyone to a different platform, but looks like I might not have a choice.
    Do you have an api for adding coupons "on the fly?"
  • fc_adamfc_adam FoxyCart Team
    @carvertech,

    Our current API doesn't allow for this, but we're finalising our new API which does allow for creating coupons, along with basically everything else you can do inside the admin.

    Sorry we don't have a better answer for you right now.

    Actually - one other approach, but probably a little more work - is after you work out the remaining balance on the gift certificate is to loop through the products and effectively remove them and re-add them with a product level discount until you run out of products or run out of discount - whichever comes first. That would give you a precise discount but the discount would be divided up between the products individually.
  • brettbrett FoxyCart Team
    @carvertech, the new API might be the best way to tackle this, like Adam said. That way you could create a coupon code for the right amount, then immediately apply it. The only problem is that we don't have a firm timeline for when it'll go public, but I'll email you with more details.
Sign In or Register to comment.