Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Use add multi products form for products with attributes!

    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

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Use add multi products form for products with attributes!

    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)

  3. #3
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Use add multi products form for products with attributes!

    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

  4. #4
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: Use add multi products form for products with attributes!

    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

 

 

Similar Threads

  1. add t ocart link for products with attributes
    By joricam in forum General Questions
    Replies: 5
    Last Post: 26 May 2012, 05:47 PM
  2. add to cart button on product listing (for products with attributes)
    By easy3dsource in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 10 Apr 2011, 06:08 PM
  3. Need help with setting up store. Use attributes, or add more products.
    By hondaman in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 17 May 2010, 03:17 PM
  4. Show 'Add to cart box' for products with optional attributes
    By Sushigal in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 26 Feb 2010, 10:52 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR