[Skip to main content](#vessel-content)

#   Translation of the notification of when adding a product to the shopping cart

##

- **[zetap](/forum/user/44792-zetap "View zetap's Profile")**
- [![zetap's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/44792-zetap "View zetap's Profile") Topic Author
- [ Offline](/forum/user/44792-zetap)

Less More

- Posts: 127
- Thank you received: 3
-
-

6 years 5 months ago [\#319249](#319249) by [zetap](/forum/user/44792-zetap "View zetap's Profile")  *[Translation of the notification of when adding a product to the shopping cart](/forum/25-install-update/899893-translation-of-the-notification-of-when-adding-a-product-to-the-shopping-cart#319249 "-- url of the page with the problem -- :   www.abierto.uy  -- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18  Hello  I need to translate the message text when a product is added to the shopping cart. I have verified the translation files and the translation is correct in the Spanish language file, I have even changed the label of the English idiona file to Spanish, but the text continues showing in English. Will the text be coded in the code?  Thank you !")* was created by *[zetap](/forum/user/44792-zetap "View zetap's Profile")*

-- url of the page with the problem -- : [ www.abierto.uy](https://www.abierto.uy)
-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.18

Hello

I need to translate the message text when a product is added to the shopping cart. I have verified the translation files and the translation is correct in the Spanish language file, I have even changed the label of the English idiona file to Spanish, but the text continues showing in English.
Will the text be coded in the code?

Thank you !

- [ ![ScreenShot2020-05-16at3.05.17PM.png](/forum/attachment/49406) ](/forum/attachment/49406 "...t3.05.17PM.png") [ ](/forum/attachment/49406?download=1 "...t3.05.17PM.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg5OTg5My10cmFuc2xhdGlvbi1vZi10aGUtbm90aWZpY2F0aW9uLW9mLXdoZW4tYWRkaW5nLWEtcHJvZHVjdC10by10aGUtc2hvcHBpbmctY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

6 years 5 months ago [\#319252](#319252) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Translation of the notification of when adding a product to the shopping cart](/forum/25-install-update/899893-translation-of-the-notification-of-when-adding-a-product-to-the-shopping-cart#319252 "-- url of the page with the problem -- :   www.abierto.uy  -- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18  Hello  I need to translate the message text when a product is added to the shopping cart. I have verified the translation files and the translation is correct in the Spanish language file, I have even changed the label of the English idiona file to Spanish, but the text continues showing in English. Will the text be coded in the code?  Thank you !")*

Hi,

The issue is that you have added some javascript code on your pages which generates a javascript error when the page is loaded: Code:

$("a.hikacart").on("click",function(){ //Evento a colocar en Botones 'Añadir a tu pedido' gtag('event', 'añadir_carrito', {'event_category' : 'engagement','event_label' : 'añadir_carrito'}); });

[ monosnap.com/file/hjjuDNUc29ANI1Z4CVEBf6tFT7C0AX](https://monosnap.com/file/hjjuDNUc29ANI1Z4CVEBf6tFT7C0AX)
[ monosnap.com/file/IJIFMzQb4cVf6N8QrCbB60mkcTj20T](https://monosnap.com/file/IJIFMzQb4cVf6N8QrCbB60mkcTj20T)
That error apparently happens because of a jquery conflict.

Because of that, the javascript code to initialize the messages of the cart notification box is not run by the browser (you can see it just after your code, with your translations), and thus the system falls back to the English translation which is hard coded as a fallback mechanism when there is a javascript error on the page.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg5OTg5My10cmFuc2xhdGlvbi1vZi10aGUtbm90aWZpY2F0aW9uLW9mLXdoZW4tYWRkaW5nLWEtcHJvZHVjdC10by10aGUtc2hvcHBpbmctY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[zetap](/forum/user/44792-zetap "View zetap's Profile")**
- [![zetap's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/44792-zetap "View zetap's Profile") Topic Author
- [ Offline](/forum/user/44792-zetap)

Less More

- Posts: 127
- Thank you received: 3
-
-

6 years 5 months ago [\#319300](#319300) by [zetap](/forum/user/44792-zetap "View zetap's Profile")  Replied by *[zetap](/forum/user/44792-zetap "View zetap's Profile")* on topic *[Translation of the notification of when adding a product to the shopping cart](/forum/25-install-update/899893-translation-of-the-notification-of-when-adding-a-product-to-the-shopping-cart#319300 "-- url of the page with the problem -- :   www.abierto.uy  -- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18  Hello  I need to translate the message text when a product is added to the shopping cart. I have verified the translation files and the translation is correct in the Spanish language file, I have even changed the label of the English idiona file to Spanish, but the text continues showing in English. Will the text be coded in the code?  Thank you !")*

Hello, thanks for the answer

If I understand perfectly, this is related to another post that I have published here.
I need to configure the events for google analytics, to be able to track the clicks that the user makes on the site, how many they buy after adding the products to the shopping cart, where in the buying process they leave, etc.

Maybe you can tell me in which file is the code for the "add to cart" button, and in this way integrate the JS code for analytics into it.

Thank you !

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg5OTg5My10cmFuc2xhdGlvbi1vZi10aGUtbm90aWZpY2F0aW9uLW9mLXdoZW4tYWRkaW5nLWEtcHJvZHVjdC10by10aGUtc2hvcHBpbmctY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

6 years 5 months ago [\#319303](#319303) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Translation of the notification of when adding a product to the shopping cart](/forum/25-install-update/899893-translation-of-the-notification-of-when-adding-a-product-to-the-shopping-cart#319303 "-- url of the page with the problem -- :   www.abierto.uy  -- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18  Hello  I need to translate the message text when a product is added to the shopping cart. I have verified the translation files and the translation is correct in the Spanish language file, I have even changed the label of the English idiona file to Spanish, but the text continues showing in English. Will the text be coded in the code?  Thank you !")*

Hi,

The JS code for the add to cart buttons is in media/com_hikashop/hikashop.js in the "addToCart" function.

However, the best is to do it like that: Code:

if(window.Oby) { window.Oby.registerAjax(["cart.updated"],function(params){ gtag('event', 'añadir_carrito', {'event_category' : 'engagement','event_label' : 'añadir_carrito'}); }); }

That way, you'll trigger the Google Analytics event without even needing jQuery. And what's even better is that it will only trigger if the add to cart process works. If it doesn't, because the customer is asking to add more quantity in the cart than what's available in the stock for example, it won't trigger the event.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg5OTg5My10cmFuc2xhdGlvbi1vZi10aGUtbm90aWZpY2F0aW9uLW9mLXdoZW4tYWRkaW5nLWEtcHJvZHVjdC10by10aGUtc2hvcHBpbmctY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[zetap](/forum/user/44792-zetap "View zetap's Profile")**
- [![zetap's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/44792-zetap "View zetap's Profile") Topic Author
- [ Offline](/forum/user/44792-zetap)

Less More

- Posts: 127
- Thank you received: 3
-
-

6 years 5 months ago [\#319341](#319341) by [zetap](/forum/user/44792-zetap "View zetap's Profile")  Replied by *[zetap](/forum/user/44792-zetap "View zetap's Profile")* on topic *[Translation of the notification of when adding a product to the shopping cart](/forum/25-install-update/899893-translation-of-the-notification-of-when-adding-a-product-to-the-shopping-cart#319341 "-- url of the page with the problem -- :   www.abierto.uy  -- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18  Hello  I need to translate the message text when a product is added to the shopping cart. I have verified the translation files and the translation is correct in the Spanish language file, I have even changed the label of the English idiona file to Spanish, but the text continues showing in English. Will the text be coded in the code?  Thank you !")*

Hello, thanks for the answer

Perfect, that is a great help for me. But given my little experience with JS, I make you one more query, this code that you send me, I add it in media/com_hikashop/hikashop.js in the "addToCart" function or as a new function independently?

Thank you !

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg5OTg5My10cmFuc2xhdGlvbi1vZi10aGUtbm90aWZpY2F0aW9uLW9mLXdoZW4tYWRkaW5nLWEtcHJvZHVjdC10by10aGUtc2hvcHBpbmctY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

6 years 5 months ago [\#319347](#319347) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Translation of the notification of when adding a product to the shopping cart](/forum/25-install-update/899893-translation-of-the-notification-of-when-adding-a-product-to-the-shopping-cart#319347 "-- url of the page with the problem -- :   www.abierto.uy  -- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18  Hello  I need to translate the message text when a product is added to the shopping cart. I have verified the translation files and the translation is correct in the Spanish language file, I have even changed the label of the English idiona file to Spanish, but the text continues showing in English. Will the text be coded in the code?  Thank you !")*

Hi,

No, you want to add it elsewhere. Where you had added your previous code for example.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg5OTg5My10cmFuc2xhdGlvbi1vZi10aGUtbm90aWZpY2F0aW9uLW9mLXdoZW4tYWRkaW5nLWEtcHJvZHVjdC10by10aGUtc2hvcHBpbmctY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[zetap](/forum/user/44792-zetap "View zetap's Profile")**
- [![zetap's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/44792-zetap "View zetap's Profile") Topic Author
- [ Offline](/forum/user/44792-zetap)

Less More

- Posts: 127
- Thank you received: 3
-
-

6 years 5 months ago [\#319491](#319491) by [zetap](/forum/user/44792-zetap "View zetap's Profile")  Replied by *[zetap](/forum/user/44792-zetap "View zetap's Profile")* on topic *[Translation of the notification of when adding a product to the shopping cart](/forum/25-install-update/899893-translation-of-the-notification-of-when-adding-a-product-to-the-shopping-cart#319491 "-- url of the page with the problem -- :   www.abierto.uy  -- HikaShop version -- : 4.3.0 -- Joomla version -- : 3.9.18  Hello  I need to translate the message text when a product is added to the shopping cart. I have verified the translation files and the translation is correct in the Spanish language file, I have even changed the label of the English idiona file to Spanish, but the text continues showing in English. Will the text be coded in the code?  Thank you !")*

Hello, the tracking of the "add to cart" button works perfectly.

Many thanks, greetings!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL2luc3RhbGwtdXBkYXRlLzg5OTg5My10cmFuc2xhdGlvbi1vZi10aGUtbm90aWZpY2F0aW9uLW9mLXdoZW4tYWRkaW5nLWEtcHJvZHVjdC10by10aGUtc2hvcHBpbmctY2FydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.265 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
