Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter legentlemanfr

    (@legentlemanfr)

    Hello Greg,

    Correction seems to work. I have made several tests and there is no extra meta added to post other than advert.

    Thanks !

    Thread Starter legentlemanfr

    (@legentlemanfr)

    Hello Greg,

    Thanks for your feedback. Here is the code to add and save the meta field in the WPAdverts form.

    add_filter( “adverts_form_load”, “customize_adverts_add” );
    function customize_adverts_add( $form ) {
    if( $form[‘name’] != “advert” ) {
    return $form;
    }
    // List of brands
    $args = array( ‘hide_empty’ => false, ‘fields’ => ‘tt_ids’,’orderby’ => ‘name’ );
    $brands = yith_wcbr_get_terms(‘yith_product_brand’, $args);
    $brand_name_temp = array();
    $array_init[0] = array(“value” => “0”, “text” => __(“Other”,”adverts”));
    foreach ($brands as $key => $brand_id) {
    $brand = get_term($brand_id);
    $brand_name_temp[] = array(“value” => $brand_id, “text” => $brand->name);
    }
    $brand_name = array_merge ($array_init, $brand_name_temp);

    //Edit WPAdvert form
    $form[“field”][] = array(
    “name” => “wpa_brand”,
    “type” => “adverts_field_select”,
    “order” => 11,
    “label” => __(“Brand”, “adverts”),
    “is_required” => false,
    “validator” => array( array( “name” => “is_required” )),
    “empty_option” => false,
    “max_choices” => 1,
    “options” => $brand_name,
    );
    return $form;
    }

    Thread Starter legentlemanfr

    (@legentlemanfr)

    Hi Greg,

    Thank you for your support.
    I have executed both methods without any positive effect (sorry).
    A majority of my plugins reset my wpadvert’s endpoint.
    Hence, I tried the second suggested method. The modification proposed is already present in wpadverts-wc.php file.

    After reading the document about rewriting endpoints, I have found a declaration missing in your wpadvert-wc plugin. All plugins flush the rewriting rules during activation. Why not yours ?
    I have add the following line in wpadverts-wc.php file into adext_wc_payments_activate function.

    $endpoint = adverts_config( ‘wc_payments.user_panel_endpoint’ );
    add_rewrite_endpoint( __($endpoint,’adverts’), EP_ROOT | EP_PAGES );
    flush_rewrite_rules();

    Since this modification, the endpoint rewriting is working as expected.
    Hope this may help.

    Best regards.

    Thread Starter legentlemanfr

    (@legentlemanfr)

    Hello,

    I’ve just add a condition on ICL_LANGUAGE_CODE and your new input in /templates/list.php and it works perfectly.

    Thanks Greg.

    Thread Starter legentlemanfr

    (@legentlemanfr)

    Hello Greg,

    Sorry, wrong copy/paste for the quote characters. My shortcodes are well formatted.
    Here are the two links:
    <b>French page :</b>
    https://legentlemanfrancais.fr/vintage/
    with shortcode [adverts_list redirect_to=”https://legentlemanfrancais.fr/annonces/&#8221; show_results=”0″ show_pagination=”0″ switch_views=”0″]

    <b>English version of the same page (synchronized with WPML) :</b>
    https://legentlemanfrancais.fr/vintage-en/?lang=en
    with shortcode [adverts_list redirect_to=”https://legentlemanfrancais.fr/adverts/?lang=en&#8221; show_results=”0″ show_pagination=”0″ switch_views=”0″]

    In the english page, the action field in the search <form> reflects well the redirect_to parameter of the shortcode.
    By examining, it seems that https://legentlemanfrancais.fr/adverts/?query=XXX page is loaded. As the language argument ?lang=en is missing in the URL, a 301 HTTP redirect error is generated.

    Thanks again for your support.

    Antoine

    Thread Starter legentlemanfr

    (@legentlemanfr)

    Thanks a lot Greg.
    I did not success to use %% and custom fields for Yoast excerpt.
    Moreover, in my configuration, Yoast is not working properly with woocommerce products too. Perhaps a problem with translated slugs with WPML.
    I have decided to test WPAdverts with All in one SEO pack and it is working like a charm, and this, without any effort of development.

    Hello Greg,

    I’ve been keeping a list of improvements for a long time and would like to share it with you in this thread. Of course, your plugin is already at a professional-grade level and my list of suggestions could be for the next 20 years ??

    1. Tags for adverts
    2. Email subscription to new ads in a specific category (subscriptions could be managed from my account)
    3. More paid features (e.g. ad could be pushed back at the top list each day/week/month, ad modification could be chargeable)
    4. WPML compatibility (an ad could be entered in 2 languages like woo commerce products)
    5. Category slugs translation in X languages (thanks to WPML)
    6. Transactional email integration in WP system (to benefit from a centralized admin and woo commerce template – for the moment, email header/footers must be added manually)
    7. Save ads or Ad wishlist (like yith wishlist) – could be useful for customers or for the admin to track customer’s interests

    Bye.

    Thread Starter legentlemanfr

    (@legentlemanfr)

    ** Update **

    2- New pb : My english wpadvert products are all set to 0 day (whatever the parameter). I must precise that english is seen as my second language (from WPML perspective). A workaround might be to create dedicated english products (not relying on WPML woocommerce sync), but products of both languages are still displayed on add page.

    3- Seems working when products are to ‘hidden’ in publication option in woocommerce

    Thread Starter legentlemanfr

    (@legentlemanfr)

    Bonsoir,

    En effet, la saisie des données dans la page du checkout marche très bien avec CDI (dans l’ordre naturel du processus de commande).

    Pour le pb avec WPML, j’ai désactivé le plugins Translation Management qui n’est pas très utile en mode nominal, et ?a passe !

    Merci pour votre éclairage.

Viewing 9 replies - 1 through 9 (of 9 total)