Hi Possum
I am going to continue my thoughts on this, in this thread. Because the other thread is really for Edit Cart mod specific enquiries.
Some really useful thoughts on alternative approaches to my gift wrapping problems. Thanks. FYI, I'm selling children's books, so you're right that the wrapping is not truly an attribute of the product itself.
In short I think the challenge is that there is no wholly satisfactory way of doing gift wrapping at the moment. Attributes have the problems that you have stated above. Products suffer from the fact that the additional "gift wrap" product can't actually be connected to the book(s) that are to be wrapped. This would stop someone from ordering a book for themselves plus a book as a gift because i wouldn't know which book or books were supposed to be wrapped.
The Cross Sell and Better Together mods provide the option to offer the gift wrapping, but lose the connection once the products are in the cart.
The Gift Wrapping mod (which I'm using) does nice things with offering flexible pricing options and separates the gift wrapping costs from the books themselves, but it is based on attributes, which again has the compromises you have mentioned.
BTW, Amazon inserts an optional extra page in the checkout process where you assign wrapping options to each book.
I note Dr Byte's concerns about removing the safeties. Assuming that I can figure out how, I was planning to update the logic so that it queried whether there were any mandatory attributes, rather than just looking for any attributes.
Actually I think you should heed Dr Bytes concerns. For 2 reasons,
i) You are going into uncharted territory and it is sure to be frustrating work
ii) I don't think you need to go into that area.
I don't think you need to because the method I suggested will probably do the same job, for far less coding and with far fewer hidden gotchas.
I would change the code for the buy now button on the product listing page. How about changing it such that it submits the same information as the add_product action of the cart_quantity form on the product info page? You would need to hard code hidden parameters for the quantity, gift wrapping attribute at least, into the buy now button code.
Also I still feel you may be unnecessarily complicating your requirements. It may be that some users will combine books that require gift wrapping and books that do not in the same order. But these will surely be an exception to the main. My guess is that you are in a hurry to get this ready for Xmas. (We all are:shocking::shocking:)
Managing exceptions is always problematic, and it will slow you down. If the number of exceptions is not excessive, the value of the lost sales before you go live, and amount of your dev. time may not warrant trying to manage exceptions programmatically. In this case, I would advise your customers to make 2 orders, one for the gift wrapping package (which may have a different shipping address anyway) and one for the non gift wapping books.
If that is not acceptable somewhere in the gift wrapping product description, explain that if they want some books gift wrapped and others not gift wrapped, they should note this in the notes area of the checkout process.
Justin
============
Kuroobiya - Personalized Karate Black Belts and Dogi
Kanebo From Japan - Kanebo Cosmetics Direct From Japan