prestaKar Posted 18 hours ago Share Posted 18 hours ago To simply put I created this code in the screen. The new error notification in cart appears, but only in english, which i thought would not be a problem. However after browsing through every translation (backoffice, page, module, etc) I could not find this changed string to translate. Of course i cleared cache, then even deleted cache folder. But nothing. I tried chcecking out the translation/pl-pl/ShopNotificationsError.pl-PL.xlf file, but there is nothing there, instead there is one that was before i changed the code. I would appricate help, or a little step by step tutorial how should it be done Link to comment Share on other sites More sharing options...
endriu107 Posted 16 hours ago Share Posted 16 hours ago Where you add this code? In module files? Link to comment Share on other sites More sharing options...
prestaKar Posted 16 hours ago Author Share Posted 16 hours ago (edited) 4 minutes ago, endriu107 said: Where you add this code? In module files? Inside the %domain-name%/controllers/front/CartController.php I know i should create override, but when i followed other tutorials it didnt work. meanwhile here it worked instantly. However now i have issue with translation. I basically just changed that string, and added [... , %product% => $productName, ...] Edited 15 hours ago by prestaKar (see edit history) Link to comment Share on other sites More sharing options...
endriu107 Posted 14 hours ago Share Posted 14 hours ago Ok, I just check it and have same issue. You can add manually this string to translation/default/ShopNotificationsError.xlf after: <file original="controllers/front/CartController.php" source-language="en-US" target-language="en" datatype="plaintext"> <body> If you still have issue with override file you need to create file in override/controllers/front/CartControllers.php <?php class CartController extends CartControllerCore { protected function processChangeProductInCart(): void { //Here all code from this method } } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now