Creating a hash for category

frisbiscuitfrisbiscuit Member
in Help edited June 2017
Foxycart Admin panel:
All of my products are set to the 'DEFAULT' category that charges a flat fee for delivery. However I want to give my customers free delivery if they choose a subscription to my product. So I created a category called 'SUBSCRIPTIONS' that has a $0 delivery fee.

My Form:
I'm hashing all my fields and all fields are working except 'category' which is giving me this error 'Cart Validation Error: code_present'

This is my hidden category field {using my template language}:

input type="hidden" name="category||{$CategoryHash}" value="SUBSCRIPTIONS"
And this is how I'm hashing the category in my page controller (which works great for all other hidden fields):
$CategoryHash = hash_hmac('sha256', $prodCode.'category'.'SUBSCRIPTIONS', $apiKey);
Any help would be appreciated.

Here's the development site for reference:
Sign In or Register to comment.