-
Notifications
You must be signed in to change notification settings - Fork 9
Home
Adam Judd edited this page May 25, 2017
·
9 revisions
Complete documentation on the FoxyCart functionality (but not this specific piece of code) is here: http://wiki.foxycart.com/v/0.7.0/advanced/hmac_validation
More coming soon, but here’s a quick intro. First, edit the config settings at the top of the file. Most importantly, your $secret and $cart_url.
On your website, ensure each of your add to carts have a name
, price
and code
attribute set.
Then, start the output buffer right at the top of your <body>
, like this:
<?php require_once('path/to/foxycart.cart_validation.php'); ob_start(); ?>
Then at the very bottom, above your closing </body>
tag, add this:
<?php $output = ob_get_contents(); ob_end_clean(); echo FoxyCart_Helper::fc_hash_html($output); ?>
That should generate your HTML fully