- 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.