javascript - After copy the website to a local server, "buy", "buy in one click" buttons don't work -


i have store on opencart cms, ive ceo, learn how works:). copy local webserver (macos 10.10.3, apache/2.4.10, mysql, php5.5). on local webserver site opens, can click on links - works. have problems "buy" buttons , others links open popup windows (buy in credit, buy in 1 click) - doesnt work. can make works?

when open product page, in chrome console there errors:

caroufredsel: no element found ".tabs-holder .product-holder:visible". xmlhttprequest cannot load 'http://localhost/index.php?route=product/product/review&product_id=209'. request redirected 'http://localhost/index.php?route=product/product/review&product_id=209',          disallowed cross-origin requests require preflight. xmlhttprequest cannot load 'http://localhost/index.php?route=record/record/captcham'. request redirected 'http://localhost/index.php?route=record/record/captcham', disallowed cross-origin requests require preflight. consider using 'dppx' units, in css 'dpi' means dots-per-css-inch, not  dots-per-physical-inch, not correspond actual 'dpi' of screen.  in media query expression: screen , (-webkit-min-device-pixel-ratio:  1.5), screen , (min-resolution: 144dpi) 

after click on "buy" button, add one:

xmlhttprequest cannot load 'http://localhost//index.php?route=checkout/cart/add'. request redirected 'http://localhost/index.php?route=checkout/cart/add', disallowed cross-origin requests require preflight. 

but if try open chrome in terminal options:

 open -a google\ chrome --args --disable-web-security 

there no errors when loading product page, button still doesnt work.

and there problem log in admin panel - open 'http://localhost/admin/', enter login/psw (i check many times - correct) , in reload page , ask enter login/psw again.

im beginner in web programming , maybe give little information problem - if that, please tell me else need solve problem, try find , write in comments. thanks!

ive found problem - lines in .htaccess:

rewritecond %{http_host} ^example.com  rewriterule ^(.*)$ http://www.example.com/$1 [r=301,l].  

i have change

rewritecond %{http_host} ^www\.(.+)$ [nc]  rewriterule ^(.*)$ http://%1/$1 [r=301,l]  

and works! helped find solution problem of log in admin panel. dont understand why on virtual server ok, doesnt work on local server.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -