I have been toiling with this issue for the past 2 days now, and I can't seem to get some functionality working on a customization for a WordPress plugin. I am using latest versions of both JigoShop and WordPress.
URL to project: http://customcasing.ca/product/ipad-case/
Current Functionality
I have 5 product SKUs on the homepage and when clicked lead to their respective product order pages. On these respective pages are a design canvas which I have implemented fabricjs to handle image manipulation. When the user is satisfied, they save the canvas, which then uses the following example code to serialize the image into a JSON object:
saving/loading canvas with JSON
The JSON object is then set as the value of a hidden input within the "Add to cart" form. Then they would be able to choose product color variations, via dropdown boxes.
Now here is where things fall apart
Submitting the "Add to cart" form is supposed to run through a number of classes and post the hidden JSON object value to an aggregated "cart" object. This is called on various pages and a key/value pair is associated with the various attributes of the product. However, all the other key/value pairs are being executed and echo'd on a subsequent order review page...except my custom variable.
Here is the directory architecture
- /wp-content
- ...
- /plugins
- ...
- /jigoshop
- jigoshop_template_functions.php
- jigoshop_actions.php
- /classes
- jigoshop_cart.class.php
- /themes
- /customcasing
Here are the code blocks associated with the above structure (pastebin)
jigoshop_template_functions.php
html generator and form
jigoshop_actions.php
form $_post for hidden field
classes/jigoshop_cart.class.php
form validation and key/value pair creation
I have given as much information as I possibly can about my current conditions, if there were to be anything of help on stackoverflow it would be the following Q/A:
Trying to send a hidden input value to next page
If you need any additional information please feel free to ask and I will do my best to elaborate. Also if you need a wider scope of the code I can provide that as well. I would really appreciate any nudge in the right direction.