Magento 2 layered navigation no results - magento2

I have a problem with the Layered Navigation from Magento 2 in the sense that it doesn`t show me results when applying certain atribute filters. the only filter that shows me results is the price.
I have created 4 other attributes (Lab, format, season, etc.) by assigning the value "Filterable (with results)". These attributes that I created are displayed correctly in the Layered Navigation menu and also indicate the number of products that each attribute has.
But when I click on any of them I get back the message that no products with those atributes were found.
I tried to clean the Cache, to re-index and to change the magento mode to production but nothing works

Can you please check the below items on the admins?
Enabled = yes
Product in website = yes
Product in category = yes
Stock status in stock = yes
Visibility = catalog, search
Reset index, Reindex
after, run the below commands.
php bin/magento indexer:reindex
php bin/magento cache:clean
php bin/magento cache:flush
Please let me know if it works for you.

Related

Magento 2 show out of stock configurable product

So i have furniture bed configurable product which has 4 simple products "Single | Double | Queen | King" if in the admin panel i set the inventory of "single bed" to 0 then "Single" option is not showing at all, i want is it to show "Single" in the frontend and as Out of Stock... so i can add email option later if available.
I tried "show out out stock items in frontend" but it only works for simple product not configurable
thanks
It might depend on the version you're using of magento if you're using an older one, that I think you are because that's a more or less feature you can try this
https://github.com/interjar/configurable-child-visibility
If you're using a more recent version the should show out of the box with that option. But I must say, in the recent version of magento and without plugins most of the products they show the options even out of stock as intended but some just don't and I can't get why.
Hope it helps :D

Magento 2.3.4 size swatch displayed for products with salable quantity 0

We are using latest version of Magento 2.3.4.
Whenever a customer is creating an order a salable quantity for product (child of configurable product) is decreased - which is a correct behavior. The problem is that, a bought size is still available until order is shipped.
The customer can see size - while trying to add (just sold) size to bucket, he gets information that requested QTY is not available.
I would like to disable (grey out or cross out) unavailable size.
Can I achieve this using magento settings ? Or do I have to write a custom plugin ?
You could do multiple things:
Find the template of the dropdown and break into it with objectmanager and a custom (raw) query that checks the stock for the size and disables the option. This is fastest but bad especially if you don't have caching, the queries make the template slow to load.
Make a nice extension that overrides the templates trough xml file. Also override the php files (model/controller) and change the logic to acheive what you want. This is better practice. It has been done here i think, didnt test it myself:
https://magento.stackexchange.com/questions/216373/magento-2-2-how-to-show-out-of-stock-in-configurable-product
Find an extension from 3th party.
If you have a sample of code I can also help with it.

Javascript messes with orderBy in my CRUD in Laravel Backpack

I followed the process in this question and everything works, but I wanted to see the order in my displayed page.
I updated My controller with this:
$this->crud->orderBy('lft');
But it doesn't seem to work. I then desactivated the JavaScript, and the order was correct. It seems the JS reorders the contents when loading the page (I assume it's by the contents IDs).
How can I disable this behaviour ? (Only the one made while loading the page, I want my users to be able to reorder by columns).
This was a bug - DataTables ignored the order set by Eloquent and just did his thing. This has been fixed in the latest version of Backpack\CRUD, so a composer update should fix it.

How to add ID to magento products

I'm trying to add some id to the span where in bundle product Magento shows all the bundled products.
see snapshot
So I would like to change input id from bundle-option-x-qty-input to bundle-produkt-sku or something like this.
I need to have a static id for added products. Now id is dynamically changed by adding a next number bundle-option-1-qty-input, bundle-option-2-qty-input, etc.
I need to know the id of those products cos I want to made some JavaScript code to control amount of this product. Anyone know where is a template file edit or where do I need to add some code?
Sorry for my English.
The best way to debug template path is by using Magento Template Path Hints
Go to System -> Configuration In the top left there is a box named “Current Configuration Scope: “ which has a drop down. From that drop down, choose your store view name. By default it is last option in the drop down i.e Default Store View option. After this go to Advanced -> Developer->Debug And here make Template Path Hints = Yes
See
Mage_Catalog_Block_Product_View_Options_Type_*
/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Select.php

Magento 1.7.0.2 Catalog prices reindex issue after edit product in admin

I am using magento 1.7.0.2. When I add product in admin everything is working fine but, when I edit and save this product in prices category page is not updated and product page shows updated price. Also price reindex is not working after editing product. Please help
Is ur compilation is disabled or enabled?? if enable, make it disable by going through system/tools/compilation.. Then re-index the data by system/Index Management.. Here select all the make reindex of them . Now final clear your cache by cache management..