Timeline for Magento 2 - What is the proper way to edit core file?
Current License: CC BY-SA 4.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 5, 2020 at 5:52 | comment | added | zus | After enabling the module, if i try to add product to add-to-cart i am getting following error, Invalid block type: Magento\Paypal\Block\Express\InContext\Minicart\SmartButton How to solve the error? | |
Nov 3, 2020 at 11:58 | comment | added | zus | FYI - PHP Parse error: syntax error, unexpected 'StoreManagerInterface' (T_STRING), e xpecting function (T_FUNCTION) or const (T_CONST) in /var/www/html/test/app/c ode/Gta/PayPalPreference/Model/Api/Nvp.php on line 13 | |
Nov 3, 2020 at 10:47 | comment | added | zus | Let us continue this discussion in chat. | |
Nov 3, 2020 at 10:42 | comment | added | Kristoffer | I edited the post above | |
Nov 3, 2020 at 10:41 | history | edited | Kristoffer | CC BY-SA 4.0 |
added 2861 characters in body
|
Nov 3, 2020 at 10:33 | comment | added | zus | Last one, thanks for your patience. Here i am using Multi-Website, both website i am using PayPal. Website 1 for USA Paypal working good, website 2 for Australia here only i am facing the PayPal issue, What should i do here, shall i add website filter in this condition, pls guide me. thank you. | |
Nov 3, 2020 at 10:31 | comment | added | Kristoffer | sure, no problems. In my code above I implemented only one function. The other __construct is a constructor which Magento will need to make the extending work when the classes are initiated by the object manager | |
Nov 3, 2020 at 10:28 | comment | added | zus | Thank you, for my clarity shall we extend two functions in the above condition? | |
Nov 3, 2020 at 10:27 | comment | added | Kristoffer | Yes, if you want to override one function you only have to extend the class as I did above and only implement the function you want to change | |
Nov 3, 2020 at 10:25 | comment | added | zus | For my clarity, we can overwrite the function only instead of overwriting the whole code right? My Path: app/code/Magento/Paypal/Model/Api/Nvp.php My code: paste.ofcode.org/3bS9xNEMCPgj8NbFhTuEKC9 search function _applyStreetAndRegionWorkarounds | |
Nov 3, 2020 at 10:14 | history | answered | Kristoffer | CC BY-SA 4.0 |