Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Product Listing with Attributes


Recommended Posts



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.



Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...