This issue has been migrated from the Forge. Read the original ticket here.
I can not select a combination that has no stock when another has it.
If no combination has stock it works correctly.
1-Create a product with combinations. Put stock in some combination but not in all.
2-Allow to buy products out of stock.
3-Disable the option "Display unavailable product attributes on the product page" in Product Settings page
4-In FO, combinations out of stock can not be selected
This comment has been migrated from the Forge. Read the original comment here.
Hi Juanjo,
I did not manage to reproduce the issue with the last version 1.7.3.1.
I attached a video record.
Apr 16 2018 6_20 PM.webm
Thanks to check and feedback.
Best regards, Khouloud
This comment has been migrated from the Forge. Read the original comment here.
Thanks for the quick reply.
Attached video of what he does to me.
聽
聽
This comment has been migrated from the Forge. Read the original comment here.
Hi Juanjo,
Could you please provide me another screen record.
Your video is not accessible.
Best regards, Khouloud
This comment has been migrated from the Forge. Read the original comment here.
Let's see if now.
https://www.screencast.com/t/7onTEltf
聽
This comment has been migrated from the Forge. Read the original comment here.
Hi Juanjo S谩nchez,
Could you please provide us with more info? We need more details to understand how we can reproduce your issue:
Don't you know how to get this information? Please read the following article:
http://build.prestashop.com/howtos/misc/how-to-create-bug-report/
Thanks!
Best regards, Khouloud
This comment has been migrated from the Forge. Read the original comment here.
Hi,
Host: dedicated server at OVH聽
Server:
CentOS Linux 7.4.1708 and聽Plesk Onyx聽17.5.3
PHP: 7.1.16 FasctCGI apache server
Prestashop version 1.7.3.1
聽
PHP errors: NO error.
Apache errors: NO error.
聽
聽
This comment has been migrated from the Forge. Read the original comment here.
Hi Juanjo S谩nchez,
Despite our several trials, we could not reproduce your issue with the provided information.
It seems that your issue is not a PrestaShop's core bug but most likely a server configuration or customization problem.
I invite you to contact our support team: http://addons.prestashop.com/en/388-support to help you solve your issue.
Best regards, Khouloud
This comment has been migrated from the Forge. Read the original comment here.
Hi,
SOLVED!!!
聽

This behavior occurs when it is NOT selected in "Display unavailable product attributes on the product page"
聽
It's a BUG.
聽
This comment has been migrated from the Forge. Read the original comment here.
Hi Juanjo,
Thanks for the clarification and for the feedback.
If the "Display unavailable product attributes on the product page" option is disabled, I manage to reproduce the issue with the last version 1.7.3.1.
We will see how to fix it.
Best regards, Khouloud
This comment has been migrated from the Forge. Read the original comment here.
"Allow to buy products out of stock." is not a must to reproduce this error, with that option OFF it makes the same error.
聽
follow
Some extra info: if all combinations are out of stock, the functionality works as intended. Then you can add the out of stock combination to the shopping cart. When one of the combinations is in stock, you cannot select the out of stock combination.
When will it be fixed? Because now I delete all the combinations that are out of stock, and add them again if they are in stock with all kinds of unwanted side effects (new id_product_attribute)
I may have a possible solution, after some digging in the PHP code (as a non PHP developer and non prestashop expert) I stumbled upon the following code (controllers/front/ProductController.php) on line 961:
if (!Configuration::get('PS_DISP_UNAVAILABLE_ATTR')) {
$productAttributes = array_filter(
$this->product->getAttributeCombinations(),
function ($elem) {
return $elem['quantity'] > 0;
}
);
Why filtering out the attributes without stock that should be displayed? After changing it to:
$productAttributes = $this->product->getAttributeCombinations();
the frontend works fine. I now can select the combination that is not available but allowed to order. Also the attributes are not shown when ordering is not allowed. If you want me to make a pull request I will install Git on my computer.
This issue is also present in 1.7.4.2
When the option to hide unavailable combinations is active, the unavailable options are not removed from the dropdown.
Hi folks,
what version do you think this bug will be solved? I'm kind of desperate with this, and I can't find a temporary code correction for my 1.7.3.4 or 1.7.4.4.
Thanks mate.
@zenerry, sorry for the delay, it is not fixed yet.
There are some major issues to solve before this one.
But PrestaShop is an open source project, so it can be solved before if someone submits a pull request to solve it.
Thanks for your understanding!
Could somebody help me creating or teaching me how to create a "Pull Request" for this issue?
I'm very new to GitHub, and I don't want to mess it up.
Thanks!
Hi @zenerry, there is a awesome guide for this : https://github.com/firstcontributions/first-contributions 馃槈 I think it will be a great help
Also do not be afraid of "messing it up", we'll help you getting it right
Hi guys,
If "Display unavailable product attributes on the product page" option is disabled and if you allow to order out of stock combinations, they are still displayed in the product but can't be selected.
Question: Why you don't enable "Display unavailable product attributes on the product page" ? This way, you can see and order out of stock combinations.
And if you have a product for which one you have not allowed to order out of stock combinations, you have this:

Hi @zenerry & @Prestaworks & @Thinkup,
Do you still have the problem?
Hi @MatShir,
In my case, this issue not fixed yet.
I manage to reproduce it with PS1.7.5.2.
https://drive.google.com/file/d/1LHnhFzFMxxXlmycVfLgN92GMSNpTe8Ai/view
Thanks!
@khouloudbelguith
How is your configuration :
HI @marionf,

Thanks!
Hi @zenerry & @Prestaworks & @Thinkup,
Do you still have the problem?
Thank you @MatShir, this is solved for the moment.
I don't usually use this feature.
Thank you @khouloudbelguith
The out of stock combination is displayed in FO and can't be seleted