Roman Kabanov
  • Member for 6 years, 3 months
  • Last seen this week
what do cache.xml in etc folder of any module?
Accepted answer
9 votes

Yes, cache.xml will only be picked by Enterprise edition Full Page Cache. Though I heard there might be compatible implementations out in the wild. In <block> you write block types (same as in ...

View answer
How can I add "Sort by newest" and set it as default?
Accepted answer
5 votes

I made a similar change, hooking into admin configurations in addition to Magento\Catalog\Model\Config: Default sort configuration in Stores > Configuration > Catalog > Storefront > ...

View answer
Magento API adding a custom attribute to the sales_order.list output
4 votes

In your config.xml: <adminhtml> <events> <sales_order_collection_load_after> <observers> <mycompany_mymodule> ...

View answer
Overriding "base" layout not working
2 votes

Briefly, you're overwriting wrong layout :) "Customize and add to cart" button is originally created in Bundle module: vendor/magento/module-bundle/view/frontend/layout/...

View answer
How to override OrderRepositry - save function | API
1 votes

Maybe you are better off using a preference? Then you wouldn't need to redefine metadata yourself. Otherwise, original order repository has this in di.xml: <type name="Magento\Sales\Model\...

View answer
How to create a dynamic generated admin fields with Image upload?
1 votes

I would suggest using a Magento native approach of catalog image placeholders via clone model. See Stores > Configuration > Catalog > Catalog > Product Image Placeholders. Add text field ...

View answer
in uat js changes are done but in browser it is not reflecting
Accepted answer
1 votes

You need to enable signing of static files. https://devdocs.magento.com/guides/v2.4/config-guide/cache/static-content-signing.html

View answer
How to Expire Link after 10 min
1 votes

Unorthodox solution just for fun :) You mentioned that you're sending inside controller: namespace MyCompany\MyModule\Controller\Token; use Magento\Framework\App\Action\Context; use Magento\Framework\...

View answer
Is there any way to kick off a very specific cron process in Magento 2 using command line?
Accepted answer
1 votes

https://github.com/netz98/n98-magerun2 Can run specific cron jobs Module https://github.com/Ethan3600/magento2-CronjobManager Might be useful

View answer
Prevent custom option from being added to tax calculation
Accepted answer
1 votes

This answer is NOT FULLY COMPLETE! However, I believe this is a way to go. Developer level requirement: middle+ :) Posting it here in hope that it gives overview of amount of work to be done. Custom ...

View answer
Check current language in XML
0 votes

Yes, you should name your layout handle like this: STORE_$code.xml And move the block to header in this layout update. If my notes are correct.

View answer
Is possible to change the ID of an attribute?
0 votes

Edit attribute > Storefront properties > Position to reorder on frontend:

View answer
How can I remove backlog from indexer programmatically?
0 votes

It has to be one of interfaces: \Magento\Framework\Mview\Processor::clearChangelog \Magento\Framework\Mview\ViewInterface::clearChangelog \Magento\Framework\Mview\View\ChangelogInterface::clear It's ...

View answer
Magento 2.4.3: Magento Default Product Search Not Working
0 votes

Most likely reason is that you are lacking ElasticSearch installed, which is a Magento 2 requirement since 2.3. If this proves to be the case, all category pages will also return the same error. Check ...

View answer
customer_id = NULL in sales_order table?
0 votes

Why don't you join sales_order_address - one time for address_type="shipping" and one more join with address_type="billing"? You can pull all customer information from there, ...

View answer
Why does this script for deleting orders not work for me?
0 votes

In magento 1 the table is named sales_flat_order

View answer
I want to create custom mini cart in magento2
0 votes

You could check cart2quote module for reference - they added own minicart https://www.cart2quote.com/ Then should have open source version available for download.

View answer
Magento 2: quote_address moved to sales_order_address automatically?
0 votes

You need to copy manually in plugin on \Magento\Quote\Model\Quote\Address\ToOrderAddress::convert. For examples, see Magento plugins (EE only unfortunately): \Magento\GiftRegistry\Model\Plugin\...

View answer
Magento2 - Translate in js
0 votes

Quick answer - move JavaScript to .js file as per best practices, or translate using PHP (don’t forget to escape!). JS translations are collected statically into js-translation.json file using ...

View answer
Magento 2: Set Custom product attribute value programmatically on product save
0 votes

I would use event observer catalog_product_save_before to avoid loading and saving product separately extra time. /** @var \Magento\Catalog\Model\Product $product */ $product = $observer->getData('...

View answer
Method returns null / If statement not working
Accepted answer
0 votes

Solution: 1b. If you need to add attribute which name you know in advance, add it in your config.xml under global/sales/quote/item/product_attributes add your attribute like this (see Mage\Sales\etc\...

View answer