mc12345678:
Still haven't exactly found what is fed to populate the attributes variable that gets encoded, I'm wondering if it's like: $attributes[] = array('option-id'=>'21','option_values_id'=>'11'); so that the unique id of the attribute is therefore provided, and then that is what is encrypted, if it is every possible non-file attribute aspect, or if it is every possible attribute field filled in as applicable (nulls and everything) that is then encrypted. :/
I still haven't fully connected the dots from the product info page to the cart encrypting it, but it seems like the design idea would be to make the vriables to be encrypted as easy to fill in as possible and that they would be based on what is presented on screen (html) when managing a product. Further, because an attribute can be defined either by it's unique number which is different between the products attributes and products attributes downloads tables that, the more "universal" option number and option value number would be the route to go as these two values wuld easily lead to other data that is easily retrievable.
I'm going to give that a shot and see if this random code that is generated is the same as one that has already been generated or if I have to expand my array population to get the same unique number that I'm trying to get.
Wow, finally did it, through some brute force/testing and correcting typing mistakes, I figured out what it takes to calculate the uprid for a product.
The array to feed the function zen_get_uprid is created like such: $variable[$option_id] = $options_values_id
Do this for all attributes then what I originally did was recreate the store side of the function zen_get_uprid because it offers some more cleanup of the information (text box related) than the admin side and it performed the encryption; however, after some contemplation, I reverted back to simply calling the zen_get_uprid function.
Ultimately it was through the review of the cart session value that I landed on the above testing method as lat9 has suggested.
Also, while this method of comparison seems to function for it's purposes, I do believe that the code being tested falls short in actually having to do this comparison. While I've tetsed the above code with dropdowns, I need to see what happens with text boxes and may be a reason this plugin has never been fully completed.
Thanks for the information lat9, I did get around to figuring it out, had started to close the loop and wanted to verify some things before posting, well then sleep came. :)
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...