Magento 2 Category page toolbar showing wrong item count - magento2

Magento version 2.4.5
Can anyone help to fix items count in category page toolbar if magento 2 catalog setting out of stock enabled?
If I disable to show out of stock on category page then item count working fine.
Out of stock setting -> Admin -> Store -> Config -> Catalog -> Inventory -> Out of stock -> Yes

To fix this, you need to override this magento file.
/vendor/magento/module-inventory-catalog/Plugin/Catalog/Block/ProductList/UpdateToolbarCount.php
Override in your extension di.xml
<type name="Magento\Catalog\Block\Product\ProductList\Toolbar"><plugin name="update_toolbar_count" disabled="true"/></type>

Related

How to display categories listing in product listing page vuestorefront?

I am working on vuestorefront with magento 2.
In vuestorefront I am using vuetique theme.
I want to display category listing in layered navigation section on vuestorefront. Same as magento 2 layered navigation.
Please check below two attached screenshot.
vuestorefront screenshot
The simplest solution is to add categoryIds to defaultFilters section of your config file, if that doesn't work create one custom attribute(must be of type int or keyword in ES) in magento and use that(Add that to defaultFilters instead).

Disable price filter on category view Magento 2

I'm new to magento and keep learning :)
How can I disable the price filter to show on category view?
You can disable price filter by setting up "use in layered navigation" to "NO" for price attribute.
Login to admin panel -> Store -> Attributes (under product section) -> search for price attribute code and go to edit mode -> go to storefront properties -> select "No" value for Use in Layered Navigation. -> click on save attribute.
then clear cache and check on category page.
Hope it would be right answer!
to disable price filter set "use in layered navigation" to "NO" for price attribute in storefront properties.
go to backoffice -> Store -> Attributes -> search for price attribute click edit -> click storefront properties -> select "No" value for Use in Layered Navigation. -> click on save attribute.
clear cache

Removing regions and items apex

how to remove regions and items in apex ? I want to remove list,datepicker,clorpicker and so many other regions and items in the backend through out my application
Open the region or item, for example by double-clicking it.
In the upper right corner you should be able to see a button "Delete".
Use it to delete the currently open region, item, whatever you have.
There are few ways you can hide your region/item at application level:
Go to Region/item properties -> Server-side Condition -> Never. That will hide the region/item for all your developers at application level (even for you.).
Region/item properties -> Custom Attributes -> style="display:none;".
(For item specific only) Item->Identification->Hidden. Although it will reset all your settings for your list and datepicker.

TYPO3 news hidePagination

I use this TYPO3 news extension.
I want to disable paging though typoscript. The option for it is plugin.tx_news.settings.hidePagination so I tried this
plugin.tx_news {
settings.hidePagination = 1
}
But this doesn't work. However setting plugin.tx_news.settings.list.paginate.itemsPerPage to a very large value does work. But that isn't a very nice solution.
Have I missed something on how to set hidePagination?
Theres a checkbox in the tx_news plugin.
Additional -> Hide the pagination
It seems to overwrite the TS (unchecked by default).
Does
plugin.tx_news {
settings.hidePagination = 1
}
get called in your template?
You can always check this with
<f:debug><{settings}</f:debug> to see what get's parsed.
The option to hide the pagination only hides the pagination in the frontend and does not show all news entries at one page. You can only set a high number to the list View to show all entries at one page. I think, there is no other solution at this time.
To override the values set in the news plugin flexform, you have to add the field to plugin.txnews.settings.overrideFlexformSettingsIfEmpty.
To add the field in question to the news extension standard list add this to your TS:
plugin.txnews.settings.overrideFlexformSettingsIfEmpty := addToList(hidePagination)

Add sort by category in product listing Magento

I've tried to find a possible solution for this but without any result I need to display a sort by category field in the default Magento toolbar in product listing page. Does anyone know how to add this feature without messing up my core files?
What you looking for is something Magento calls Layered Navigation.
First you must make a parant category Apparel and one (ore more) child categories, for example:
- shirts
- shoes
- hoodies
Then for all the child categories go to the admin back-end and navigate to:
Catalog -> Manage Categories -> Display settings.
Now make sure you set the field "Is Anchor" to yes.
Apply this setting for all the children categories.
After these steps your front-end product-listing should look like:
http://demo.magentocommerce.com/catalog/category/view/s/apparel/id/18/
At the left sidebar you can see the categories that are children of the parent category Apparel. Of course you can use your own names for the diffrent categories.
Cheers.