Ehsanai Posted August 21, 2022 Share Posted August 21, 2022 Hi, I have an issue on 1.7.8.5 an PHP 7.4. When I click on add to cart, I get undefined alert and product will add to cart. https://prnt.sc/2Hufhr51VXyr And on products that have attribute after selecting another attribute it still on loading and after click on add to cart the selected attribute will add to cart https://prnt.sc/3kHgzYyPrWuo Link to comment Share on other sites More sharing options...
ComGrafPL Posted August 21, 2022 Share Posted August 21, 2022 (edited) Have you updated store recently? Any new modules, changes before that issues came? Debug shows any errors? Edited August 21, 2022 by ComGrafPL (see edit history) Link to comment Share on other sites More sharing options...
endriu107 Posted August 21, 2022 Share Posted August 21, 2022 In this case your theme or module used in this place try reach some data in javascript but this data doesn't exist that why you see "undefined". I think you should contact with theme developer or module developer if this is from module. Link to comment Share on other sites More sharing options...
Ehsanai Posted September 4, 2022 Author Share Posted September 4, 2022 It was for .htaccess edit and I change it to default and problem solved. Link to comment Share on other sites More sharing options...
Anurag18op Posted September 5, 2023 Share Posted September 5, 2023 On 9/4/2022 at 7:56 AM, Ehsanai said: It was for .htaccess edit and I change it to default and problem solved. Hello , From my site , For inactive products showing this undefined error after selecting attributes So please shared What i need to changes in .htaccess file for solving this issue, Please help me , I'm stuck at this moment. Link to comment Share on other sites More sharing options...
gaspermarek Posted October 13, 2023 Share Posted October 13, 2023 Solution for those who use only nginx as webserver and multi-language site..My fix was to add few rewrite rules to my nginx vhost (I used default cloudpanel vhost for prestashop 1.7 and installation of Prestashop 8). My addition is in quotes. (solution found here https://github.com/PrestaShop/PrestaShop/pull/12082/files#diff-b115851dfa6156b9d45986fb7d75c601R103) server { listen 80; listen [::]:80; listen 443 ssl http2; listen [::]:443 ssl http2; {{ssl_certificate_key}} {{ssl_certificate}} server_name eshop.xxxxxxxxx.com; {{root}} large_client_header_buffers 4 32k; {{nginx_access_log}} {{nginx_error_log}} #if ($scheme != "https") { # rewrite ^ https://$host$uri permanent; #} location ~ /.well-known { auth_basic off; allow all; } {{settings}} location /adminprodxxxx/ { try_files $uri $uri/ /adminprodxxxx/index.php?$args; } Quote rewrite ^/sk$ /sk/ redirect; rewrite ^/sk/(.*) /$1; rewrite ^/cs$ /cs/ redirect; rewrite ^/cs/(.*) /$1; rewrite ^/(\d)(-[\w-]+)?/.+\.jpg$ /img/p/$1/$1$2.jpg last; rewrite ^/(\d)(\d)(-[\w-]+)?/.+\.jpg$ /img/p/$1/$2/$1$2$3.jpg last; rewrite ^/(\d)(\d)(\d)(-[\w-]+)?/.+\.jpg$ /img/p/$1/$2/$3/$1$2$3$4.jpg last; rewrite ^/(\d)(\d)(\d)(\d)(-[\w-]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5.jpg last; rewrite ^/(\d)(\d)(\d)(\d)(\d)(-[\w-]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6.jpg last; rewrite ^/(\d)(\d)(\d)(\d)(\d)(\d)(-[\w-]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7.jpg last; rewrite ^/(\d)(\d)(\d)(\d)(\d)(\d)(\d)(-[\w-]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8.jpg last; rewrite ^/(\d)(\d)(\d)(\d)(\d)(\d)(\d)(\d)(-[\w-]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9.jpg last; rewrite ^/c/([\w.-]+)/.+\.jpg$ /img/c/$1.jpg last; rewrite ^images_ie/?([^/]+)\.(gif|jpe?g|png)$ js/jquery/plugins/fancybox/images/$1.$2 last; rewrite ^/api/?(.*)$ /webservice/dispatcher.php?url=$1 last; rewrite ^(/install(?:-dev)?/sandbox)/.* /$1/test.php last; try_files $uri $uri/ /index.php?$args; index index.php index.html; location ~ \.php$ { include fastcgi_params; fastcgi_intercept_errors on; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; try_files $uri =404; fastcgi_read_timeout 3600; fastcgi_send_timeout 3600; fastcgi_param HTTPS $fastcgi_https; fastcgi_pass 127.0.0.1:{{php_fpm_port}}; fastcgi_param PHP_VALUE "{{php_settings}}"; } location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|woff2|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ { add_header Access-Control-Allow-Origin "*"; add_header Access-Control-Allow-Methods "GET, POST, OPTIONS"; expires max; access_log off; } if (-f $request_filename) { break; } } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now