piper Posted February 22, 2005 Share Posted February 22, 2005 Hi, After spending the past couple of days trying to figure this out and searching without much luck, I've resigned myself to ask for your help with this contribution. I've installed the "Product Listing with Attributes" contribution along with a couple of others, but I don't think they're an issue here as they are working okay in their own right. I want to have a product listing page that shows all products within a particular category together with a quantity field and a list of available attributes. I've set-up a category with two products; prodA and prodB. Each product has three colour options, two of which are mutual (prodA has yellow, red, green whilst prodB has yellow, red, blue). From the product listing page, when I add a quantity to the prodB and add to basket, the basket summary appears with the correct number of the selected option. If I then repeat the process with the same product, but with a different option then the basket summary shows an additional quantity of the chosen option. So at this point, in the basket we have prodB, qty X, option 1 and prodB, qty Y, option 2. All well and good... If I try the same thing with prodA, I only ever seem to add option 1 into the basket no matter what. Does anyone have any ideas as to why/where the problem might be? I've yet to try it with other categories and may try deleting the product line and recreating it, but that's all data related. I'm thinking this is a coding issue... Sorry, no example to show you as it's all local and I'd prefer not to make it public. Thanks. Quote Link to comment Share on other sites More sharing options...
piper Posted February 23, 2005 Author Share Posted February 23, 2005 With a few displays, I've managed to find out that the option value of prodB is being used for prodA even when prodB isn't being added. Presumably, it's something in the form processor that's cauing this to happen? Quote Link to comment Share on other sites More sharing options...
piper Posted February 23, 2005 Author Share Posted February 23, 2005 Looking at the generated product listing page, I can see that the product listing form has products on it, each with three options as described above. Looking at the HTML for the form, it seems that there are two select form inputs named, "id[1]", holding the value of the option. No wonder the first product option selection is being ignored - it's being overwritten by the latest one instead. Now just need to figure out how the product listings page is generated... Quote Link to comment Share on other sites More sharing options...
piper Posted February 24, 2005 Author Share Posted February 24, 2005 I don't know if anyone is actually interested, but I think I've fixed my particular situation. Basically, the multiple product listing with attributes couldn't work as it was a single form with multiple inputs for the same attribute across all relevant products. e.g. one particular category has 2 products. Each product has two colour choices. Let's say the customer only wanted the first product in colour X, but the second product had a colour value of Y selected by default then the value of the second products colour would override any choice made for the first product. Anyway, I've changed the modded product_listing.php to output a separate form for each product so other attribute values don't affect the one that's added to the basket. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.