Questions tagged [core]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers
127 views

Type Error occurred when creating object in magento 2.4.6

I have just upgraded my magento from 2.4.0 to 2.4.6 and also upgraded my php 7.4 to 8.2. All the commands are running fine but while reindexing i am getting this error and on frontend also. Can anyone ...
Tisha Jhanwar's user avatar
0 votes
1 answer
204 views

How to override core plugin method?

I would like to override core plugin method Core plugin path Magento\InventorySales\Plugin\StockState\CheckQuoteItemQtyPlugin.php In this file I would like to override aroundCheckQuoteItemQty() ...
Niraj Patel's user avatar
0 votes
1 answer
211 views

Magento 2 - Is it safe to change files in core via patch?

I often read that we should never change files in the core and I know that it is bad practice. However, there was a bug in my shop, so I reported it to magento customer support and they have sent me a ...
Black's user avatar
  • 3,280
-1 votes
1 answer
21 views

php default classes not working in magento

I trying to sort cart item by price private function getSortedItems($quote, $rule) { $items = $this->context->getMatchingItems($quote, $rule); $itemObject = new ArrayObject($items); ...
Prakash saran's user avatar
0 votes
1 answer
177 views

How to override core files into custom module app/code?

I am added a custom attribute in my wishlist knockout core file, Code : https://codeshare.io/5ZlEv7 Line Number: 142 I want to override into my custom module, I am created a custom module, how to ...
zus's user avatar
  • 165
1 vote
0 answers
94 views

Magento Category Navigation - Customising Topmenu.php, adding columns using "$colBrakes" + "shouldAddNewColumn"?

I am successfully customising the magento 2 navigation by extending 'vendor/magento/module-theme/Block/Html/Topmenu.php' (and also 'vendor/magento/module-theme/view/frontend/templates/html/topmenu....
00-BBB's user avatar
  • 166
0 votes
1 answer
1k views

Magento 1 - How to update from 1.9.4.4 to 1.9.4.5

I'm very new to Magento 1 and I need to update from 1.9.4.4 to 1.9.4.5 on my staging system. How can I do that? I can't use composer or anything else. Thanks in Advance!
Leon's user avatar
  • 11
0 votes
1 answer
349 views

How use preference for core widget block class?

How override core block class for core Catalog Category Link widget? I try: <preference for="Magento\Catalog\Block\Widget\Link" type="Vendor\ModuleName\Rewrites\Block\...
David Young's user avatar
2 votes
0 answers
249 views

\StoreResolverInterface->getCurrentStoreId() taking huge amount of time to resolve current store ID in StoreManager.php

Running Magento 2.3.4 and encountering an issue with Magento core code. For the past couple of days I've been battling terrible performance on my site, especially when serving uncached content via ...
WackGet's user avatar
  • 1,188
1 vote
2 answers
274 views

Magento 1.9 - What is the best way to edit core files?

I need to edit: app/design/adminhtml/default/default/template/sales/order/view/items.phtml editing core files is dangerous, may I know how can I edit without affect core files. eg: Some case we ...
zus's user avatar
  • 165
1 vote
2 answers
2k views

Magento 2.3: InvalidAgumentException: Composer could not find the config file

I have a problem with Magento, I use X-debug for trying to debug Magento and I have the following Exception: Exception Has ocurred. InvalidArgumentException: Composer could not find the config ...
SylwekFr's user avatar
  • 325
0 votes
2 answers
464 views

How to override productcollection.php from vendor?

I have to override the file ProductCollection.php from vendor/magento/module-catalog/Ui/DataProvider/Product. I have read many posts but still not getting to override the file. Can anyone please ...
Siva's user avatar
  • 1,120
1 vote
1 answer
127 views

How to find a file that render html of a function?

How to find a file in Magento Core that render getPayementHtml() function (Admin Default Template)?
Marcos Vinicius's user avatar
0 votes
0 answers
818 views

Magento 2 getting error Source class "\Magento\Framework\Filter\Zend" for "Magento\Framework\Filter\ZendFactory" generation does not exist

I am getting this error on the checkout page Source class "\Magento\Framework\Filter\Zend" for "Magento\Framework\Filter\ZendFactory" generation does not exist. I deleted var folder I deleted ...
imtiaz's user avatar
  • 113
1 vote
0 answers
379 views

Magento 1 EE 1.14.3.10 - Mage::getSingleton('core/resource')->getConnection('core_read') is returning null sometimes

We have Magento 1 EE 1.14.3.10. In the production, I tried to deploy some of the updates, took a code pull from GIT and cleared the cache. Since then it started throwing this error. No error if Amasty ...
Kalyan Chakravarthi V's user avatar
1 vote
1 answer
205 views

Magento 1.9 overwrite core

Is it possible to overwrite Magento core functionality in this way? - Mage_Sales_Block_Order_Total { protected function _initTotals(){ //this is core } } and overwrite it with this - ...
Trenox's user avatar
  • 397
1 vote
4 answers
984 views

Best way to Edit Default files & Apply Custom Application in Magento 2.3?

What are all the best way to edit core files in Magento 2.3. eg: magento 1.9 edit app/code/local or community instead of app/code/core. Note: What are all files I need to focus for Future Version ...
zus's user avatar
  • 165
0 votes
0 answers
279 views

HEADERS ALREADY SENT

I keep getting HEADERS ALREADY SENT in my logfile (system.log). [6] /home/company/public_html/index.php:82 \</pre> 2018-09-17T10:49:23+00:00 DEBUG (7): HEADERS ALREADY SENT: \<pre>[0] /...
Black's user avatar
  • 3,280
1 vote
1 answer
158 views

Overwrite function of Magento Core Class without having to develope extension

I try to overwrite a function from a core class without having to create an extra extension for it. I need to overwrite the function _loginPostRedirect() from Mage_Customer_AccountController to ...
Black's user avatar
  • 3,280
3 votes
2 answers
195 views

How to use Composer to update just the Magento 2 core packages?

I would like to use the composer update feature to update all the core packages, not the third-party packages together. Do you have some idea?
Rafael Corrêa Gomes's user avatar
4 votes
2 answers
3k views

Magento2 : Call getViewFileUrl() function in block file

How to call function getViewFileUrl() in block file? For phtml it is $this->getViewFileUrl('images/img.jpg') but it's not working on block file. what is syntax for block file which class I have ...
Ketan Borada's user avatar
  • 2,603
2 votes
2 answers
595 views

Magento 2 core files

What folders/files are now considered core for Magento 2? As in "Don't edit these files since they can be overwritten in an update" I need to scan a site for core overrides and I'm looking for the ...
mbalparda's user avatar
  • 7,363
1 vote
0 answers
82 views

Magento 2 contributing tests to the new MFTF

I would like to know if it's possible to contribute tests to the new MFTF framework. In the documentation it talks about contributing to the MFTF core itself, but not how to contribute tests for it, ...
Grigoruta Cristian's user avatar
0 votes
2 answers
118 views

Fall back from a core file

is it possible to use magento core files as fallback? Example: I really need to make a change in this file: app/code/core/Mage/Core/Controller/Varien/Action.php It will work if I create a copy at ...
Filipe Marques's user avatar
1 vote
1 answer
169 views

Mage_Core_Exception: Invalid block type: Mage_Adminhtml_Block_Sales_Order_Totals_Subtotal

I am new in Magento and in Magento (Magento ver. 1.9.3.2), it show Exception of Invalid block type: Mage_Adminhtml_Block_Sales_Order_Totals_Subtotal(in exception.log) And reason of that Exception ...
JON's user avatar
  • 121
0 votes
1 answer
209 views

adminhtml config action location

I am trying to learn about creating modules by looking at the core code to see how the directory structure is formatted. I was looking at the Magento 1.9 sales module. In the adminhtml.xml file, The ...
Phillip D's user avatar
2 votes
1 answer
466 views

Rewrite Magento core files

I have a Magento 1.9.3.1 website in front of me right now in which the core files have been edited ( THEY HAVE COMMITTED A SIN!!! ). Anyway I have figured out which files they have edited and I am ...
Jeffrey Ullers's user avatar
2 votes
1 answer
808 views

Transferring website from server to localhost using WAMP

I'm trying to transfer live website to me localhost. Steps I did: 1. Made folder in wamp/www 2. Copied FTP files there 3. Imported database 4. Changed core_config_data for unsucure/base url and ...
Karadjordje's user avatar
2 votes
1 answer
2k views

Strange behaviour of app/code/core/Mage/Core/functions.php file

I have Magento 1.9.3.1 CE installed and unaltered in my Uwamp localhost. I was just casually testing some functions from the app/code/core/Mage/Core/functions.php file, by calling those functions in ...
Vicky Dev's user avatar
  • 1,992
4 votes
3 answers
11k views

Magento2: How to override admin files

I need to add some modification on the following file so that i'm trying to overwrite the file in local vendor/magento/module-sales/view/adminhtml/templates/order/view/info.phtml to app/design/...
amith lal's user avatar
  • 790
0 votes
0 answers
76 views

What does this code do for Paypal?

I am currently trying to create a module for Magento to show if the payment method used is Paypal Express via credit card or via Paypal account. Digging through the files I come accross app/code/core/...
fja3omega's user avatar
  • 265
5 votes
1 answer
3k views

Magento 2:i18n folder to custom theme

I want to edit .csv file in module-wishlist to my custom theme. I have copied the the file from module-wishlist and copied to app/design/frontend/vendor/theme/Magento_Wishlist/i18n/en_US.csv. ...
Vindhuja's user avatar
  • 1,395
0 votes
2 answers
151 views

What are the reflects of core files changed? [closed]

I'm using different versions of the Magento 1.* and Magento 2.*, and I'd like to know how to explain to my clients what are the impacts of the core files changed. For example these bad points below, ...
Rafael Corrêa Gomes's user avatar
0 votes
1 answer
494 views

Running magento admin code in external script for import

I'm trying to import products from csv by calling an external script. I've done the same for export and this has been smooth. However, import is failing, as it doesn't seem to properly translate the ...
Alexander Gran's user avatar
0 votes
1 answer
2k views

What is override preference, block, model and preference? [duplicate]

I want to edit Magento 2 core function: /** * Build category URL path * * @param \Magento\Catalog\Api\Data\CategoryInterface|\Magento\Framework\Model\AbstractModel $category * @...
Ramesh Pardhi's user avatar
1 vote
0 answers
28 views

Is there a good program to run against the magento EE DB to analyze corruptions?

If core resource and other tables are corrupted. Common errors would be certain core functions trying to re-instantiate tables or views. I notice i get lots of errors for weird install files from ...
Head's user avatar
  • 177
0 votes
1 answer
2k views

Notice: Undefined index: files in app/code/core/Mage/Core/Model/Translate.php on line 1

Notice: Undefined index: files in /home//public_html/.com/app/code/core/Mage/Core/Model/Translate.php on line 139 #0 /home//public_html/.com/app/code/core/Mage/Core/Model/Translate.php(139): ...
Gabriel Ferreira's user avatar
5 votes
3 answers
335 views

Fatal errors are coming after i run static-content:deploy with third party theme

I am facing some strange issues in Magento 2.1.3, i have configured third party theme and working fine, once i run setup:static-content:deploy, am getting fatal errors like i added below from core ...
Krishna ijjada's user avatar
2 votes
3 answers
882 views

How to override one function from one of the core blocks class?

I need to override one function from the following file: Mage/Adminhtml/Block/Widget/Grid/Massaction/Abstract.php The function that needs to be overriden is getJavaScript(). I have tried at least ...
Domas's user avatar
  • 115
1 vote
3 answers
271 views

Injecting Model into core block module

I want to inject Model into core block module. That it's a simple thing to do in the wrong way (Editing core block). But i want to know how to do it in the right way. Because i want to retrieve User ...
Franco 's user avatar
1 vote
0 answers
605 views

Magento 2 Can Magento\Framework\Filesystem\File\Write be "preference" or "plugin"?

Tried to use preference to override it, but errors appear when running "magento setup:static-content:deploy". Then I tried to use plugin, but I found that the system did not go to my customized ...
Ricky.C's user avatar
  • 2,182
9 votes
4 answers
4k views

Magento 2 How to override vendor/magento/magento2-base/lib/web/css/source/lib/_navigation.less?

How Can I override vendor/magento/magento2-base/lib/web/css/source/lib/_navigation.less file in my custom theme ?
shankar boss's user avatar
  • 1,453
0 votes
0 answers
26 views

Magento Catalog URL Rewrites not indexing (site hosted in AWS EC2)

I have two magento sites hosted in AWS. Two different sites and two different server. Only the Catalog URL Rewrites is not indexing. Is there something i have to configure in AWS? magento v1.9.2.2 ...
nafiz ahmed's user avatar
1 vote
0 answers
773 views

Trouble with core/session Messages

I'm worked on a new project with a own theme. Everything is fine, but any messages from modules, like the newsletter subscription, doesn't show in the frontend. Take a look in the ...
DerFrey's user avatar
  • 76
-1 votes
1 answer
272 views

How to call a function from Mage_Payment_Model_Method_Abstract?

I'm trying to call a function from Mage_Payment_Model_Method_Abstract core model in a observer. How can I do?
ana.coman93's user avatar
1 vote
0 answers
98 views

Magento2 - Managing Module Activation at Store Level

Is it possible to manage activation of a Magento module at the store level. I am aware that there is a setting to Disable Modules Output at Stores -> Configuration -> ADVANCED -> Advanced -&...
Atish Goswami's user avatar
0 votes
1 answer
46 views

How can I change the template loading order?

As we all may know, when you set a template package at the admin it'll use it's default folder to provide the .xml and .phtml files. If the system doesn't find the necessary file, it will load it from ...
Mateus Neves's user avatar
2 votes
1 answer
250 views

Override a function from app/code/core/Mage/Core/functions.php file into a Custom module

Recently I came across a site which contains some modifications in app/code/core/Mage/Core/functions.php file. I would like to keep code clean and move the changes to custom module in local scope; but ...
ParekhAbhishekN's user avatar
0 votes
1 answer
168 views

When extending Mage_Tax_Helper_Data admin menu Sales>Taxes disappears

I'm trying to extend properly the core class Mage_Tax_Helper_Data with a module named "smartvat". All seem ok, my config.xml file: <?xml version="1.0"?> <config> <modules> <...
Bsinformatica's user avatar
2 votes
1 answer
701 views

How to work with strings in M2

I want to use string functions and do not depend on severs configuration in terms of overloading and default char-set. Say, when I call strtoupper($param) it should be mb_strtoupper($param, 'UTF-8')...
Amasty's user avatar
  • 6,508