Forum Replies Created

Viewing 15 replies - 1 through 15 (of 80 total)
  • @wckalkulator That’s great!

    @rickywicky pdf uploads would be so cool

    Thread Starter Francisco

    (@fmarconi)

    Hi! I resolved the issue. In order to target the page title and not the nav menu items titles I was checking if we are in_the_loop(), this have been working for me so far, but for some reason the above-content title returns false as opposed to in-content title, so I’ve change it and now I check instead if wc_get_page_id( ‘checkout’ ) === current page id.
    Kind regards.

    Francisco

    (@fmarconi)

    Hey, @mrlibs , did you find a meal plan solution???

    Thread Starter Francisco

    (@fmarconi)

    Hi, Hannah,
    I’m working in this site.
    It works with quotation, not selling directly. So in the WooCommerce thank you page I need the title to be “Quotation received”.
    But then, when the client got the answer for the quotation with prices by mail, they are redirected to the order pay endpoint and after that to the thank you page again, but this time the title has to be the default “Order received”.
    To do so, I’ve added a simple conditional filter for the title:

    add_filter( 'the_title', 'titulos_cotizaciones', 10, 2 );
    function titulos_cotizaciones($title, $post_id)
    {
    	if (is_checkout() && in_the_loop())
    	{
    		if (cart_contains_quotable()) return 'Finalizar Cotización';
    		elseif (orden_recibida_estado()=='pending')	return 'Solicitud de cotización enviada';
    		elseif (!empty(orden_recibida_estado())) return 'Pago realizado';
    	}
    	return $title;
    }

    This works with the Kadence apperance setting Page design -> title set to “In content”.
    So far, so good.

    The issue is when I change this setting to “Above the content” the code no longer works.

    That’s it,
    Thanks

    • This reply was modified 3 years ago by Francisco. Reason: links instead of thumbnails
    Francisco

    (@fmarconi)

    That is false
    look ridiculous
    makes no sense
    I hate to switch themes
    a giant pain
    a Kadence person

    Such a language!

    Thread Starter Francisco

    (@fmarconi)

    Thanks!

    Oh, I’ve been trying to do this and there is no way. I’ve tried with product variations also and the bookings are overlapped. I dig into the code and there are no way to do this. The check availability function is messy and there is no hooks. It’s a poor plugin but I didn’t find any free better option.
    Regards,
    Francisco

    Thread Starter Francisco

    (@fmarconi)

    EDIT:
    I also solved putting the following code on child theme functions:

    add_filter('query', 'return_fake_variation_id');
    function return_fake_variation_id($sql){
    	if (str_contains(wp_debug_backtrace_summary(),"prime_product_variations")) {
    		return "SELECT '' as variation_id FROM DUAL";
    	}
        return $sql;
    }

    (PHP 8.0)

    @rainfallnixfig, thank you, I follow your indications. The WooCommerce Blocks plugin doesn’t fix the issue and my hosting provider says I’m using deprecated syntax.
    I’ve found the issue is on WooCommerce repo
    and follow the temporarly fix proposed on \woocommerce\packages\woocommerce-blocks\src\BlockTypes\AbstractProductGrid.php adding the follow code on line 364:

    if (empty($prime_variation_ids)){
    	return;
    }

    Regards,
    Francisco

    • This reply was modified 3 years, 2 months ago by Francisco. Reason: Other solution
    Thread Starter Francisco

    (@fmarconi)

    @imazed Hi! Yes, I did, and the message still there. And in the editor I get Error loading block: The response is not a valid JSON response.

    Thread Starter Francisco

    (@fmarconi)

    Hi @rainfallnixfig , thanks for your help.
    Updating and verifying the database didn’t help. :C
    Here’s my system report (a fresh install):

    
    ### WordPress Environment ###
    
    WordPress address (URL): https://web-pyme.cl/test-storefront-woocommerce
    Site address (URL): https://web-pyme.cl/test-storefront-woocommerce
    WC Version: 6.0.0
    REST API Version: ? 6.0.0
    WC Blocks Version: ? 6.3.3
    Action Scheduler Version: ? 3.3.0
    WC Admin Version: ? 2.9.4
    Log Directory Writable: ?
    WP Version: 5.8.2
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: ?
    WP Cron: ?
    Language: en_US
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: LiteSpeed
    PHP Version: 7.4.27
    PHP Post Max Size: 200 MB
    PHP Time Limit: 3000
    PHP Max Input Vars: 10000
    cURL Version: 7.71.0
    OpenSSL/1.1.1d
    
    SUHOSIN Installed: –
    MySQL Version: 5.5.5-10.3.32-MariaDB
    Max Upload Size: 200 MB
    Default Timezone is UTC: ?
    fsockopen/cURL: ?
    SoapClient: ?
    DOMDocument: ?
    GZip: ?
    Multibyte String: ?
    Remote Post: ?
    Remote Get: ? wp_remote_get() failed. Contact your hosting provider.
    
    ### Database ###
    
    WC Database Version: 6.0.0
    WC Database Prefix: test_s_w_
    Total Database Size: 3.82MB
    Database Data Size: 2.40MB
    Database Index Size: 1.42MB
    test_s_w_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    test_s_w_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    test_s_w_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    test_s_w_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    test_s_w_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    test_s_w_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    test_s_w_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    test_s_w_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    test_s_w_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    test_s_w_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    test_s_w_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    test_s_w_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    test_s_w_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    test_s_w_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    test_s_w_actionscheduler_actions: Data: 0.02MB + Index: 0.13MB + Engine InnoDB
    test_s_w_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    test_s_w_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    test_s_w_actionscheduler_logs: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    test_s_w_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    test_s_w_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    test_s_w_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    test_s_w_options: Data: 1.47MB + Index: 0.03MB + Engine InnoDB
    test_s_w_postmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    test_s_w_posts: Data: 0.06MB + Index: 0.06MB + Engine InnoDB
    test_s_w_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    test_s_w_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    test_s_w_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    test_s_w_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    test_s_w_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    test_s_w_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    test_s_w_wc_admin_notes: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
    test_s_w_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    test_s_w_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    test_s_w_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    test_s_w_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    test_s_w_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    test_s_w_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
    test_s_w_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
    test_s_w_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
    test_s_w_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
    test_s_w_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    test_s_w_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
    test_s_w_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    test_s_w_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
    
    ### Post Type Counts ###
    
    attachment: 1
    customize_changeset: 1
    nav_menu_item: 8
    page: 13
    post: 2
    product: 3
    revision: 6
    
    ### Security ###
    
    Secure connection (HTTPS): ?
    Hide errors from visitors: ?Error messages should not be shown to visitors.
    
    ### Active Plugins (1) ###
    
    WooCommerce: by Automattic – 6.0.0
    
    ### Inactive Plugins (2) ###
    
    Akismet Anti-Spam: by Automattic – 4.2.1
    Hello Dolly: by Matt Mullenweg – 1.7.2
    
    ### Settings ###
    
    API Enabled: –
    Force SSL: –
    Currency: USD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)
    
    Connected to WooCommerce.com: –
    
    ### WC Pages ###
    
    Shop base: #23 - /shop/
    Cart: #24 - /cart/
    Checkout: #25 - /checkout/
    My account: #26 - /my-account/
    Terms and conditions: ? Page not set
    
    ### Theme ###
    
    Name: Storefront
    Version: 3.9.1
    Author URL: https://woocommerce.com/
    Child Theme: ? – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme
    WooCommerce Support: ?
    
    ### Templates ###
    
    Overrides: –
    
    ### Action Scheduler ###
    
    Complete: 6
    Oldest: 2021-12-28 18:16:06 +0000
    Newest: 2021-12-29 00:13:28 +0000
    
    ### Status report information ###
    
    Generated at: 2021-12-29 00:16:15 +00:00
    
    Thread Starter Francisco

    (@fmarconi)

    A better approach:

    add_filter( 'wc_get_price_thousand_separator', 'custom_price_separator', 0 );
    function custom_price_separator($separator)
    {
    	$BeRocket_CE = BeRocket_CE::getInstance();
    	return $BeRocket_CE::$currency!='CLP'?$separator:'.';
    }
    add_filter( 'wc_get_price_decimals', 'custom_price_decimals', 0 );
    function custom_price_decimals($decimals)
    {
    	$BeRocket_CE = BeRocket_CE::getInstance();
    	return $BeRocket_CE::$currency!='CLP'?$decimals:0;
    }
    Thread Starter Francisco

    (@fmarconi)

    Hi @codersantosh sorry, it is not about the image itself.
    I found that Google complains about front page content layout shift because slider do not declare width and height on slider-sections.php line 146:
    echo '<img src="'.esc_url( $image_url[0] ).'"/>';
    I did this to solve:
    echo '<img src="'.esc_url( $image_url[0] ).'" width="655" height="418"/>';

    Also realized that the product image is shown in full size on the right side slider because explicit parameter on this line 280:
    $image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full' );
    I don’t want a small full image to solve this because it is the product image used in single product page, so I changed it:
    $image_url = wp_get_attachment_image_src(get_post_thumbnail_id(), 'medium' );

    Maybe I’m missing what do you mean optimizing the images…

    Thread Starter Francisco

    (@fmarconi)

    Hi @stevieboy23 This is the solution I came up

    @media screen and (max-width: 1024px)
    {
    	.has-sidebar .content-container
    	{
    	display: flex;
    	flex-direction: column-reverse;
    	}
    }
    Thread Starter Francisco

    (@fmarconi)

    GReat, thanks!

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