Viewing 3 replies - 1 through 3 (of 3 total)
  • Yes. I can point you in the right direction, but obviously you’re talking custom coding in the end.. ??

    The easiest approach would be to look at the various, past, examples for making calls to show a “now reading” type list in the sidebar (I think there’s at least one in the documentation, actually — if not, search here). Make three calls, one for each ‘category’ you’ve set up. tweak the output to your liking. ??

    The more complex approach would be to do something like the cga-index.php sample code does: run the more complex query yourself, say all products ordered by category, and then generate completely customized HTML via PHP on the resulting array of data. That’s more tricky, but more flexible too.

    Feel free to ping if you need more details/direction. I don’t always catch stuff here (have I complained enough about the lack of email notifiers in bbpress?!?!), but if you use my contact form, or post a (always-moderated) response to the PowerPack post on my site, I’ll get back to you. ??

    Oh, I should have added that either way you can use the per-entry ‘custom’ data to store the link to the book/movie site, so it’s all in the CGA table. The more complex way would give you more formatting control (since you control all of the output!), and would also let you display the ‘more info’ pages within your site if you wanted.

    -d

    Thread Starter mckendall

    (@mckendall)

    I’m feeling sorta dumb here. I’ve used this plugin in my sidebar at https://blog.treeswing.net/.

    Here’s the code I’m using:

    <h2>In Rotation</h2>
    <?php show_amazon_items(2, 'time', true, "Music"); ?>

    <h2>On The Big Screen</h2>
    <?php show_amazon_items(2, 'time', true, "Movies"); ?>

    This is crystal clear to me.

    Now, how I would go about using this for an archive page escapes me. I could could bump up the number for $count to something like 50, but that would put everthing on 1 page. Would you mind pointing me in the right direction?

    Thanks

    Actually, yes, that’s exactly how I’d do it. Bump count up to something reasonably high, that should grab everything. Just make a custom page template (lots of examples here or in the wiki), put php code like the sidebar (but tweak CGA setting at the start of the page, like showing product graphics, prices, etc., which you might not want on sidebar), and you have something like your link above shows.

    If you want more ‘paged’ results, i.e. a ‘mini amazon’ listing, the cgaindex.php sample code is really the only way to do that. cgaindex.php code is actually quite similar to the cga-admin.php administration page code — which also would be helpful.

    If you’re not a programmer-type, the former, un-paged, is the way to go. Just keep your custom-tag usage in each ‘category’ to a limit, so you don’t have a few hundred entries per category you want to display in that ‘archive’ page. ??

    The next release of CG-Amazon (which may have a new name, as I’m looking to support more than Amazon in the future…) will include a page template and plugin support for quickly setting up your own ‘mini-amazon’ without the heavy lifting — basically, I’ve turned the ‘sample’ in the current release into a full-fledged plugin+template, even with custom nice-permalink URL support. That version I may start moving to a ‘licensed’ release as my support costs in one month easily outstrip an entire year of my ‘20% of links’ redirect earnings… ?? Hopefully just for commercial/money-making sites.

    -d

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘CG-Amazon Archive Pages’ is closed to new replies.