Thread: ajax question

Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2012
    Posts
    5
    Plugin Contributions
    0

    Default ajax question

    I'm using AJAX for infinite scrolling with zen cart.

    Here is a code snippet:

    Code:
    <script type="text/javascript">
    		$(window).scroll(function(){
    		    if($(window).scrollTop() == $(document).height() - $(window).height()){
    		    	$('div#loadmoreajaxloader').show();
    		    	
    				$.ajax({
    					cache: false,
    					url: 'loadmore.php',
    					success: function(html){
    etc.

    I was wondering where I should store the file 'loadmore.php' that basically echo's out my additional pages of data.

    thanks!

  2. #2
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Infinite Scroll Ajax

    You'll need to store it in your store's root folder. ie: where your main index.php file is located.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Jul 2012
    Posts
    5
    Plugin Contributions
    0

    Default Re: Infinite Scroll Ajax

    Hi, Thank you for the response.

    Is it possible to store the file in the includes folder? When I reference this file in the includes folder, the ajax call doesn't seem to work.

    Thanks,

    James

  4. #4
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Infinite Scroll Ajax

    Simple answer: no. External calls are prohibited to PHP files in the /includes/ folder, for security reasons.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Nov 2008
    Posts
    24
    Plugin Contributions
    0

    Default Re: Infinite Scroll Ajax

    I'm very interested in implementing this as well :) Have you had any luck?

  6. #6
    Join Date
    Aug 2009
    Location
    Bellac, France
    Posts
    7
    Plugin Contributions
    0

    Default Re: Infinite Scroll Ajax

    Quote Originally Posted by sephiroth View Post
    I'm very interested in implementing this as well :) Have you had any luck?
    Hi did you manage to get this working?


    cheers

    Alex

  7. #7
    Join Date
    Dec 2008
    Location
    San Fran
    Posts
    382
    Plugin Contributions
    0

    Default Re: Infinite Scroll Ajax

    Could you please share more information about this? I'm very interested too!

 

 

Similar Threads

  1. v151 AJAX Image Swapper plugin Compatibility question
    By Kevin205 in forum General Questions
    Replies: 0
    Last Post: 8 Jan 2013, 02:55 AM
  2. Question about writing AJAX Shopping Cart buttons
    By skrillnet in forum Contribution-Writing Guidelines
    Replies: 10
    Last Post: 27 Feb 2012, 03:33 PM
  3. AJAX Session Question
    By Davos in forum General Questions
    Replies: 0
    Last Post: 22 Feb 2011, 08:16 PM
  4. Ajax store
    By silenceway in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 13 Apr 2008, 02:57 PM
  5. Incorporating AJAX
    By andy1234 in forum General Questions
    Replies: 5
    Last Post: 3 Jan 2008, 01:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg