Comments (4)
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.
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.
This should be fixed in 128daca
from oc-mall-plugin.
This is looking good in the latest version. I'll close this for now.
from oc-mall-plugin.
Related Issues (20)
- Should the inventory quantity be restored when canceling an order?
- How to show All products of all categories on page with filter by category (like barands and attributes)
- If I use @ in pagination module there are a lot of bags
- Foreign Key constraint failed on plugin:refresh (MySQL | SQLite)
- can't update rainlab/user to 2.0 HOT 1
- Variants are no longer attached to products with 3.0.22 update HOT 15
- No translations for Order State Label HOT 1
- First order number - does not work HOT 1
- Other variants HOT 2
- Double mall.order.shipped event HOT 2
- Extending Order with custom fields
- Manage browser back from Paypal payments
- Email is not sent when shipping state is updated HOT 2
- Urgent issue in tax application based on customer country HOT 5
- Google Merchant Center feed not found
- Phone number
- Abandoned and bots carts HOT 3
- Order ID in links from checkout result actions HOT 1
- Session ID field HOT 3
- Filter Issue and Missing "Reset/Clear Filters" Button When Setting Property Values as 0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oc-mall-plugin.