WordPress.org

Ready to get started?Download WordPress

Forums

WP eCommerce
Show items on certain days? (4 posts)

  1. matt6303
    Member
    Posted 10 months ago #

    Is there a way to make certain products display on say, Mondays and Tuesdays only, and not be visible the rest of the week?

    http://wordpress.org/plugins/wp-e-commerce/

  2. whitelamp
    Member
    Posted 10 months ago #

    That's a nice interesting problem.

    The simplest / quickest / cheapest way I can think of is to add a custom-meta called e.g. "visible_days" to relevant products and enter something like "YYNNNNN". Then I would write a cronjob script to run at the start of the day that would use this data to "manually" change the post_status of the product to "published" or "draft" as needed.

  3. matt6303
    Member
    Posted 10 months ago #

    Thanks, Whitelamp. I'm more of a front-end guy; do you have any guidance on what the script would look like?

  4. whitelamp
    Member
    Posted 10 months ago #

    Sure, from your point of view it would mostly look like an invoice <grin>. But seriously, any half-decent programmer should be able to write a script based on the above description. (Hint: I'm at whitelamp.com). The only question really is whether to write a "real" cronjob and fiddle with the database directly or write a "proper" plugin that uses wordpress's own cron functions and post status manipulation functions. I'd guess the second way would be more robust in the long run but possibly more expensive.

Reply

You must log in to post.

About this Plugin

About this Topic