• Resolved John Powell

    (@digipark)


    Love the plugin! Have a few little details to work out…

    *** the Mark As Sold option seems to not be displaying as sold. I can create an admin login for you if that helps.

    *** the Contact Email isn’t showing in the ad itself on the public side. I’m having trouble figuring out why it isn’t displaying.

    *** client admin has a RENEW AD option but the page comes up blank

    I know the subscriptions module isn’t ready yet. Is there an easy way to send renewal notifications when an ad is about to expire, and can there be an easy to use renew link to re-process that order instead of the client having to enter card details all over again?

    Thanks for your help!

    John M Powell
    Digipark

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    1,2. it would be best if you could paste here a link to the page(s) where you are having this problem?

    3. if the page is blank there is most likely some fatal error, open file wp-config.php file add there a line define("WP_DEBUG", true); and retry it should show the actual error message which you can copy and paste here.

    4. it is possible to easily send a notification when the Ad expires, sending a notification few days before the Ad expiration will require some more advanced custom programming.

    Thread Starter John Powell

    (@digipark)

    Greg,

    Thanks for your reply…

    1 & 2 https://test.cdaonline.org/advertising-a-sponsorship/classified-ads/
    open the DENTISTS toggle and you’ll see “test test test” with my lovely mug as a boy

    The SOLD icon will show there on the group listing but not on the individual page here – https://test.cdaonline.org/advert/test-test-test-2/

    There also is none of the sold text shown (the text you can configure in the admin for above and below the sold ad).

    I’m not sure why the Contact Email isn’t showing.

    As for RENEW, it’s not a total white page of death issue. When you’re in the ad management console and click the renew ad, it goes to the renew page, for example https://test.cdaonline.org/my-account/my-classifieds/?advert_renew=37889 but there is no renewal options or content. You see the admin buttons and below you see a single red asterisk (like you’d see with a ‘required’ field) but no other content, just the rest of the page (the remainder of the page and footer display ok).

    Note there are broken images/etc on the test site. Because of size of the site it was duplicated and then a lot of WP content removed to make it fit within their hosting account.

    About the renewal notification, do you have any direction regarding this? I’ve done some custom email notification work with WPAdverts already in functions.php but I’m not sure where to start regarding expiration date check and I’ll have to figure out a method to track when email notifications were sent.

    Ultimately we have clients that want their ads to go indefinitely without end while they just make little adjustments as needed, but I don’t know of a way to do this other than your upcoming Subscriptions module.

    Thanks again Greg. If you send me an email through the contact form at digipark **dot** com I can make you an admin login on the development site to look at it.

    John M Powell
    Digipark

    Plugin Author Greg Winiarski

    (@gwin)

    I would need some more details on your configuration, specifically, how does the configuration form Mark as Sold in wp-admin / Classifieds / Options / Marks as Sold panel look like? and do you have the Contact Form module enabled?

    Also, are you using some code snippets (usually in the theme functions.php file), both the contact details or form and the notice from Mark As Sold are displayed with either “adverts_tpl_single_top” or “adverts_tpl_single_bottom” in your case it looks like all callbacks for this actions were cleared.

    As for white screen, open file wp-config.php add there a line define( "WP_DEBUG", true ); and retry now aside of the white screen you should also see an error message which you can copy and paste here.

    Thread Starter John Powell

    (@digipark)

    Greg,

    Thanks again for your help!

      WooCommerce Payments

    • Renewal Options checked (allow using purchased advert single packages)
    • Preselect Pricings not checked
    • Default Pricing (nothing selected)
    • Default Renewal Pricing (currently this is set to a package but I’ve tried it with nothing selected also)
    • Hold For Moderation (none of the options are checked)
      Mark As Sold

    • There was a adverts_form_load and adverts_form_bind being used but I commented them out and it made no difference. What variables are used for the Mark As Sold module? Maybe I can pull those into the templates in a child theme?
      RENEW AD issue

    • DEBUG didn’t help. There wasn’t any error shown. On https://test.cdaonline.org/my-account/my-classifieds/?advert_renew=37899 (when logged in) I see the page title “My Classifieds”, the account buttons (DASHBOARD, ORDERS, etc), and a single red asterisk as the page content and then the bottom of the div, footer, etc. Everything looks normal except there is nothing on the renew page to see. Here’s the HTML (there were lots of line breaks I removed from the html below);

    <div class=”woocommerce-MyAccount-content”>
    <div class=”woocommerce-notices-wrapper”></div>
    <form action=”” method=”post” class=”adverts-form adverts-form-aligned”>
    <fieldset>
    <input type=”hidden” name=”_adverts_renew” id=”_adverts_renew” value=”1″ />
    <div class=”adverts-control-group adext-wc-payments-field-payment adverts-field-name-payments_listing_type “>
    <label for=”payments_listing_type”>
    <span class=”adverts-form-required”>*</span>
    </label>
    <div class=”adverts-pricings-list”></div>
    </div>
    <div style=”border-top:2px solid silver; padding: 1em 0 1em 0; display: none”>
    <input type=”submit” name=”submit” value=”Preview” style=”font-size:1.2em” class=”adverts-cancel-unload” />
    </div>
    </fieldset>
    </form></div>
    </div>

    Thanks…
    John

    Thread Starter John Powell

    (@digipark)

    I forgot to mention I got the phone/email issue resolved… one step closer to launch. ??

    Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    ok i am glad you have that one resolved ??

    1. sorry if this is a stupid question, but do you have some renewal pricing created?

    To create a renewal product go to wp-admin / Products / Add New, enter the product details, in the “Product Data” select “Renew Listing (WPAdverts)” and save the product. It should then display as an option when renewing.

    2. if you would like to check programmatically if the Ad is marked as sold you can do that with the code below

    
    $is_sold = get_post_meta( get_the_ID(), "marked_as_sold", true );
    if( $is_sold == "1" ) {
      echo "SOLD!";
    }
    
    Thread Starter John Powell

    (@digipark)

    Greg,

    That’s funny. No, it wasn’t a stupid question. That was exactly the problem.

    I’ve just discovered I’m using 4 year old templates which is probably not helpful so I need to find where the most current ones are. I think I figured out the renew page is using form.php but I need to get that updated and figure out how to only select (or better yet, only display) the same renewal package as what they originally purchased. Once I get that coded I think it’s ready to launch, at least until your subscription module is ready. ??

    Thanks…
    John M Powell
    Digipark.com

    Thread Starter John Powell

    (@digipark)

    Found where to get the latest templates but have not been able to figure out how to filter the renewal package to the one appropriate for the ad being renewed. Dug through the documents but not seeing a way to do this. Any suggestions?

    Thanks…
    John

    Plugin Author Greg Winiarski

    (@gwin)

    You can try adding the code below in your theme functions.php file, it should limit the renewal options to only the original posting the user used when creating the Ad

    
    add_filter( "wpadverts_filter_renewals", function( $pricings, $post_id) {
        $limit = array();
        $type = get_post_meta( $post_id, "payments_listing_type", true );
        foreach( $pricings as $p ) {
            if( $p->ID == $type ) {
                $limit[] = $p;
            }
        }
        return $limit;
    }, 10, 2 );
    
    Thread Starter John Powell

    (@digipark)

    Greg,

    Thanks for the code. That wasn’t exactly what I needed but it got me to where I was going. The renewal packages (or listing types I should say) are different post ID’s than the original listing purchase. Once I realized what was going on, I adjusted the ID comparison to cross-reference the original with the renewal and it’s working beautifully.
    if( ($type == 37793) && ($p->ID == 37901) ) { $limit[] = $p; }

    Thank you very much for the assistance. One other little thing to resolve and then I’ll be launching the updated ads management and looking for the next project. ??

    John M Powell
    Digipark.com

    Plugin Author Greg Winiarski

    (@gwin)

    Ok, great i am glad you have it resolved and the site (almost) finished :).

    I am marking this thread as resolved, maybe someone in the future will find it helpful as well.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘SOLD/RENEW issues’ is closed to new replies.