Forum Replies Created

Viewing 15 replies - 151 through 165 (of 530 total)
  • Plugin Author ulihake

    (@ulih)

    Normally quantity input presents itself after the selection (configuration) of the product via its options (variations). Normally a product with variations will show one or more select fields and the quantity input is shown after the selection (configuration) of the product. When your customer adds the first product configured as normal price variation to his cart, he can add without problems a reduced price variation as independent item and both of them will already have a separate quantity input. In other words: what you want is already built-in to WooCommerce itself, or, this is possible, I did not get your point 🙂

    Regards.
    uh

    Plugin Author ulihake

    (@ulih)

    Soccergrl.

    If View cart is not in the message but “to your cart” is, just use “your cart” to replace this with “your RFQ” and you’re done. That’s straightforward and should be easy for you now. You simply have to select a text portion which does not affect the link part or you have to do some auto-didactic effort and learn how to work with preg_replace instead of str_replace (That’s definitely out of the scope of what I can offer here.)

    And for sure, “View cart” is not in the template files for messages… you have to filter the message, that’s what the code examples I’ve sent to you are all about. Please understand that my code is not meant as a “solution”, it contains hints but you have to understand it and adapt it to your specific needs.

    add_filter( 'wc_add_to_cart_params', 'jscarttorfq', 10, 1 );
    
    function jscarttorfq( $localized ) {
    $localized['i18n_view_cart'] = __( 'View RFQ', 'woocommerce' );
    return $localized;
    }
    add_filter( 'woocommerce_add_message', 'carttorfq', 10, 1 );
    add_filter( 'woocommerce_add_error', 'carttorfq', 10, 1 );
    add_filter( 'woocommerce_add_notice', 'carttorfq', 10, 1 );
    
    function carttorfq( $message ) {
    $message = str_replace( 'your cart', 'your RFQ', $message );
    $message = str_replace( 'View cart', 'View RFQ', $message );
    return $message;
    }
    Plugin Author ulihake

    (@ulih)

    You just have do apply a logical operation on that…

    Just let the line read:

    $message = str_replace( 'View cart', 'View RFQ', $message );

    and the error for the link will disappear. You can also use preg_replace which gives you more control over the replacement process.

    Additionally you can add one more filter plus function to your functions file. This is the complete code:

    add_filter( 'wc_add_to_cart_params', 'jscarttorfq', 10, 1 );
    
    function jscarttorfq( $localized ) {
    $localized['i18n_view_cart'] = __( 'View RFQ', 'woocommerce' );
    return $localized;
    }
    add_filter( 'woocommerce_add_message', 'carttorfq', 10, 1 );
    add_filter( 'woocommerce_add_error', 'carttorfq', 10, 1 );
    add_filter( 'woocommerce_add_notice', 'carttorfq', 10, 1 );
    
    function carttorfq( $message ) {
    $message = str_replace( 'View cart', 'View RFQ', $message );
    return $message;
    }
    Plugin Author ulihake

    (@ulih)

    Hello montig.

    WPML allows you to configure the behavior in the plugin settings under “Product Translation Interface”. You have to choose
    “Go to the native WooCommerce product editing screen” and save this setting. You find the settings under WPML.

    Regards.
    uh

    Plugin Author ulihake

    (@ulih)

    Just place the code in your theme functions file. You don’t have to write it anymore, it’s written 🙂

    add_filter( 'woocommerce_add_message', 'carttorfq', 10, 1 );
    add_filter( 'woocommerce_add_error', 'carttorfq', 10, 1 );
    add_filter( 'woocommerce_add_notice', 'carttorfq', 10, 1 );
    
    function carttorfq( $message ) {
    $message = str_replace( 'cart', 'RFQ', $message );
    return $message;
    }

    If you need to do this for more languages just repeat the $message line inside the function for all languages you’ve configured.

    Regards.
    uh

    Plugin Author ulihake

    (@ulih)

    Hi soccergrl.

    Two possibilities:

    1. You can do this via templates as well. You have three templates for notices and you can simply run a str_replace or preg_replace on the message and probably best way is to call a function which allows you to do substitutions for all the languages you support.

    2. You can use filters in your functions file

    add_filter( 'woocommerce_add_message', 'your_filter_function', 10, 1 );
    add_filter( 'woocommerce_add_error', 'your_filter_function', 10, 1 );
    add_filter( 'woocommerce_add_notice', 'your_filter_function', 10, 1 );
    
    function your_filter_function( $message ) {
    $message = str_replace( 'View cart', 'View monster', $message );
    $message = str_replace( 'Ver cesta', 'Ver monstruo', $message );
    $message = str_replace( 'Einkaufkorb anzeigen', 'Monster anzeigen', $message );
    }

    This allows you to change messages without message specific filter exposition in woocommerce.

    Regards.
    uh

    Plugin Author ulihake

    (@ulih)

    I’ve tested this now: An outdated template override file in your theme’s folder is the most probable cause for this. Please try to update your template files.

    Regards.
    uh

    Plugin Author ulihake

    (@ulih)

    A little update: You will lose your changes when you update your template. To avoid this you can use “child themes”. Please consult the WordPress documentation for more information.

    Plugin Author ulihake

    (@ulih)

    Hello soccergrl.

    WooCommerce allows to use template overrides. To make use of template overrides you have to create a directory woocommerce inside your theme’s folder and copy the template files you want to change form the WooCommerce template folder to your newly created woocommerce folder inside your template. You have to maintain the same subdirectory structure in your-theme/woocommerce as found in the templates folder of Woocommerce. You should only copy the files you really have to adapt.

    Ex.: Copy wp-content/plugins/woocommerce/templates/cart/mini-cart.php to wp-content/themes/your-theme/woocommerce/cart/mini-cart.php

    Once copied you can change the “View cart” label of the button and adapt it to your needs.

    Regards.
    uh

    Plugin Author ulihake

    (@ulih)

    Hello johno69.

    Could you please check if your theme includes outdated template overrides for woocommerce?

    You can do this using System Status to be found inside the WooCommerce Menu.

    Thanks.
    uh

    Plugin Author ulihake

    (@ulih)

    Hello Andrej.
    As we are in contact via email, I close this thread here, as this is not a bug.
    Regards.
    uh

    Plugin Author ulihake

    (@ulih)

    Hello anchevr.

    You can add extra sections, expand the comment section and add sections for each individual item in the cart with the Rich Guy, the big brother of this plugin, not with the Poor Guy.

    Regards.
    uh

    Plugin Author ulihake

    (@ulih)

    That’s difficult to track for me like this. From what I see here some essential initialization based on jquery ui plugins like accordion is not running correctly. But that’s not really a problem of the plugin. I may have a quick look into your site if you facilitate a admin user via the contact form of takebarcelona.

    Plugin Author ulihake

    (@ulih)

    You should first of all activate debug mode via the wp-config.php in the root directory of your instance. Next thing: What php version, which WooCommerce version and what WordPress version do you use? Is this an existing site with an old WordPress version, etc., etc.?

    If this works on other sites you run… it should be something related with environment… does not mean that I could not address it, but at first glance it seems, that this is not really related with the plugin but with per-requisites and site configuration.

    To see javascript errors you simply have to “inspect” a page element with the right mouse button to access the inspector of all modern browsers like Chrome, Firefox, Safari… Once inside the inspector you can access the console where javascript errors related with the current page should show up.

    Regards.
    uh

    Plugin Author ulihake

    (@ulih)

    Hello andrejmikula.

    Thanks for your feedback. Could you please do some tests in the exposed order. After each test and if the problem persists continue with the next test:

    – disable other woocommerce related plugins
    – enable a built-in WordPress theme
    – disable all other plugins apart from WooCommerce and WooCommerce Poor Guys Swiss Knife

    You should also enable debug mode and check javascript errors using the development console of your browser.

    As this does not seem to be a general error, no other user has complaint, the error has to be related with other plugins, your theme or some special condition on your side/site.

    Regards.
    uh

Viewing 15 replies - 151 through 165 (of 530 total)