Please submit a private ticket if you need to share sensitive information, such as license details and admin credentials.

Okay
  Public Ticket #2312787
Small adjustments needed
Closed

Comments

  • Tom Galton started the conversation

    Hi guys,

    Thanks for the plugin, I have just purchased the premium version and it's great! There are a couple of things I'm hoping you can help me with.

    1. I would like to add the Fly Cart to my header, is there a shortcode button or a way I can add this as a widget? 

    2. Is there any CSS I can use to change the 'Checkout' text to say something else?

    3. On a similar note, can I change the 'Coupon' text?

  •  767
    Janilyn replied

    Hi Tom,

    Thank you for contacting WPClever Support Forum. We’ve received your ticket and assigned one of our developers to help you with that. 

    He’ll be looking into your question and responding with specific instructions as soon as possible. Please stay in touch as he might need to discuss further with you. 

    Best regards.

    Janilyn T. - WPClever Support Agent

  •  1,226
    Dustin replied

    Hi Tom, 

    Sorry for the late reply!

    #1. Add the cart to the header.

    Please add the class "woofc-cart-link" for an element you want to place the cart icon.

    Example: <span class="woofc-cart-link">Cart</span>

    Or you also can use the PHP code:

    if ( class_exists( 'WPCleverWoofc' ) ) {
        echo WPCleverWoofc::woofc_get_cart_link();
    }

    And the result https://prnt.sc/r8ioay

    #2. Change "Checkout" and "Coupon" text.

    Please add below function to current theme (or child-theme) / functions.php

    add_filter( 'gettext', 'woofc_gettext', 99, 3 );
    function woofc_gettext( $translation, $text, $domain ) {
        if ( $domain === 'woofc' && $text === 'Checkout' ) {
            return 'Your text';
        }
        if ( $domain === 'woofc' && $text === 'Coupon code' ) {
            return 'Your text';
        }
        return $translation;
    }

    Best regards,
    Dustin

  • Tom Galton replied

    Hi Frankie,

    That's great, thanks very much for your help. I was wondering if a couple more changes are possible?

    1. Please could I also ask what the function would be if I wanted to edit the  ''You may be interested in...' text when cross sells are enabled?

    2. Is there a way I can add a custom message below the products in the basket? I'd like to be able to advise customers to add a certain amount of items to their basket to apply for a discount. 

    Thanks!

    Tom

  •  1,226
    Dustin replied

    #1. To change any text from our plugin, please use previous function and add the same lines for other text.

    add_filter( 'gettext', 'woofc_gettext', 99, 3 );
    function woofc_gettext( $translation, $text, $domain ) {
        if ( $domain === 'woofc' && $text === 'Checkout' ) {
            return 'Your text';
        }
        if ( $domain === 'woofc' && $text === 'Coupon code' ) {
            return 'Your text';
        }
        if ( $domain === 'woofc' && $text === 'You may be interested in...' ) {
            return 'Your text';
        }
        return $translation;
    }

    #2. Add custom message below the products

    Please update our plugin to the latest version 1.7.7 first.

    Then add below code to current theme (or child-theme) / functions.php

    add_filter( 'woofc_above_bottom_content', 'your_woofc_above_bottom_content', 99, 1 );
    function your_woofc_above_bottom_content( $text ) {
        return '<div style="padding: 10px 20px; color: white">Your text here</div>';
    }

    And the result https://prnt.sc/rb63dj

    Best regards,
    Dustin

  • Tom Galton replied

    Hi Frankie,

    Thanks again for your help! That has sorted #2 and works great. 

    I'm struggling to change the 'you may be interested in...' text - here's the code. Does this look correct?

    add_filter( 'gettext', 'woofc_gettext', 99, 3 );
    function woofc_gettext( $translation, $text, $domain ) {
        if ( $domain === 'woofc' && $text === 'Checkout' ) {
            return 'Proceed to Play';
        }
        if ( $domain === 'woofc' && $text === 'Coupon code' ) {
            return 'Promo Code';
        }
        if ( $domain === 'woofc' && $text === 'Cart' ) {
            return 'View Basket';
        }
        if ( $domain === 'woofc' && $text === 'You may be interested in...' ) {
            return 'Why not add?...';
        }
        return $translation;
    }


    Here's a link to the webpage.

    https://www.myclubdeluxe.com/

    Thanks!

    Tom


  •  1,226
    Dustin replied

    Sorry, please use the exactly text https://prnt.sc/rbpv6x

    Best regards,
    Dustin