Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't order products with multiple variants from mod_iso_productvariantlist #1566

Closed
seaneble opened this issue Nov 11, 2015 · 1 comment
Closed
Labels
Milestone

Comments

@seaneble
Copy link
Contributor

The list module for product variants allows adding products to the cart directly without visiting the reader page.
Technically, it does this by placing hidden form fields into the markup which contain all relevant product identifiers.

I've found out that one of this fields is not generated correctly by the template iso_list_variants.html5.

<div class="formbody">
    <input type="hidden" name="FORM_SUBMIT" value="fmd3_product_101">
    <input type="hidden" name="REQUEST_TOKEN" value="87d557424dc75258cf7c7acbff0c8103">
    <input type="hidden" name="AJAX_PRODUCT" value="101">
    <input type="hidden" name="AJAX_MODULE" value="3">
    <input type="hidden" name="liter" value="11 Liter">
[…]
</div>

The regular form on the reader page has the following options for the variant attribute:

<select name="liter" id="ctrl_liter_fmd4_product_101" class="select mandatory" required="">
    <option value="liter_11">11 Liter</option>
    <option value="liter_27" selected="">27 Liter</option>
    <option value="liter_45">45 Liter</option>
</select>

As you can see, the value in the latter case is „liter_11“, whereas it it „11 Liter“ in the list template. The wrong value confuses the module and one cannot place such products into the cart directly. It is required to first navigate to the reader page and then order the product.

In my eyes, the line of code should not output the display value of the variant attribute, but rather the real value.

@aschempp aschempp added the bug label Dec 1, 2015
@aschempp aschempp added this to the 2.3.2 milestone Dec 1, 2015
@aschempp aschempp closed this as completed Dec 1, 2015
@seaneble
Copy link
Contributor Author

seaneble commented Dec 1, 2015

Superb!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants