- Priority: 0
- Status: Waiting on customer
- Theme: Alysum
-
Assigned To:
Fred
- Private: No
- Open Date: 23.01.23, 11:55
- Opened by: Riccardo Rossi
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.
Comments
I’ve been waiting all day could someone answer me please?
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
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
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
Please fill out all necessary fields in your profile https://support.promokit.eu/myprofile to access to your Back-office
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
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
Attachments:
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?
Attachments:
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
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.
Please tell me what prestashop version do you use?
We just found out a problem with version 8.0.1
1.7.8.8 Have you try to check what’s wrong with the installation I gave you access to?
Yes, we found out the error caused by Widgets module. I need access to module folder on your server to try to fix it
SFTP access added
The issue has been fixed.
Something wrong was with the menu dropdown template
SFTP access added
We currently working locally to figure out what exactly wrong and make a fix
Sorry for the inconvenience
Great! Could you please tell me what was wrong? Anyway, that was the first thing. How can I create the AMP homepage?
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
Go to AMP settings → Home page and use builder to build a page = SCREENSHOT
Attachments:
Try to reset AMP module
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.
that was cache issue. now it should be fixed
Great! Would you please tell me what have you done so I can do it in the live version of the website?
updated file is
/public_html/modules/pkelements/classes/WidgetPklanguages.php
Ok Thanks. Do you know how can I translate my Account, My Cart, and My Favourite menu items in the menu?
use our translation catalog to find where translation is https://alysum.promokit.eu/promokit/documentation/translations/
Is there some way using the theme settings to hide the sign in button when a user is logged in?
unfortunately there is no such option
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.
the issue should be fixed now, please check
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.
NEW FOUND BUG:
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.
STEPS:
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 ($)
bonus:
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
ANOTHER BUG (#2)
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.
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
@Alessio. You have another problem which is already fixed in the latest version. So please update.
@Ricardo. Please check out Sign in issue now
The issue with currency switching is also fixed
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
Attachments:
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 ¯\_(ツ)_/¯
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
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…….
on another note, isn’t there another way to fix those issues without selectively disabling the cache?
can you please confirm you modified only these two files:
./modules/pkelements/classes/WidgetPksignin.php
./modules/pkelements/src/WidgetCache.php
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!
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!
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…….
Attachments:
Strange that prestashop throws an error for its own function. It should be fixed now
Sign In link is replaced with Sigh Out if customer is logged in
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?
Attachments:
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.
You’re right. Try to check it now. The language link doesn’t display the dropdown on mobile.
Attachments:
Yes, I see. Working on a solution
Please try now, it should work
have you only modified /public_html/modules/pkelements/views/templates/_partials/headeritems/headeritem.tpl ?
can you please make me a list of the modified files? thanks
Is it possible to have a lightbox to zoom in on product photos from mobile?
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
change it to
are you sure you havent changed also alysum.js? see attached screenshot
Attachments:
Yes I modified it but restored original version
hi
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)
Attachments:
when I click there I see a login form https://take.ms/Y0VAe
I suppose the initial language and currency issue is resolved, so we can close this ticket, right?
doesnt work on mobile
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
Attachments:
another thing: on theme settings → product page, the options “recently viewed” and “product crosselling” are active, but they are not shown
(see screenshot)
Attachments:
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
sorry for the delay. We are working locally on that. Back to you with some new soon
np thank you for the ping
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.
No, sign in still doesn’t work on mobile.
Please try now once more
now language and currency is not working
OMG, working on that…
Now it works
thankyou, can you please list the files I should update?
Don’t remember exactly. I think this file was updated
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
Please give me direct link where I can se those modules
the point is that you don’t see them
they should be shown on the product page but they aren’t
Are you sure you have at least one “recently viewed” and “cross selling” product?
I dont understand
if you navigate the site, you view some product
then they should appear in the “recently viewed”
“Recently viewed” means a product which you recently viewed :) Just open few product pages and “Recently viewed” module will appear
it doesn’t
But I see it https://take.ms/PqNwF
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?
Attachments:
That’s definitely Product page → https://take.ms/Ga26d
ok so what did you do to make it work?
As I wrote you above, I just opened few products one by one, nothing more
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 ?
why is sticky header not working? see screenshot
Attachments:
Have you added sticky class to an element that you want to make sticky? → https://take.ms/S7d3v
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?
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