Magento - Pagination with different number of elements displayed depending on the page number - zend-framework

I'm trying to achieve a non-standart behaviour in magento; Within products categories, I basically need to display a different number of products depending on the current page number.
I'm not quite sure that I can specify this just by a configuration settings in magento admin.
So I suppose I will need to hook into magento core to achieve this.
Any recommandation on where to start this / how to override default behaviour?
Thanks in advance

Yes. You'll have to override the _getProductCollection method in Mage_Catalog_Block_Product_List in order to achieve that.

Related

TYPO3 how to hide List-Records

We have a folder with records, for example to display event-records in the typo3 backend. now we need to hide some of those events in the backend list-module based on a value (true/false) of one column. i cant find a solution within the TCA-documentation. any ideas how to achieve that?
help is much appreciated
our solution is to change the pid of the records which should be hidden so they appear in a subdirectory where the access is set to exclude our customer.

Typo3: How can i create and show custom content element (example: Email id, Phone number etc.)

I have contact persons' list and i want to display his detail(Email,Phone number,Address etc.)
Please give me simple example for the Address field.
I want functionality like the ACF(Advance custom filed plugin which provide in WordPress.
I am using Typo3 9.5.18 version.
I would use the extension tt_address https://extensions.typo3.org/extension/tt_address/.
Cheers,
Rachel
You can follow this:
How to create complicated content elements
or this:
How to create simple content elements
or the official documentation:
Documentation
Regardless what you choose, you need to be aware of the following: In order to create a custom content element you need time to understand how it works patience and do some experiments. Once you understand the process and create 5-10 elements, then all will come automatically to you :)
Best regards

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.

AEM 6.3 Different template of the same page for each audience (target)

Is it possible to have different templates of the same page for each audience/target?
This is the scenario:
Suppose I have the following audience/targets: Users, Super Users and Default.
Say I want to see my index page showing a different template depending on the audience/current logged in user.
Is this possible? How would you accomplish it?
If this is not possible using templates, is there another way to solve this?
Thanks!

Create a specific form in Drupal

I need to build a form where user can have an infinite number of identical fields, depending on the number which he entered in the previous field 'Number of steps'(for example).
Maybe someone have any idea?
I recommand you to check the Form API of Drupal and especially the #ajax property
Here is a great example on how to achieve what you need.