Hello All,
This is my first post, and I am fairly new to using Zen Cart, so please bear with me. I am in the process of building a site for a custom printing company that will allow users to design printed items online.
It would be impractical to include all of the possible permutations in the products database, because there are hundreds of possible images, and lots of different items and colors. The pricing scheme is based upon the number of colors printed, with the first 2 colors being included in the base price, and each additional color $3.00, no matter how many images are on the printed object.
I have already planned to add a product of each type to the database, and use attributes for the number of colors, so I think I have that one figured out, as there are a fairly limited number of available products to print on.
I have already designed the code to create the delimited string describing the total design, and have built the parser and code to reload it. It is working great.
There is a save function in the application that allows the user to save a design. I am just putting the design string into a persistant cookie which can be deleted, or parsed and the design reloaded if the user wants to do more work on the save. The strings are substantially under the 4k limit for cookies, but some can get pretty large with all the possible images/colors front and back 6 images and 6 colors per side.
Soooo, my questions are:
1) What would be the best way to store that string during a session so it could be reaccessed once it was added to the cart, and then do cleanup if the user abandons the cart.
2) What would be the best method of maintaining that design string once an order is placed for order fulfillment, etc.
I have some ideas that I think will work, but I was really curious as to how the experts would tackle this problem. I will likely create a new table in the database orderid_design or something to permanently store the design in a blob text field, tied to the order number, but some advice on how to manage this during a session, especially if the user is not allowing cookies. I have a reasonable amount of experience in Php and working with databases, but fairly limited with this particular problem.
Any assistance would be greatly appreciated
Sorry for the wall of text, just didn't want to waste anyone's time by not explaining the issues.


Reply With Quote
