Post by nasir5074 » Sat Oct 24, 2020 2:03 pm

hi,
my site is working fine on liver server, now i have download for some changes but at localhost every thing is working but when go to product page and click add to cart button it give me javascript alert and say error undefined. i don't know what is the issue please i am using journal theme, i am at window 10 with xampp install.
Image
below is my .htaccess file.

Code: Select all


Options +FollowSymlinks

# Prevent Directoy listing
Options -Indexes

# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
Order deny,allow
Deny from all
</FilesMatch>

# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/

RewriteBase /ba/
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
#RewriteCond %{QUERY_STRING} ^route=common/home$
### Additional Settings that may need to be enabled for some servers
### Uncomment the commands by removing the # sign in front of it.
### If you get an "Internal Server Error 500" after enabling any of the following settings, restore the # as this means your host doesn't allow that.

# 1. If your cart only allows you to add one item at a time, it is possible register_globals is on. This may work to disable it:
# php_flag register_globals off

# 2. If your cart has magic quotes enabled, This may work to disable it:
# php_flag magic_quotes_gpc Off

# 3. Set max upload file size. Most hosts will limit this and not allow it to be overridden but you can try
# php_value upload_max_filesize 999M

# 4. set max post size. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value post_max_size 999M

# 5. set max time script can take. uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_execution_time 200

# 6. set max time for input to be recieved. Uncomment this line if you have a lot of product options or are getting errors where forms are not saving all fields
# php_value max_input_time 200

# 7. disable open_basedir limitations
# php_admin_value open_basedir none

Attachments

Capture.PNG

Capture.PNG (129.24 KiB) Viewed 830 times

Capture.PNG

Capture.PNG (43.7 KiB) Viewed 830 times


Newbie

Posts

Joined
Thu Oct 22, 2020 5:06 pm

Post by OSWorX » Sat Oct 24, 2020 2:44 pm

Beside the fact that thise Template is not supported here, what for do you need the .htaccess on your locale instance?
And are you sure that this

Code: Select all

RewriteBase /ba/
is correct?
Have you copied all files into this subdirectory?

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by nasir5074 » Sat Oct 24, 2020 2:46 pm

yes i have download all files in this directory with name "ba", all other pages is working fine.

Newbie

Posts

Joined
Thu Oct 22, 2020 5:06 pm

Post by OSWorX » Sat Oct 24, 2020 3:13 pm

And what if you disable the SEO-URLs and the .htaccess (that's what the .htaccess is mainly for)?

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by sw!tch » Sat Oct 24, 2020 3:23 pm

Judging by the missing Font awesome icons you have CORS issues. (e.g your config is setup as https://domain.com., but you are using https://www.domain.com

Plenty of topics here how to fix.

That will also cause the undefined error when adding to cart.

Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!


Active Member

Posts

Joined
Sat Apr 28, 2012 2:32 pm
Who is online

Users browsing this forum: No registered users and 99 guests