Forum Replies Created

Viewing 15 replies - 1 through 15 (of 19 total)
  • Thread Starter samuelvincent

    (@samuelvincent)

    Oh thank you!

    As for serialized content, it is really not complicated… “a:1:{i:0;i:9407;}” or 9407 is the ID of the main pods.

    When I do it from the pods form it works very well and it puts it as a value. so I don’t see why it doesn’t work by sql.

    But I will immediately look at your link and test.

    Thanks !!!!

    • This reply was modified 9 months, 4 weeks ago by samuelvincent.
    Thread Starter samuelvincent

    (@samuelvincent)

    Here are my actions in the database:

    1 – Search for referral coupons to be processed:

    SELECT getPhpSerializedArrayValueByKey(mod185_em_bookings.booking_meta, ‘coupon_code’) AS coupon_code, mod185_em_bookings.booking_status, mod185_em_bookings.person_id, mod185_em_bookings.booking_id, mod185_em_events.event_id, mod185_em_events.event_start_date, DATEDIFF(mod185_em_events.event_start_date, CURDATE()) AS nbr_jours_avant_formation FROM mod185_em_bookings INNER JOIN mod185_em_coupons ON getPhpSerializedArrayValueByKey(mod185_em_bookings.booking_meta, ‘coupon_code’) = mod185_em_coupons.coupon_code INNER JOIN mod185_em_events ON mod185_em_bookings.event_id = mod185_em_events.event_id WHERE getPhpSerializedArrayValueByKey(mod185_em_bookings.booking_meta, ‘coupon_code’) IS NOT NULL AND DATEDIFF(mod185_em_events.event_start_date, CURDATE()) <= 30

    sponsor : coupon_code_parrain = 588-PARRAIN50-447
    godchildren : coupon_code_filleul = 447-FILLEUL50-588

    2: Search if the coupon already exists:

    SELECT mod185_em_coupons.coupon_code FROM mod185_em_coupons WHERE mod185_em_coupons.coupon_code LIKE ‘447-FILLEUL50-588’

    3 – Creates the coupon in the reservation system:

    INSERT INTO mod185_em_coupons ( coupon_owner, blog_id, coupon_code, coupon_name, coupon_description, coupon_max, coupon_start, coupon_end, coupon_type, coupon_tax, coupon_discount, coupon_eventwide, coupon_sitewide, coupon_private ) VALUES ( 2, NULL, ‘447-FILLEUL50-588’, ‘PARRAINAGE 50€’, ’50€ de remise à un parrain – Tarif normal’, 1, ‘2024-02-02’, ‘2025-02-02’, ‘#’, ‘pre’, 50.00, 0, 1, 0 )

    insertSQL_emcoupons_id = 15

    4 – Create the coupon in pods 1/2 (posts):

    INSERT INTO mod185_posts ( post_author, post_date, post_date_gmt, post_content, post_title, post_excerpt, post_status, comment_status, ping_status, post_password, post_name, to_ping, pinged, post_modified, post_modified_gmt, post_content_filtered, post_parent, menu_order, post_type, post_mime_type, comment_count ) VALUES ( 2, ‘2024-02-02’, ‘2024-02-02’, ”, ‘447-FILLEUL50-588’, ”, ‘publish’, ‘closed’, ‘closed’, ”, ‘447-FILLEUL50-588’, ”, ”, ‘2024-02-02’, ‘2024-02-02’, ”, 0, 0, ‘parrainages_filleuls’, ”, 0 )

    insertSQL_posts_id = 9860

    5 – Update the coupon in pods 1/2 (posts):

    UPDATE mod185_posts SET mod185_posts.guid = ‘https://dev.lesformations.ygyforyou.com/?post_type=parrainages_filleuls&p=9860&#8217; WHERE mod185_posts.ID = 9860

    6 – Search for the sponsor coupon in the pod (posts):

    SELECT mod185_posts.ID FROM mod185_posts WHERE mod185_posts.post_title LIKE ‘588-PARRAIN50-447’

    7 – Create the coupon in pods 2/2 (postmeta):

    INSERT INTO mod185_postmeta ( post_id, meta_key, meta_value ) VALUES ( 9860, ‘parrainage_filleul_id’, ‘755’ ), ( 9860, ‘_pods_parrainage_parrain’, ‘a:1:{i:0;i:9407;}’ ), ( 9860, ‘parrainage_parrain’, ‘9407’ )

    8 – Creates the link (podsrel):

    INSERT INTO mod185_podsrel ( pod_id, field_id, item_id, related_pod_id, related_field_id, related_item_id, weight ) VALUES ( 9851, 9858, 9859, 0, 0, 9407, 0 )

    Thread Starter samuelvincent

    (@samuelvincent)

    I’m sorry! Impossible to delete a message… so I deleted the text while leaving a little bit.

    I couldn’t change the slug of the feed but I had completely forgotten that I had renamed it with code…

    2 years later we don’t remember everything anymore!

    Thank you for taking the time to ask me if I still needed help!

    best regards.

    Thread Starter samuelvincent

    (@samuelvincent)

    I forgot to tell you that for geolocation I use the great geolocation plugin https://formidablegeolocation.com which integrates perfectly into the forms.

    Thread Starter samuelvincent

    (@samuelvincent)

    Hi!

    Since 2 days at the beginning of the afternoon, it is again impossible for me to log in to my account and activate my license…

    My license number is F302512AE6F945B0BA0469590BE6DF5D

    Unfortunately this time, I wasn’t able to reactivate it manually!

    Can you think you can unlock this?

    Thread Starter samuelvincent

    (@samuelvincent)

    Hi!

    Of course I have a license!

    You even had to ask for to one of your developers to see why an increment field no longer has in the database, which makes you bug the attendees forms… but no more news of you for 10 days and especially impossible to log me on your support website : ??An error has occured. Please try again??

    My license number is F302512AE6F945B0BA0469590BE6DF5D

    Fortunately, I was able to reactivate it manually!

    Could you see why I can’t log in anymore? And above all, take control of my problem that I temporarily managed to solve?

    Tanks a lot

    Thread Starter samuelvincent

    (@samuelvincent)

    you have to manually update the database. the change in the drop-down menu only works for new stores…

    Thread Starter samuelvincent

    (@samuelvincent)

    my mail :

    hi!

    I have created a cpt and I would like to use it as a replacement to the blog.

    this is my code for my cpt “commercant” and it’s taxonomy “commercant_category” :

    
    // Register Custom Post Type
    function commercant_post_type() {
    
    	$labels = array(
    		'name'                  => _x('Vos commer?ants', 'Post Type General Name', 'text_domain'),
    		'singular_name'         => _x('Commer?ant', 'Post Type Singular Name', 'text_domain'),
    		'menu_name'             => __('Commer?ants', 'text_domain'),
    		'name_admin_bar'        => __('Commer?ant', 'text_domain'),
    		'archives'              => __('Tous les commer?ants', 'text_domain'),
    		'attributes'            => __('Attributs du commer?ant', 'text_domain'),
    		'parent_item_colon'     => __('Commer?ant parent :', 'text_domain'),
    		'all_items'             => __('Tous les commer?ants', 'text_domain'),
    		'add_new_item'          => __('Ajouter un nouveau commer?ants', 'text_domain'),
    		'add_new'               => __('Ajouter', 'text_domain'),
    		'new_item'              => __('Nouveau commer?ant', 'text_domain'),
    		'edit_item'             => __('Modifier le commer?ant', 'text_domain'),
    		'update_item'           => __('Mettre à jour le commer?ant', 'text_domain'),
    		'view_item'             => __('Voir le commer?ant', 'text_domain'),
    		'view_items'            => __('Voir les commer?ants', 'text_domain'),
    		'search_items'          => __('Rechercher le commer?ant', 'text_domain'),
    		'not_found'             => __('Aucun commer?ant trouvé', 'text_domain'),
    		'not_found_in_trash'    => __('Aucun commer?ant trouvé dans la corbeille', 'text_domain'),
    		'featured_image'        => __('Image mise en avant', 'text_domain'),
    		'set_featured_image'    => __('Définir l\'image mise en avant', 'text_domain'),
    		'remove_featured_image' => __('Retirer l\'image mise en avant', 'text_domain'),
    		'use_featured_image'    => __('Utiliser comme image mise en avant', 'text_domain'),
    		'insert_into_item'      => __('Insérer dans le commer?ant', 'text_domain'),
    		'uploaded_to_this_item' => __('Uploaded to this item', 'text_domain'),
    		'items_list'            => __('Items list', 'text_domain'),
    		'items_list_navigation' => __('Items list navigation', 'text_domain'),
    		'filter_items_list'     => __('Filter items list', 'text_domain'),
    	);
    	$args = array(
    		'label'                 => __('Commer?ant', 'text_domain'),
    		'description'           => __('', 'text_domain'),
    		'labels'                => $labels,
    		'hierarchical'          => false,
    		'public'                => true,
    		'show_ui'               => true,
    		'show_in_menu'          => true,
    		'show_in_rest'          => true,
    		'supports'				=> array('title', 'editor', 'thumbnail', 'comments','excerpt','page-attributes','post-formats'),
    		'taxonomies'            => array('commercant_category'),
    		'menu_position'         => 5,
    		'menu_icon'             => 'dashicons-groups',
    		'show_in_admin_bar'     => true,
    		'show_in_nav_menus'     => true,
    		'can_export'            => true,
    		'has_archive'           => true,
    		'exclude_from_search'   => false,
    		'publicly_queryable'    => true,
    		'query_var'             => true,
    		'capability_type'       => 'page',
    	);
    	register_post_type('commercant', $args );
    
    }
    add_action('init', 'commercant_post_type', 0 );
    
    // Register Custom Taxonomy
    function commercant_category_taxonomy() {
    
    	$labels = array(
    		'name'                       => _x('Catégories de commer?ants', 'Taxonomy General Name', 'text_domain'),
    		'singular_name'              => _x('Catégorie du commer?ant', 'Taxonomy Singular Name', 'text_domain'),
    		'menu_name'                  => __('Catégories de commer?ants', 'text_domain'),
    		'all_items'                  => __('Toutes les catégories', 'text_domain'),
    		'parent_item'                => __('Catégorie parente', 'text_domain'),
    		'parent_item_colon'          => __('Catégorie parente :', 'text_domain'),
    		'new_item_name'              => __('New Manufacturer Name', 'text_domain'),
    		'add_new_item'               => __('Ajouter une nouvelle catégorie', 'text_domain'),
    		'edit_item'                  => __('Modifier la catégorie', 'text_domain'),
    		'update_item'                => __('Mettre à jour la catégorie Manufacturer', 'text_domain'),
    		'view_item'                  => __('View Item', 'text_domain'),
    		'separate_items_with_commas' => __('Séparer les catégories par des virgules', 'text_domain'),
    		'add_or_remove_items'        => __('Ajouter ou supprimer des catégories', 'text_domain'),
    		'choose_from_most_used'      => __('Choose from the most used manufactures', 'text_domain'),
    		'popular_items'              => __('Popular Items', 'text_domain'),
    		'search_items'               => __('Rechercher dans les catégories', 'text_domain'),
    		'not_found'                  => __('Aucune catégorie trouvée.', 'text_domain'),
    		'no_terms'                   => __('No items', 'text_domain'),
    		'items_list'                 => __('Items list', 'text_domain'),
    		'items_list_navigation'      => __('Items list navigation', 'text_domain'),
    	);
    	$args = array(
    		'label'                 => __('Catégorie de commer?ant', 'text_domain'),
    		'description'           => __('', 'text_domain'),
    		'labels'                     => $labels,
    		'hierarchical'               => true,
    		'public'                     => true,
    		'show_ui'                    => true,
    		'show_admin_column'          => true,
    		'show_in_nav_menus'          => true,
    		'show_tagcloud'              => true,
    		'show_in_rest'               => true,
    	);
    	register_taxonomy('commercant_category', array('commercant'), $args );
    
    }
    add_action('init', 'commercant_category_taxonomy', 0 );
    

    I found an post on wordpress support speaking about this replacement https://www.ads-software.com/support/topic/how-to-include-cpt-in-wp-query-in-astra/

    I modified the function “astra_blog_get_post_meta ” in the file “wp-content/themes/astra/inc/blog.php”

    
    if ( ! function_exists( 'astra_blog_get_post_meta' ) ) {
    
    	/**
    	 * Prints HTML with meta information for the current post-date/time and author.
    	 *
    	 * @since 1.0
    	 * @return mixed            Markup.
    	 */
    	function astra_blog_get_post_meta() {
    
    		$enable_meta = apply_filters( 'astra_blog_post_meta_enabled', '__return_true' );
    		$post_meta   = astra_get_option( 'blog-meta' );
    
    		if ( 'post' == get_post_type() || 'commercant' == get_post_type() && is_array( $post_meta ) && $enable_meta ) {
    
    			$output_str = astra_get_post_meta( $post_meta );
    
    			if ( ! empty( $output_str ) ) {
    				echo apply_filters( 'astra_blog_post_meta', '<div class="entry-meta">' . $output_str . '</div>', $output_str ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    			}
    		}
    	}
    }
    
    

    and the function “astra_single_get_post_meta ” in the file “wp-content/themes/astra/inc/single-blog.php”

    
    
    if ( ! function_exists( 'astra_single_get_post_meta' ) ) {
    
    	/**
    	 * Prints HTML with meta information for the current post-date/time and author.
    	 *
    	 * @param boolean $echo   Output print or return.
    	 * @return string|void
    	 */
    	function astra_single_get_post_meta( $echo = true ) {
    
    		$enable_meta = apply_filters( 'astra_single_post_meta_enabled', '__return_true' );
    		$post_meta   = astra_get_option( 'blog-single-meta' );
    
    		$output = '';
    		if ( is_array( $post_meta ) && ( 'post' == get_post_type() || 'commercant' == get_post_type() || 'attachment' == get_post_type() ) && $enable_meta ) {
    
    			$output_str = astra_get_post_meta( $post_meta );
    			if ( ! empty( $output_str ) ) {
    				$output = apply_filters( 'astra_single_post_meta', '<div class="entry-meta">' . $output_str . '</div>', $output_str ); // WPCS: XSS OK.
    			}
    		}
    		if ( $echo ) {
    			echo $output; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    		} else {
    			return $output;
    		}
    	}
    }
    
    

    the articles of my cpt “commercant” are displayed well, but impossible to display the taxonomies “commercant_category”.

    I created a post on wordpress support about this question https://www.ads-software.com/support/topic/taxonomy-of-custom-post-type/#post-12784794
    Suman of Team Brainstorm Force replied with a code. unfortunately this does not work from my side…

    he asked me to creates a ticket on your site.

    I just reset everything to assure me that the problem was not from my handling :
    – I have to reinstall wordpress,
    – I have to reinstall the theme astra,
    – I have to reinstall my custom post type “commercant” and its taxonomie”commercant_category”
    But it still does not work…

    you can see this test site at https://dev.charlotte-bergerot.fr.

    can you help me to solve this problem?

    thanks a lot!
    best regards.

    • This reply was modified 4 years, 6 months ago by samuelvincent.
    • This reply was modified 4 years, 6 months ago by Yui. Reason: please use CODE button for proper formatting
    Thread Starter samuelvincent

    (@samuelvincent)

    hello!

    I’m doing a long mail explanatory but just answer me this :

    “Greetings for the day!

    We try to help everyone as much as we can. However, our complimentary support can only cover questions related to existing features in our products, fixing bugs that you might encounter.

    The scope of our support, unfortunately, does not offer help related to customizations or providing custom code specific to your needs.

    If you need personalized and general help while developing your WordPress website, especially if you’re not a developer, I would encourage you to hire a freelancer if you need customized help.

    You can find a suitable freelancer for your needs on platforms like Upwork / Codeable who are specialized with WordPress and can work with you closely while you’re developing your website.

    Please feel free to let me know if you need any further help.

    Have a beautiful day ahead.

    Best Regards,
    Fahim & Customer Care team
    Brainstorm Force”

    Thread Starter samuelvincent

    (@samuelvincent)

    thank you very much ! I do this on.

    I just reset everything to assure me that the problem was not from my handling :
    – I have to reinstall wordpress,
    – I have to reinstall the theme astra,
    -I have to reinstall my custom post type “commercant” and its taxonomie”commercant_category”.

    But it still does not work…
    but at least it will be more easy to work with

    Thread Starter samuelvincent

    (@samuelvincent)

    hi Suman

    thanks a lot for your code !
    I put it in my file functions.php but it doesn’t work.

    even when it is a pity that the categories may not be able to follow as easily as the articles.

    can be that the simplest solution would be that I give you access to the administration interface if you want to try in real conditions of development.

    Thread Starter samuelvincent

    (@samuelvincent)

    hi @brainstormteam

    sorry it doesn’t work…

    for the items “commercant” in my CPT are displayed in the place of those of the blog by default “post”, I have modified the function astra_blog_get_post_meta in the file blog.php and the function astra_single_get_post_meta in the file single-blog.php.
    but there must be somewhere another function has to change

    	function astra_blog_get_post_meta() {
    
    		$enable_meta = apply_filters( 'astra_blog_post_meta_enabled', '__return_true' );
    		$post_meta   = astra_get_option( 'blog-meta' );
    
    		if ( 'commercant' == get_post_type() && is_array( $post_meta ) && $enable_meta ) {
    
    			$output_str = astra_get_post_meta( $post_meta );
    
    			if ( ! empty( $output_str ) ) {
    				echo apply_filters( 'astra_blog_post_meta', '<div class="entry-meta">' . $output_str . '</div>', $output_str ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    			}
    		}
    	}
    	function astra_blog_get_post_meta() {
    
    		$enable_meta = apply_filters( 'astra_blog_post_meta_enabled', '__return_true' );
    		$post_meta   = astra_get_option( 'blog-meta' );
    
    		if ( 'commercant' == get_post_type() && is_array( $post_meta ) && $enable_meta ) {
    
    			$output_str = astra_get_post_meta( $post_meta );
    
    			if ( ! empty( $output_str ) ) {
    				echo apply_filters( 'astra_blog_post_meta', '<div class="entry-meta">' . $output_str . '</div>', $output_str ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
    			}
    		}
    	}
    Thread Starter samuelvincent

    (@samuelvincent)

    this is my code:

    // Register Custom Post Type
    function commercant_post_type() {
    
    	$labels = array(
    		'name'                  => _x('Vos commer?ants', 'Post Type General Name', 'text_domain'),
    		'singular_name'         => _x('Commer?ant', 'Post Type Singular Name', 'text_domain'),
    		'menu_name'             => __('Commer?ants', 'text_domain'),
    		'name_admin_bar'        => __('Commer?ant', 'text_domain'),
    		'archives'              => __('Tous les commer?ants', 'text_domain'),
    		'attributes'            => __('Attributs du commer?ant', 'text_domain'),
    		'parent_item_colon'     => __('Commer?ant parent :', 'text_domain'),
    		'all_items'             => __('Tous les commer?ants', 'text_domain'),
    		'add_new_item'          => __('Ajouter un nouveau commer?ants', 'text_domain'),
    		'add_new'               => __('Ajouter', 'text_domain'),
    		'new_item'              => __('Nouveau commer?ant', 'text_domain'),
    		'edit_item'             => __('Modifier le commer?ant', 'text_domain'),
    		'update_item'           => __('Mettre à jour le commer?ant', 'text_domain'),
    		'view_item'             => __('Voir le commer?ant', 'text_domain'),
    		'view_items'            => __('Voir les commer?ants', 'text_domain'),
    		'search_items'          => __('Rechercher le commer?ant', 'text_domain'),
    		'not_found'             => __('Aucun commer?ant trouvé', 'text_domain'),
    		'not_found_in_trash'    => __('Aucun commer?ant trouvé dans la corbeille', 'text_domain'),
    		'featured_image'        => __('Image mise en avant', 'text_domain'),
    		'set_featured_image'    => __('Définir l\'image mise en avant', 'text_domain'),
    		'remove_featured_image' => __('Retirer l\'image mise en avant', 'text_domain'),
    		'use_featured_image'    => __('Utiliser comme image mise en avant', 'text_domain'),
    		'insert_into_item'      => __('Insérer dans le commer?ant', 'text_domain'),
    		'uploaded_to_this_item' => __('Uploaded to this item', 'text_domain'),
    		'items_list'            => __('Items list', 'text_domain'),
    		'items_list_navigation' => __('Items list navigation', 'text_domain'),
    		'filter_items_list'     => __('Filter items list', 'text_domain'),
    	);
    	$args = array(
    		'label'                 => __('Commer?ant', 'text_domain'),
    		'description'           => __('', 'text_domain'),
    		'labels'                => $labels,
    		'hierarchical'          => false,
    		'public'                => true,
    		'show_ui'               => true,
    		'show_in_menu'          => true,
    		'show_in_rest'          => true,
    		'supports'				=> array('title', 'editor', 'thumbnail', 'comments','excerpt','page-attributes','post-formats'),
    		'taxonomies'            => array('commercant_category'),
    		'menu_position'         => 5,
    		'menu_icon'             => 'dashicons-groups',
    		'show_in_admin_bar'     => true,
    		'show_in_nav_menus'     => true,
    		'can_export'            => true,
    		'has_archive'           => true,
    		'exclude_from_search'   => false,
    		'publicly_queryable'    => true,
    		'query_var'             => true,
    		'capability_type'       => 'page',
    	);
    	register_post_type('commercant', $args );
    
    }
    add_action('init', 'commercant_post_type', 0 );
    
    // Register Custom Taxonomy
    function commercant_category_taxonomy() {
    
    	$labels = array(
    		'name'                       => _x('Catégories de commer?ants', 'Taxonomy General Name', 'text_domain'),
    		'singular_name'              => _x('Catégorie du commer?ant', 'Taxonomy Singular Name', 'text_domain'),
    		'menu_name'                  => __('Catégories de commer?ants', 'text_domain'),
    		'all_items'                  => __('Toutes les catégories', 'text_domain'),
    		'parent_item'                => __('Catégorie parente', 'text_domain'),
    		'parent_item_colon'          => __('Catégorie parente :', 'text_domain'),
    		'new_item_name'              => __('New Manufacturer Name', 'text_domain'),
    		'add_new_item'               => __('Ajouter une nouvelle catégorie', 'text_domain'),
    		'edit_item'                  => __('Modifier la catégorie', 'text_domain'),
    		'update_item'                => __('Mettre à jour la catégorie Manufacturer', 'text_domain'),
    		'view_item'                  => __('View Item', 'text_domain'),
    		'separate_items_with_commas' => __('Séparer les catégories par des virgules', 'text_domain'),
    		'add_or_remove_items'        => __('Ajouter ou supprimer des catégories', 'text_domain'),
    		'choose_from_most_used'      => __('Choose from the most used manufactures', 'text_domain'),
    		'popular_items'              => __('Popular Items', 'text_domain'),
    		'search_items'               => __('Rechercher dans les catégories', 'text_domain'),
    		'not_found'                  => __('Aucune catégorie trouvée.', 'text_domain'),
    		'no_terms'                   => __('No items', 'text_domain'),
    		'items_list'                 => __('Items list', 'text_domain'),
    		'items_list_navigation'      => __('Items list navigation', 'text_domain'),
    	);
    	$args = array(
    		'label'                 => __('Catégorie de commer?ant', 'text_domain'),
    		'description'           => __('', 'text_domain'),
    		'labels'                     => $labels,
    		'hierarchical'               => true,
    		'public'                     => true,
    		'show_ui'                    => true,
    		'show_admin_column'          => true,
    		'show_in_nav_menus'          => true,
    		'show_tagcloud'              => true,
    		'show_in_rest'               => true,
    	);
    	register_taxonomy('commercant_category', array('commercant'), $args );
    
    }
    add_action('init', 'commercant_category_taxonomy', 0 );
    Forum: Fixing WordPress
    In reply to: FaceTime link
    Thread Starter samuelvincent

    (@samuelvincent)

    hi!
    thank you for your answer.
    no I haven’t changed anything.
    the setting is on “Title of the publication” (exemple https://www.sylvienard.fr/exemple-article/)

    Thread Starter samuelvincent

    (@samuelvincent)

    yes they are different modules, but the code should not be enormously … unfortunately I’m still not familiar enough with wordpress to edit this code. in the meantime i found a way to do that with the plugin plugin permalink manager https://en.www.ads-software.com/plugins/permalink-manager/

Viewing 15 replies - 1 through 15 (of 19 total)