## Magento 2 : custom template file for different categories

I want to set custom template file for different categories.

How to set custom phtml file for different categories using XML file?

Any help would be appreciated.

## Flattening categories

Motivating example: Given a ring, we can construct its lattice of ideals functorially (with morphisms mapping to the preimage maps on ideals). Next, we may flatten this category of lattices, obtaining a category of pairs $$(R,I)$$ with morphisms $$(R,I)\to(S,J)$$ being morphisms $$f:R\to S$$ such that $$I=f^*J$$. Finally, this category maps back to rings by sending $$(R,I)\mapsto R/I$$.

The idea of this construction is to clarify the preservation of some properties of ideals by functoriality. Admittedly, this may be using a sledgehammer where a mere hammer might suffice, but… $$\DeclareMathOperator{\Ob}{Ob} \DeclareMathOperator{\S}{\mathcal{S}} \DeclareMathOperator{\Hom}{Hom} \DeclareMathOperator{\Ring}{\mathbf{Ring}}$$

The problem is the flattening step moving from a dependent sum of lattices $$\sum_{r\in\Ring}I(R)$$ to the set $$\{(R,I)\mid I\in I(R)\}$$. It is unclear how to formulate it functorially.

Abstractly speaking, the question becomes: Consider a subcategory $$\mathcal{S}\subseteq\mathbf{Cat}$$. We can flatten $$\S$$ to $$F(\S)$$, losing its object structure, by setting \begin{align} \Ob(F(\S))&=\biguplus_{S\in\Ob(\S)}\Ob(S)\ \Hom_{F(\S)}(x,y)&=\Hom_S(x,y)\quad x,y\in S\in\Ob(\S)\ \Hom_{F(\S)}(x,y)&=\{F\mid F\in\Hom_{\S}(S,T), F(x)=y\}\quad x\in S,y\in T; S,T\in\Ob(\S) \end{align} However, it is unclear how to formulate this as a functor from $$\S$$.

Side question: $$n$$-category theory seems to focus only on categories whose $$\Hom$$s are categories. This situation seems to suggest that it is interesting to consider categories whose objects are themselves categories, i.e. subcategories of $$\mathbf{Cat}$$. At the very least, it is an elementary exercise that some algebraic structures may be considered as categories with certain properties/structure, motivating such inquiry.

## Morphism of Lie groups $\theta:G\rightarrow H$ giving an equivalence of categories $BG\rightarrow BH$?

Given a morphism of Lie groups $$\theta:G\rightarrow H$$  and a principal $$G$$ bundle $$\pi:P\rightarrow M$$ there are (at least) two ways to assign a principal $$H$$ bundle.

1. See that the morphism of Lie groups $$\theta:G\rightarrow H$$ gives an action of $$G$$ on $$H$$ by $$g.h=\theta(g).h$$. Given an action of $$G$$ on manifold (Lie group in this case) $$H$$ there is an associated fibre bundle $$P\times_G H\rightarrow M$$ with fibre $$H$$. This gives a principal $$H$$ bundle.
2. For principal bundle $$\pi:P\rightarrow M$$, we can find an open cover $$\{U_\alpha\}$$ of $$M$$ and  (transition) maps $$g_\alpha g_\beta:U_{\alpha\beta}\rightarrow G$$ satifsying the cocycle condition $$g_{\alpha\beta}g_{\beta\gamma}=g_{\alpha\gamma}$$ on $$U_\alpha\cap U_\beta\cap U_\gamma$$. Then the compositions $$\tau_{\alpha\beta}=\theta\circ g_{\alpha\beta}:U_{\alpha\beta}\rightarrow G\rightarrow H$$ also satifies the cocycle condition $$\tau_{\alpha\beta}\tau_{\beta\gamma}=\tau_{\alpha\gamma}$$ on $$U_\alpha\cap U_\beta\cap U_\gamma$$. One can then produce a principal $$H$$ bundle over $$M$$ given this open cover $$\{U_\alpha\}$$ of $$M$$ and smooth maps $$\tau_{\alpha\beta}:U_\alpha\cap U_\beta\rightarrow H$$ satisfying the cocycle condition. This gives a principal $$H$$ bundle.

It is a good exercise (that I have not tried) to check that principal $$H$$ bundles obtained from above two methods are (naturally) isomorphic.

Given a Lie group $$G$$, let $$BG$$ denote the category of principal $$G$$ bundles. Objects are principal $$G$$ bundles and morphisms are $$G$$-equivariant morphisms.

Given a morphism of Lie groups $$\theta:G\rightarrow H$$, above construction gives a functor (at the level of objects) $$B\theta:BG\rightarrow BH$$. It is not difficult to see that, a $$G$$-equivarint map induce a $$H$$-equivariant map. This gives a functor.

I am trying to understand what can we say about $$\theta:G\rightarrow H$$ if we know that $$B\theta:BG\rightarrow BH$$ is an equivalence of categories? Does it have to be a diffeomorphism? Any comments are welcome.

## Magento 2 Product Form Categories Sort Alphabetically From the Backend

I want to sort Categories alphabetically of the product form, how can I?

For more clarification please look onto the below picture.

As I checked, by default Magento 2 sort according to the category id(ASC order).

I’m not getting the files so that I can check and modify sorting.

## How do I add more categories to OS X Finder’s sidebar?

My Finder has the categories “Favorites”, “Devices” and “Shared”. How do I add more categories?

In these categories I would like to add folders (it should work like “favorites”).

I do not want to replace Finder with Forklift. I do not want to use separators.

Is there a file I can modify?

## Categories assignement based on rules

I´m bringing today a tough issue which is causing me a huge headache. I´m trying to design a solution to assign categories automatically to certain groups of foods. These categories will be able to make the automatic assignment based on a huge set of available rules, based on parameters from this “foods”.

Based on this statements:

• The main issue starts from the point that more than food can comply with more than one rule.
• Since the categories will be customized, there is a big possibility that more than one category complies with one food, using different rules
• I need to solve this potential issue where my “wished” category is more important than all the possible others that comply with the same food.

Hope I was clear enough, it was a bit difficult to explain

Kind regards

## UX analytics categories for a web app

We want to start using metrics to help drive design improvements. I like to tackle things from a high level down approach and I am trying to find some categories of metrics or analytics for web apps but not have any luck with this. (Just for the context of why I want these categories: my team is going to start creating a list of the metrics we want our Telemetry guild to gather for us and I want to to categorize these metrics to make it easier to talk about them and prioritize them. I know that categories will emerge naturally once we start listing important metrics but I thought it would be good to get an idea of what the industry is using in terms of categories or metric types at the start as well.) Does anyone have any resources for this? Nothing I Google is giving me what I am looking for – just lots of links to analytics tools.

## Quillen equivalent module categories

Let $$f:A \rightarrow B$$ be a weak equivalence of simplicial commutative rings. There is a Quillen pair $$(-\otimes_{A}B, f_{\ast})$$ which is an equivalence. In this situation, $$(-\otimes_{A}B, f_{\ast})$$ is an equivalence precisely if the counit map

$$\eta_{M} : M \rightarrow f_{\ast}(M \otimes_{A}B)$$

is a weak equivalence for all cofibrant $$A$$-modules $$M$$. I am having trouble seeing why this map is a weak equivalence. My guess is use the sequence of $$A$$-modules $$\ker(f) \rightarrow A \rightarrow B$$ to compute the homotopy groups of the sequence $$\ker(\eta_{M}) \rightarrow M \rightarrow f_{\ast}(M\otimes_{A}B)$$.

Is this the right idea, or is there some easier way to demonstrate the pair is a Quillen equivalence?

## iOS App with two states and mostly different content categories

I’m working on a medical iOS app for university. Our users are usually 55+ years. I’m currently struggling with the navigation flow of the app. We basically have two states, pre and post-surgery. Both states share some content but mostly have different content. I thought about using “tab bar” with changing tab bar items. So the first two tab bar items are constant, but item 3 to 5 are changing depending on the state. (The state usually only changes once) How bad is it to change the tab bar items in terms of user experience, especially for old not to experienced users? I also thought about onboarding after the state changed, to teach the ui changes.

In general:

How do you usually handle navigation for apps with two states and mostly different content:

State 1:

• Content Category A
• Content Category B
• Content Category C
• Content Category D
• Content Category E

State 2:

• Content Category A
• Content Category B
• Content Category F
• Content Category G
• Content Category H

States share category A and B, but differ with C,D,E,F,G,H

I can’t share something real, but here an example. The state changes once after a specific event and two menu icons change as long with some content on the home / control / overview screen

## Ask user to check categories of an item and then display category-specific options

Problem

In my Web application I have a form in which the user must fill some information about a generic item, let’s say a car. Between all the standard information (name, description etc) I am asking the user to check the categories of which the item belongs according to the his/her belief (e.g. “Sport Car”, “Subcompact Car” etc).

Now based on the category checked I need to ask additional information to the user. For example if he/she checks “Sport Car” I need to show another form asking for “Sport Car”-related informations (e.g. top speed) whereas for a “Subcompact car” category the average consumption.

Possible Solution

Let the user fill the car form (with the categories checkboxes) then the system will store the car object in the database with its checked categories. After that, the user can specify the category-related information in a special page say “Advanced Options” which based on the categories of the object will show all the category-related form.

Still I am not convinced since I would like to make the category-related informations mandatory if the relative category is checked.

Any suggestions?