How to create notification bar in prestashop

J&A

New member
XNullUser
Joined
Jun 24, 2022
Messages
2
Reaction score
0
Points
1
NullCash
8
How to create notification bar

Read this guide carefully, you have to follow all steps described below. What we will do? We will modify 3 files: header.tpl (your theme file), ajax-cart.js file (a part of blockcart module) and your store global stylesheet file (global.css). So, we can start, let's go ;)



1. header.tpl file modification

In this step we have to define "Product successfully added to cart" message. We must give possibility to translate this message due to the fact, that today many of stores uses many languages. In this case in header.tpl file located in your theme directory add this simple code:

1var addtocartconfirmation = '{l s='Product successfully added to cart'}';
to the script with javascript variables definition, like i show below:
 

moonfire

Well-known member
Diamond
Elite
XNullUser
Joined
May 3, 2021
Messages
941
Reaction score
308
Points
63
NullCash
1,223
How to create notification bar
Thanks for contributing, but I think you missed to include some info.
And please use the full path of files to edit, like /themes/YOUR-THEME/templates/_partials/headers.tpl
 

freiserk

Well-known member
☆☆ Special ☆☆
☆ Pro ☆
Master
Joined
Jan 24, 2019
Messages
3,512
Reaction score
6,567
Points
113
NullCash
32,621
Top