How to add a layered navigation on a custom product catalog on Magento 2.4 - layered-navigation

I need to add a custom page as 'Offers' on my client site with layered navigation.
I need to fetch product collection by its attributes 'is_offer_on' and show them on the page.
Most of the answers and topics I found in the internet are either outdated (Magento 1.x or 2.0) or confusing due to missing bits and pieces here and there. I really would appreciate if someone could point out the steps or a tutorial which explains what exactly needs to be done on achieving this.
Thanks in advance!

Related

Create a Block with data from database in Sulu

I need to build a block with data from (Symfony) Entity.
For example a carousel with last 3 item/record from database.
This block can appear in more than just a page.
I know that I can use a custom controller but is that the best technical choice ?
Do i need "Smart content" ? Read the doc but it's not clear
How i can do that ?
Thanks in advance.
Using a twig extension or a controller would definitely be the easiest way, because no sulu knowledge is required for that.
But the sulu way of solving that problem would be a custom SmartContentDataProvider. There are two main advantages of this method:
The content editor can further filter the result (in your case probably sorting and limiting)
The result is also displayed in the admin interface (Otherwise it would just be shown in the preview)
Our community is usually using our Slack channel or GitHub Discussions for support questions. Your questions will probably be answered a lot faster there, because there we can better track them.

application with sapui5 and openui5

Actually we have developed on application with sapui5 for our customer but the problem is that some new customer dont want to go through License agrement with sapui5. So the solution we have found to make our application with openui5.
My question is that
"Is there any possibility to make application with both of them and at the time of installation making a decision either going and make resources of sapui5 or openui5"?
Thank you
Nimi
As long as you understand that certain features will only be available in SAPUI5 you can load the version of sap-ui-core.js that comes with either in your bootstrap index.html page.
For example, if using CDN, for OpenUI5 link to https://openui5.hana.ondemand.com/resources/sap-ui-core.js and for SAPUI5 use https://sapui5.hana.ondemand.com/resources/sap-ui-core.js
See this link to read about differences between SAPUI5 and OpenUI5.
Also see this link for another discussion of the differences.
I know that this post (I'm linking to) is not so much updated but it will give you a good overview and history about SAPUI5/OpenUI5 and all the differences.
Anyway, SAPUI5 is a superset of OpenUI5 with some addictional control (like VizChart or FilterBar.
I think that in 90% of cases you can just go with OpenUI5 and use other opensource libraries / develop custom control if you need something that is missing.

Best practices for designing GUI in GWT

I have recently started studying Google Web Toolkit. I have went through some walkthroughs, and I think I understand the basics and the idea. However, I have some questions on the overall architecture and design of the applications.
Let's start with the GUI. I want to build a "common" web application, where the user first sees a login page. After successful login, the user is redirected to some kind of index page and a menu is added. I created a new LoginComposite for the login page, and tried to design a nice looking HTML table using the GWT Designer. However, I find that really hard to do, as you cannot set any individual properties on the individual cells (TDs)? There's no way to specify colspan or rowspan, and I can't set any padding or margin on the cells themselves. In short, I know exactly how I would have written the HTML code, but I can't translate that to the designer. Is that just me?
Also, I am wondering about the best practice for code layout and design. I went through the StockWatcher tutorial, but that's really not a very realistic web application. For example, I would like to know how I should design different forms (should each be in a own class inheriting the Composite-class)? How should I switch between forms (for example, first a list view, then a form for editing a chosen item from the list, then a totally different page)? If I have one Composite for each page, and instantiate them when needed in my EntryPoint, would that mean that the client will download all the JavaScript for all those Composites at page load? Should I stick with only one HTML page, or should I have many?
These are questions not really covered by any GWT tutorial. If anyone know a good example of a "real" web application built using GWT, I would love to see it.
Thanks for your input!
There are a whole bunch of resources in Google IO talks. For example:
http://www.google.com/events/io/2011/sessions/high-performance-gwt-best-practices-for-writing-smaller-faster-apps.html
http://www.google.com/events/io/2011/sessions/highly-productive-gwt-rapid-development-with-app-engine-objectify-requestfactory-and-gwt-platform.html
http://www.google.com/events/io/2010/sessions/architecting-production-gwt.html
http://www.google.com/events/io/2010/sessions/architecting-performance-gwt.html
http://www.google.com/events/io/2010/sessions/gwt-ui-overhaul.html
http://www.google.com/events/io/2009/sessions/EffectiveGwt.html
Also, don't expect to be able to edit absolutely everything if you are using the GUI to build your GWT app. Good luck!

Tab UI in Android

I am an Android newbie and I really require your help.
I'd like to develop an app , which its UI is persisted of three Tabs, and the first one a WebView.
since I am not familiar with all the required building blocks, can anyone give me a sample? a guide how to do so?
thanks a lot!
The Android API Demos include several (Tabs1 to Tabs2 sample files) examples. Install, try and have a look at them.
Regarding specifying the content of Tabs you have the possibilities to use Views or Activities. If you check some "Tab" related discussion here you will find that established users prefer to use Views (e.g. here). I took the 'Activity' way so far and feel quite comfortable - but did not go to deep into pros and cons. My current point of view is that you have to decide on each special case and can't give a general recommendation.
there is some tutorials on this page : http://developer.android.com/resources/tutorials/views/index.html

Joomla1.5 CRUD extension tutorial

I need to build a basic CRUD joomla extension for a customer.
On the user's side, it must display a product list when the user choose a category, and the product details when an item is selected in the list. On the product details page, the user can send a message to the site's owner regarding the chosen product.
On the admin side, user must be able to add/modify/delete products and categories. That's about it.
Does anybody knows (a) good tutorial(s) that could help me get started with this project?
I've worked with php 4 years ago and have 5+ years experience in web development (.net), but i'm new to joomla.
Thanks in advance!
Sounds like to me you are looking for an e-commerce extension with a catalog mode (no purchases/no cart enabled) and an Ask a Question form on product pages. I know that at least Virtuemart has this ability exactly. I am sure there are other simpler carts that will also accommodate your need. http://extensions.joomla.org/extensions/e-commerce/shopping-cart
Spend a couple of hours trying out carts, no code writing required.
A great place to start is the Joomla docs site.
Checkout Component Development section.
Also, here is MVC Component Tutorial (there are 6 section to it, look for links at the bottom for "Next"), it will definitely put you on the right track. You will have to add a lot of your project specific things and do out of the box things, but it should be pretty easy.
Just keep things separate to make it easier
View/Template - your presentation
Controller - logic
Model - Data Access Layer (DAL)