Auto Expire Conflicts with Cartthrob (or possibly a general EE/ plugin issue)

James's Avatar

James

25 Jan, 2012 04:54 PM

Hello,

After loads of testing with Carthrob (thought it was an issue with CT) it seems that when auto expire changes a status it somehow and i'm not sure why at all it does but it stops entries being outputted via a normal EE tag whatever status you have it as in the CP and even with status="open|closed|custom1|custom2" in the channel tag nothing will be displayed.

I've not had a chance to test on non CT plugin of EE setup so this could be auto expire just not working or stopping entries being shown, can you test?

All i can 100% is that my purchased_items channel entries (used by CT) will not output after auto expire has triggered changing from one custom status to another (paid -> Expired).

All
I'm doing then is using channel output to show an expired message for entries with 'Expired' as there status. This works fine if i change an entries status via CP with edit. Even with basic exp:channel:entries output is stopped.

Regards,

James

  1. Support Staff 1 Posted by Wouter Vervloet on 25 Jan, 2012 08:16 PM

    Wouter Vervloet's Avatar

    Hi James,

    I'm not really sure why Auto Expire would cause your entries not to be displayed at all, because AE only jumps into action for channels where you've explicitly set that it should change the status...

    Could you perhaps give me access to the site it is happening on, because I'm fairly sure I won't be able to replicate this problem on my install.

    – Wouter

  2. 2 Posted by James Wilson-Je... on 25 Jan, 2012 08:59 PM

    James Wilson-Jennings's Avatar

    Hi,

    The plugin is disabled but you can enable and set the purchased_items
    channel to be the target for the auto expire.

    If logged in as admin you can goto the accounts page on the front end
    and see the purchased items.

    After auto expire has changed the status output will stop(even when
    manually changed back).

    Template is 'basket/account'

    Thanks!

    # REMOVED FOR PRIVACY REASON

    Regards,

    James.
    www.jameswilsonjennings.com

  3. Support Staff 3 Posted by Wouter Vervloet on 25 Jan, 2012 10:49 PM

    Wouter Vervloet's Avatar

    Hi James,

    I can't seem to get into the CP the the login you gave? Also, it is better to send it to my private mail instead of posting it on the support forum here... You can send it to wouter [at] baseworks [dot] nl

    – Wouter

  4. 4 Posted by James Wilson-Je... on 25 Jan, 2012 11:01 PM

    James Wilson-Jennings's Avatar

    Oh, I'm replying on iPhone mail didn't realise it was going to the forum..

    Regards,

    James.
    www.jameswilsonjennings.com

  5. Support Staff 5 Posted by Wouter Vervloet on 26 Jan, 2012 12:14 AM

    Wouter Vervloet's Avatar

    Hi James,

    Since your entries are actually expired, you need to tell the channel:entries tag to show the expired entries as well...

    {exp:channel:entries channel='...' show_expired='yes'}

    That should do the trick...

    – Wouter

  6. 6 Posted by James Wilson-Je... on 26 Jan, 2012 12:17 AM

    James Wilson-Jennings's Avatar

    Oh I see! Is there a way for the plugin not to expire entries but just
    change status?

    Thanks for your help!

    Regards,

    James.
    www.jameswilsonjennings.com

  7. Support Staff 7 Posted by Wouter Vervloet on 26 Jan, 2012 12:21 AM

    Wouter Vervloet's Avatar

    Well... Since the main purpose of this add-on is to automatically set the expiration date, it would be kind of counterintuitive to do that. Changing the status for expired entries was only added after a feature request.

    Adding the show_expired parameter to the channel:entries lets EE ignore the expiration date, so that would be your best option.

    – Wouter

  8. 8 Posted by James Wilson-Je... on 26 Jan, 2012 12:32 AM

    James Wilson-Jennings's Avatar

    Yea I know I assumed wrongly that expird entries where closed entries,
    I could use cart throb to set an expire timer on its template tags.

    The changing of status is much more useful because of the display of
    the entries list in the cp and allows editors to re-enable downloads
    for members really quickly and all works with cartthrob.

    Surly there is a way to disable part of the plugin to do just that?
    Would be perfect for combining the plugins.

    Regards,

    James.
    www.jameswilsonjennings.com

  9. Support Staff 9 Posted by Wouter Vervloet on 26 Jan, 2012 07:13 AM

    Wouter Vervloet's Avatar

    Well... since the status is changed based on the expiration_date, stripping out the expiration_date part would also break the rest of the add-on.

    A different solution for your problem would be to compare the entry_date with the current_time to see if it has been more than a day. You can do that with, for example, MX Calculator

    // {download_expiration} is a global variable with value '86400'
    {if {exp:mx_calc expression="{current_time} - {entry_date}"} > {download_expiration}}
      Your download has expired.
    {if:else}
      Download now!
    {/if}
    

    The only thing is, your status won't be changed on the backend, but you won't actually need it anymore since you can reenable the download by pushing back the expiration_date.

    – Wouter

  10. 10 Posted by James Wilson-Je... on 26 Jan, 2012 11:01 AM

    James Wilson-Jennings's Avatar

    Thanks for that! Would be good to have the status control over entries
    but that other plugin will do the job on the front end at least.

    Regards,

    James.

  11. Wouter Vervloet closed this discussion on 03 Feb, 2012 12:29 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

11 May, 2020 02:18 PM
16 Apr, 2020 06:39 AM
04 Apr, 2020 06:12 PM
30 Mar, 2020 07:50 PM
24 Mar, 2020 05:10 PM