• Priority: 0
  • Status: Closed
  • Theme: Alysum
  • Assigned To: Fred
  • Private: No
  • Open Date: 23.01.23, 11:55
  • Opened by: Riccardo Rossi
  • Closed by: Anonymous Submitter
  • Closed on:
  • Reason: Not a bug

Ticket #24197 - Language and Currency Issue when the cache is on.

I have some problems with my Prestashop site. I installed Prestashop 1.7 + Alysum theme and when I activate the cache the language and currency dropdown menus get messed up. They link to random product pages.
Other than that I don’t know how to edit the AMP page if I have the Elementor page builder active.


Riccardo Rossi 23 Jan 2023, 17:27

I’ve been waiting all day could someone answer me please?

Fred 23 Jan 2023, 17:30

Hi, Riccardo.
Please fill out all necessary fields in your profile https://support.promokit.eu/myprofile to access to your Back-office and FTP Server

Fred 23 Jan 2023, 17:31

Sorry, but we have other customers too.
Our response time is up to 48 hours, but of course we are trying to do that as soon as possible

Riccardo Rossi 23 Jan 2023, 17:36

How do I change the AMP homepage if I use Elementor for the Desktop version of the site? The AMP Homepage page doesn’t work.I followed this video(https://www.youtube.com/watch?v=V3uNf7ytaEc&t=10s) but there is no AMP homepage

Fred 23 Jan 2023, 17:37

Please fill out all necessary fields in your profile https://support.promokit.eu/myprofile to access to your Back-office

Riccardo Rossi 23 Jan 2023, 17:48

May I ask you to tell me what to check? My client doesn’t want to share logins, there is private content on his website. Thanks

Fred 23 Jan 2023, 17:55

I need to see what exactly wrong there in other case it’s hard to help.
Try to import AMP layout, see attachment, I hope that will help


amp.txt (43.5 KiB)
Riccardo Rossi 23 Jan 2023, 18:44

Here is the procedure. I go to the AMP settings I go to the homepage tab I click on edit homepage and there is no page. I installed the latest version of Alysum with its modules, but maybe installing Elementor doesn’t install the page builder that was there before. Could it be due to this?


Fred 23 Jan 2023, 18:59

It’s hard to work in in this way.
Please provide access to modules in your back office to let me see what’s going on
We are working here since 2011 and no one had any problems providing back-office access

Riccardo Rossi 24 Jan 2023, 11:12

Morning Fred! I’ve just set up a Prestashop demo for your test. I’ve installed Alyssum but the shop has an error when Asylum is active, and It is not displayed properly. I left you the logins so we can see on this demo what are the problems to solve. It’s on the same server as the main site, with the same settings.

Fred 24 Jan 2023, 18:22

Please tell me what prestashop version do you use?
We just found out a problem with version 8.0.1

Riccardo Rossi 24 Jan 2023, 18:27 Have you try to check what’s wrong with the installation I gave you access to?

Fred 24 Jan 2023, 18:39

Yes, we found out the error caused by Widgets module. I need access to module folder on your server to try to fix it

Riccardo Rossi 24 Jan 2023, 19:35

SFTP access added

Fred 24 Jan 2023, 19:56

The issue has been fixed.
Something wrong was with the menu dropdown template

Riccardo Rossi 24 Jan 2023, 20:24

SFTP access added

Fred 24 Jan 2023, 20:41

We currently working locally to figure out what exactly wrong and make a fix
Sorry for the inconvenience

Riccardo Rossi 25 Jan 2023, 09:07

Great! Could you please tell me what was wrong? Anyway, that was the first thing. How can I create the AMP homepage?

Fred 25 Jan 2023, 18:29

for some reason in the last menu item was selected header layout.
Go to AMP settings → Home page and use builder to build a page

Riccardo Rossi 25 Jan 2023, 18:34

Go to AMP settings → Home page and use builder to build a page = SCREENSHOT


Fred 25 Jan 2023, 18:36

Try to reset AMP module

Riccardo Rossi 25 Jan 2023, 18:52

Nice! Now it works! Thanks. Now the real problem: When I activate Smarty cache of Prestashop, the language top menu works strangely. If I visit a page and change the language, it sends me to the previous page in the selected language. Try doing a test to see what I mean.

Fred 25 Jan 2023, 19:27

that was cache issue. now it should be fixed

Riccardo Rossi 25 Jan 2023, 19:37

Great! Would you please tell me what have you done so I can do it in the live version of the website?

Fred 25 Jan 2023, 19:50

updated file is

Riccardo Rossi 25 Jan 2023, 20:00

Ok Thanks. Do you know how can I translate my Account, My Cart, and My Favourite menu items in the menu?

Fred 25 Jan 2023, 20:04

use our translation catalog to find where translation is https://alysum.promokit.eu/promokit/documentation/translations/

Riccardo Rossi 25 Jan 2023, 20:16

Is there some way using the theme settings to hide the sign in button when a user is logged in?

Fred 25 Jan 2023, 21:14

unfortunately there is no such option

Riccardo Rossi 26 Jan 2023, 10:11

I saw how you solved the language and cache problem. I noticed a similar thing happens for currencies as well. In practice, the currency does not change and the user’s default one remains saved in the cache. I would like caching to be turned on for the whole website, not selectively disabled for the ones that aren’t working properly.

Fred 26 Jan 2023, 19:33

the issue should be fixed now, please check

Riccardo Rossi 26 Jan 2023, 20:47

OK I saw that you “fixed” the cache on modules\pkelements\classes\WidgetPkcurrencies.php in the same way you “fixed” WidgetPklanguages.php

It seems that the problem is all over the homepage, and it is directly related to the widgets and blocks used by the “elementor” page builder.

in the homepage, with the smarty cache ON, the currency on the modules “featured, special, new” etc DOES NOT change when a different currency is selected in the above WidgetPkcurrencies widget.

1- smarty cache is ON
2- cache is cleared
3- e.g. USD ($) is selected → prices are correctly shown in US $
4- currency is changed e.g. to EUR (€)
5- prices are still shown in US ($)

6- if I navigate to a category page, I can correctly see prices correctly switched to EUR (€)
7- but if I come back to the homepage, still USD ($) (the first cached currency)

I understand that manually disabling the cache for each Elementor block that doesn’t work could do the trick, but I truly hope this is a temporary fix and you’ll actually figure out why Elementor elements are not caching correctly.

Thank you

Riccardo Rossi 26 Jan 2023, 21:00

the sign-in widget on the top right doesn’t work as intended : even if a user is logged in, it still shows the option to log in or register

I don’t think this has something to do with the cache, because it doesn’t work even with smarty cache disabled.

Alessio 27 Jan 2023, 19:25

fortunatamente non siamo gli unici ad avere numerosi problemi di cache con questo tema!Ci sta facendo impazzire il menù, con la cache attivata il menù perde totalmente la formattazione css…senza cache bene ma il sito è lentissimo

Fred 27 Jan 2023, 20:38

@Alessio. You have another problem which is already fixed in the latest version. So please update.
@Ricardo. Please check out Sign in issue now

Fred 27 Jan 2023, 21:21

The issue with currency switching is also fixed

Riccardo Rossi 27 Jan 2023, 21:34

sign in still not working as intended
please see attached screenshot

currencies seem to be OK
I will later check what you did on WidgetPkproducts.php

thank you


Riccardo Rossi 27 Jan 2023, 21:54

you know, it will be nice that, when a customer is logged in, the “sign in” link turns into “my account” or something like that ¯\_(ツ)_/¯

Fred 27 Jan 2023, 22:03

wait, but that’s not an bug at all. That widget display login form independently from the state of visitor.
As for your suggestion, that’s good idea, but we can only add it to our TODO to implement in further updates

Riccardo Rossi 27 Jan 2023, 22:06

looks kind of a bug to me

it shouldn’t be possible to log in again, or even worse, try to register if you are already logged in

the customer will be confused to see this option when not necessary

it is just standard behavior of any e-commerce website

try to think of something like that happening on Amazon or eBay…….

Riccardo Rossi 27 Jan 2023, 22:07

on another note, isn’t there another way to fix those issues without selectively disabling the cache?

Riccardo Rossi 27 Jan 2023, 22:09

can you please confirm you modified only these two files:

I see the timestamp of ./modules/pkelements/classes/WidgetPkproducts.php is different
but can’t find any changes from the original

thank you very much for your support!

Fred 27 Jan 2023, 22:13

the major update is in WidgetCache.php, the rest files can be ignored.
We will continue to work on a solution for the new issue tomorrow, today is too late
You are welcome!

Riccardo Rossi 28 Jan 2023, 00:31

bad news, that mod you made to WidgetCache.php throws a fatal error when trying to modify the homepage using the page builder (creative elements → content anywhere → edit home)
screenshot attached

this on the production server, which has a bit more content than the demo site you are working on
for the time being i’ll comment out that line when editing the home, but still…….


Fred 28 Jan 2023, 12:33

Strange that prestashop throws an error for its own function. It should be fixed now

Fred 28 Jan 2023, 12:59

Sign In link is replaced with Sigh Out if customer is logged in

Riccardo Rossi 02 Feb 2023, 11:39

Hello, again Fred. I found a couple more things to fix: From mobile, the dropdown menu of languages and currencies doesn’t work.
Also by scanning with Google Insight I found that the theme uses jQuery 1.10.3. Don’t you think it’s a bit old version? Can I add a newer version or will the website break?


Fred 02 Feb 2023, 17:15

I don’t see the languages on your website https://take.ms/9Uv1W

As for the jQuery, that’s default version for Prestashop. The theme itself doesn’t bring any jQuery library to your website.

Riccardo Rossi 06 Feb 2023, 17:35

You’re right. Try to check it now. The language link doesn’t display the dropdown on mobile.


Fred 06 Feb 2023, 18:12

Yes, I see. Working on a solution

Fred 06 Feb 2023, 23:44

Please try now, it should work

Riccardo Rossi 07 Feb 2023, 13:12

have you only modified /public_html/modules/pkelements/views/templates/_partials/headeritems/headeritem.tpl ?

Riccardo Rossi 07 Feb 2023, 14:08

can you please make me a list of the modified files? thanks

Riccardo Rossi 07 Feb 2023, 14:50

Is it possible to have a lightbox to zoom in on product photos from mobile?

Fred 07 Feb 2023, 18:15

1. Yes, that’s only one modified file
2. You can enable it in there file themes/alysum/assets/js/pages/product.js
find the line

const disableMobileInnnerZoom = true;

change it to

const disableMobileInnnerZoom = false;
Riccardo Rossi 07 Feb 2023, 19:15

are you sure you havent changed also alysum.js? see attached screenshot


1111.jpg (25.3 KiB)
Fred 07 Feb 2023, 19:18

Yes I modified it but restored original version

Riccardo Rossi 07 Feb 2023, 19:44

the sign in link near currency and languages doesnt work now

from content anywhere builder I changed the behavior from sidebar to link (see screenshot attached)

Fred 07 Feb 2023, 20:30

when I click there I see a login form https://take.ms/Y0VAe

Fred 07 Feb 2023, 20:31

I suppose the initial language and currency issue is resolved, so we can close this ticket, right?

Riccardo Rossi 07 Feb 2023, 20:31

doesnt work on mobile

Riccardo Rossi 08 Feb 2023, 13:38

also, how do I translate this string “your email address”?
It’s from the newsletter subscription widget on the footer (see screenshot attached)

the file has to be public_html\modules\pkelements\views\templates\pknewsletter.tpl

and the domain d=’Modules.Pkelements.Pknewsletter’

thank you


Riccardo Rossi 08 Feb 2023, 14:35

another thing: on theme settings → product page, the options “recently viewed” and “product crosselling” are active, but they are not shown
(see screenshot)


Riccardo Rossi 09 Feb 2023, 09:05

yo, it’s almost 2 days now.

quick reminder:
1) sign in not working on mobile
2) can’t translate “your email address” on newsletter subscription pkelements widget
3) recently viewed and cross selling not working

If you want I can open 3 new tickets, as you like

thank you

Fred 09 Feb 2023, 09:13

sorry for the delay. We are working locally on that. Back to you with some new soon

Riccardo Rossi 09 Feb 2023, 09:13

np thank you for the ping

Fred 09 Feb 2023, 22:46

sign in is fixed
As for the translations, I need to know are the FTP credentials correct? Because I edit newsletter files but nothing changed in the front page. Cache was cleared.

Riccardo Rossi 10 Feb 2023, 11:24

No, sign in still doesn’t work on mobile.

Fred 10 Feb 2023, 21:44

Please try now once more

Riccardo Rossi 10 Feb 2023, 21:47

now language and currency is not working

Fred 10 Feb 2023, 21:53

OMG, working on that…

Fred 11 Feb 2023, 20:54

Now it works

Riccardo Rossi 13 Feb 2023, 12:54

thankyou, can you please list the files I should update?

Fred 13 Feb 2023, 17:22

Don’t remember exactly. I think this file was updated

Riccardo Rossi 13 Feb 2023, 18:06

OK ill try to figure it out.

Did you fix the other issues too?

3) recently viewed and cross selling not working

this is the most important

Fred 13 Feb 2023, 18:09

Please give me direct link where I can se those modules

Riccardo Rossi 13 Feb 2023, 18:11

the point is that you don’t see them
they should be shown on the product page but they aren’t

Fred 13 Feb 2023, 18:36

Are you sure you have at least one “recently viewed” and “cross selling” product?

Riccardo Rossi 13 Feb 2023, 18:38

I dont understand

if you navigate the site, you view some product

then they should appear in the “recently viewed”

Fred 13 Feb 2023, 18:42

“Recently viewed” means a product which you recently viewed :) Just open few product pages and “Recently viewed” module will appear

Riccardo Rossi 13 Feb 2023, 18:43

it doesn’t

Fred 13 Feb 2023, 18:44

But I see it https://take.ms/PqNwF

Riccardo Rossi 13 Feb 2023, 18:48

that’s not a product page

it doesn’t work in the product page

please see screenshot

also, can I remove the console log from the javascript? console.log(href)
I believe that was for debugging?


Fred 13 Feb 2023, 18:52

That’s definitely Product page → https://take.ms/Ga26d

Riccardo Rossi 13 Feb 2023, 18:54

ok so what did you do to make it work?

Fred 13 Feb 2023, 18:55

As I wrote you above, I just opened few products one by one, nothing more

Riccardo Rossi 13 Feb 2023, 18:56

oh well, it’s not working on my production site
I’ll try figure it out by myself then….

so for the pk elements newsletter should I just modify the translations’s domain ?

Riccardo Rossi 13 Feb 2023, 19:06

why is sticky header not working? see screenshot


Fred 13 Feb 2023, 23:02

Have you added sticky class to an element that you want to make sticky? → https://take.ms/S7d3v

Riccardo Rossi 18 Feb 2023, 09:07

Hello Fred,
have you managed to fix this issue:

2) can’t translate “your email address” on newsletter subscription pkelements widget

FTP credentials are correct.

I have also tried to change the translation scope to Modules.Pkelements.Shop
The string appears in the translations but it is not picked up in the tpl

Perhaps a javascript interfering?

Fred 18 Feb 2023, 10:31

I see now.
You can change the text in the footer template (Creative Elements → Saved Templates → Alysum Footer)
How to have multi language templates see in the documentation https://alysum.promokit.eu/promokit/documentation/#page_builder