This tutorial will show you how to change add to cart ‘Success’ message in OpenCart 2.x. templates.
In order to change add to cart ‘Success’ message, you should perform the following steps:
First of all, navigate to your File Manager and open /catalog/language/english/checkout directory.
Select the cart.php file and open it for making changes in a code editor or use Code Edit button:
Here you can find such lines of code, which are responsible for messages in the cart section:
$_['text_success'] = 'Success: You have added <a href="%s">%s</a> to your <a href="%s">shopping cart</a>!';
Please don’t delete or change “%s” codes.
In order to change ‘Success’ message, simply replace existing text with the new one and press Save button.
After this, please open your OpenCart Dashboard, navigate to Extensions -> Modifications and click Refresh button on the top right:
Go back to your website and refresh the page with text that you have changed. Now we can see that editing was successful.
Feel free to check the detailed video tutorial below: