Git Product home page Git Product logo

Comments (4)

tobias-kuendig avatar tobias-kuendig commented on May 29, 2024

According to the scripts.htm partial this method is only called if no properties are available - so it's technically a base product without variants.

If properties are available the onChangeProperty event handler is called via JS event which takes different variants into account.

I guess we should refactor this and display the available stock directly if the management method is set to single. Otherwise reuse the stock calculation from the onChangeProperty linked above.

from oc-mall-plugin.

alxy avatar alxy commented on May 29, 2024

I'm not sure if I get it correctly, however if I set up variants and group by a single property (which is package size in my case), then the default component markup renders simple links with images to change the variant: https://github.com/OFFLINE-GmbH/oc-mall-plugin/blob/develop/components/product/cart.htm#L6-L11

Then there are no other properties left which would render the select inputs which actually trigger the onChangeProperty event. I guess this only works for the case that "Attribute for variant grouping" is "None". In this case the select input correctly renders and triggers the event. But in the former case firstProperty.length will yield 0 and incorreclty onCheckProductStock will be run. This now fails to calculate the stock with {"X_OCTOBER_ERROR_FIELDS":[["Missing input data"]],"X_OCTOBER_ERROR_MESSAGE":"Missing input data"}.

from oc-mall-plugin.

tobias-kuendig avatar tobias-kuendig commented on May 29, 2024

This should be fixed in 128daca

from oc-mall-plugin.

tobias-kuendig avatar tobias-kuendig commented on May 29, 2024

This is looking good in the latest version. I'll close this for now.

from oc-mall-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.