View Single Post
  #4  
Old 12-22-2016, 04:27 AM
  acidon's Avatar 
acidon acidon is offline
 

Senior Member
  
Join Date: Feb 2008
Posts: 139
 

Default Re: Using ajax calls in template - 403 Forbidden Error

Quote:
Originally Posted by totaltec
Usually, you don't call the modules directory directly in a script. Try placing your ajaxtest.php in the root directory.

Moving ajaxtest.php to root solved the problem! Thanks a lot, sir!

Quote:
Originally Posted by cherie
This error is probably because /modules/.htaccess has "deny from all". Don't circumvent this security but call a php file outside of this directory.

Off the top of my head you may want to start with one of the Block examples like:
skin/common_files/modules/Customer_Reviews/ajax.rating.js (calls loadBlock for rating_bar)
skin/common_files/js/ajax.js (loadBlock calls get_block.php)
get_block.php
modules/Customer_Reviews/func.php (func_ajax_block_rating_bar())

Thanks for these references, already found some good bits there!
__________________
Version 4.7.6 X-cart Gold