Given that the prids are passed (products_id+attribute string), I wonder if the function actionMultipleAddProduct can handle it, or must we tweak the code to do so.
Given that the prids are passed (products_id+attribute string), I wonder if the function actionMultipleAddProduct can handle it, or must we tweak the code to do so.
I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me
I see where you are going with this, but I'm afraid that prods aren't the answer. The prid is constructed from the product id + an md5 hash of the attributes.
However its purpose is to recognise uniqueness of product attribute combinations in the shopping cart, allowing a customer to have the same product twice with different attributes and a unique reference for each of them.
Alas the unique reference, the prid, is constructed using md5 which is a one way encryption technique whose main benefit for this task is an extremely low collision rate in the generated results. So once the prid has been built, the attribute information is no longer accessible.
That's 99% accurate. I guess we would discuss the team of Chinese cryptopgraphers who have shown that it is possible to reverse md5 hashing, provided you have big enough computers.
More practically, you could re-write the zen_get_uprid function to use a more reversible methodology, but I rather suspect that this would be fraught with other problems and wouldn't recommend it.
Easier I suspect, would be to re-write the product listings screen to include simple attribute choices, e.g. color and allow them to be placed directly into the shopping cart. But that's wouldn't be a trivial undertaking either.
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
Kuroi, I'm looking for a way to allow customers add the products they purchased last time back to cart easily through account_history_info page.
On this page, next to each product I have an input box that let customers specify the number of items to re-order. And I want to use the multiple add-to-cart for this.
The trouble is that this doesnt play nice with products that have attributes. I really let customers add the exact products with the exact attributes back (since they already chose last time any way)
I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me
Just a quick update: I finally have this working for normal products as well as products with attributes. Thanks Kuroi.
I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me
Bookmarks