Jump to content

DaveP

Members
  • Posts

    868
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by DaveP

  1. You have a few peculiar selectors in there. I'm not sure what you are trying to do but it looks to me like there is some confusion between $pages and $page, and between get() and find().

    $pages is all the published (and not hidden) pages in the site (that the current user can view).

    $page is the current page only.

    get($selector) will return the first one item matching $selector.

    find($selector) will return all items matching $selector.

    Take a look at http://cheatsheet.processwire.com/ 

    • Like 2
  2. I think you'd be safe to comment all that section out.

    # -----------------------------------------------------------------------------------------------
    # 1. Don't show directory indexes, but do follow symbolic links 
    # 500 NOTE: Some cloud hosting companies don't allow +FollowSymLinks. 
    # Uncomment +SymLinksifOwnerMatch and comment +FollowSymLinks if you have 500 errors. 
    # If that doesn't resolve the error, then set it back to +FollowSymLinks. 
    # -----------------------------------------------------------------------------------------------
    
    # Options -Indexes
    # Options +FollowSymLinks
    # Options +SymLinksifOwnerMatch

    Worst that can happen? Still doesn't work.

  3. Welcome to the forums.

    As first questions go, that's a doozy. And I'm not even going to try for a definitive answer, but let's just think out loud a bit.

    2 hours ago, lickny2001 said:

    json api calls directly to the data

    I like the sound of this. Once you've got your initial structure could you maybe query individual products on page load? (You probably wouldn't want to do this on every page load, just after a certain time since the last call, kind of like a cache.) Then return the info or an 'out of stock' or 'discontinued' message. That saves deleting pages and preserves any link juice that individual products might have garnered over time. You could also set up some kind of alternative product suggestion for those pages ('We're sorry, but X is no longer available, what about Y?') - good for internal linking and keeping visitors on-site, then after a period (6 months or a year maybe) turning that suggestion into a 301.

    Is it possible to ask the host system just for new or updated records? Either way, a cron or lazy cron is probably going to be involved. The good news is that iterating over all 600 or so records isn't going to take forever, even if that is the only way forward.

    2 hours ago, lickny2001 said:

    I’m not sure i can build it

    Break it down into bite sized chunks. Solve one small aspect at a time.

    Not a complete answer, I know, but I'm sure others will chime in.

    • Like 1
×
×
  • Create New...