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

out of stock combinations #23

Closed
vivoices opened this issue Jul 9, 2014 · 9 comments
Closed

out of stock combinations #23

vivoices opened this issue Jul 9, 2014 · 9 comments

Comments

@vivoices
Copy link

vivoices commented Jul 9, 2014

"If you choose to make the out of stock combinations not selectable and you set for default configuration an out of stock simple product, on the initial page load the out of stock combination will still be selected. Any ideas on how to handle this are welcomed."


One solution could be to change the "default" radio button into a "default position" number field.
The lowest integer would be selected as default, if that product is out of stock, the next lowest integer will be default etc.

(Thanks for a very useful extension, will install as soon as the 1.9 issues are solved)

@tzyganu
Copy link
Owner

tzyganu commented Jul 10, 2014

@vivoices Thanks for the idea. I will look into it.
In the meantime, you can use this extension on 1.9 without any issues.
the only thing you need to change is the javascript callbacks for switching the image. See #21 for more details.

@eduardo-g-silva
Copy link

Hi there, thanks a lot for sharing the code,
I am using the module with a size attribute and works perfect.
I need to show for a client the stock for singles products when the user select the size.
I am planing to work on the product.js at the isInStock function to return the stock levels and stored in new html attribute.
Any thoughts about it do i missing something that it is already implemented?
Thanks

@tzyganu
Copy link
Owner

tzyganu commented Aug 22, 2014

@eduardo-g-silva. There is nothing implemented regarding the stock level. The extension just keeps the value of the stock status flag. (In stock / out of stock). It does not keep the available qty. I guess you can do a similar thing and remember the stock qty and when an attribute is changed just update a section (<div> element) with the stock value.

@eduardo-g-silva
Copy link

cool i changed a bit the getStockOptions on Block\Catalog\Product\View\Type\Configurable\Config.php to pass the quanty to jason insted 0 or 1 and then change isinstock on product.js to return the value. once finish tested i will add it here,
Thanks, Eduardo

@rajeshkumar1404
Copy link

Hi @tzyganu how to display product SKU, once the user has selected product based on Color attribute

@tzyganu
Copy link
Owner

tzyganu commented Sep 30, 2014

@rajeshkumar1404 You can't. The module does not support this.

@rajeshkumar1404
Copy link

Thanks @tzyganu for your early reply, is it possible to add new method in Block\Catalog\Product\View\Type\Configurable\Config.php like 'getProductSku' which will access the sku based on product id, and can be access inside product.js using friendlly method

@tzyganu
Copy link
Owner

tzyganu commented Sep 30, 2014

@rajeshkumar1404 I will not add this feature because it's really specific. But feel free to fork this extension and do the modifications you need.

@tzyganu
Copy link
Owner

tzyganu commented Nov 20, 2014

This should be fixed in 2.0.1. I moved the out of stock logic on the server side where is easier to manipulate.
If the out of stock options are select-able then the first available combination is selected.
If the out of stock options are not select-able then the first in stock combination will be selected by default.

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

No branches or pull requests

4 participants