Forum Replies Created

Viewing 13 replies - 16 through 28 (of 28 total)
  • Thread Starter antonio967

    (@antonio967)

    For large text the code below works.

    .woocommerce-loop-product__title {
    font-size: 15px;
    line-height: 30px;
    margin: 0 0 1.0rem;
    }

    Thread Starter antonio967

    (@antonio967)

    Olá Márcio, muito obrigado pela ajuda. Melhorou bastante o aspecto!

    Agora só o campo celular está recuado um pouco à direita. Tentei p?r o wide nele tbm e outras altera??es mas n?o funcionou.

    Alguma dica?

    Thread Starter antonio967

    (@antonio967)

    Why do not you answer?

    Hello christiechild:

    Source: https://www.ads-software.com/support/topic/password-not-recognized-1/

    This link shows you how to create a new admin through your database:
    Creating a new admin account via MySQL

    Make sure you copy all the code exactly.

    This assumes that your database table prefix is set to “wp_”.

    If you are using something different, then make sure to adjust your code accordingly.
    For example, if you are using “wptables_” instead of “wp_”, then the code
    “INSERT INTO wp_users“
    would be
    “INSERT INTO wptables_users“

    In the code they provide, you then have to change what is in ‘red’ (…on the actual page I’ve linked is the red colour) in this code:
    VALUES (‘newadmin’, MD5(‘pass123’), ‘firstname lastname’, ’[email protected]’, ‘0’);

    =======

    newadmin – this you change to the new username (do not use “admin”)
    pass123 – this you change to the new password
    firstname – this will be what it says, a first name
    lastname – this will be what it says, a last name
    [email protected] – this will be an email, but do not use the email you already have for the site or for your present admin

    =========

    Once the database updates, you can go to your wordpress login as normal and use the new admin login information to gain access.

    Reset the password for your old account and write down its username and password somewhere.
    Log out from the new admin and log in with your now-changed old one to see if it works.
    If it does, then you have the choice of either keeping both (a good fail-safe), deleting the new one, or deleting the new one.

    Thread Starter antonio967

    (@antonio967)

    Ent?o qualquer pergunta aqui vc nunca vai responder, porque se seu plugin é específico para os Correios do Brasil que envolve PAC, SEDEX, CARTA REGISTRADA e vc n?o responde se é sobre FRETE GRáTIS e TAXA FIXA porque relaciona-se ao WC, ent?o é melhor desativar apoio (nenhum) para este plugin!
    Seria mais sensato dizer: meu plugin n?o é capaz de fazer isso. Pronto, simples. Mas “código n?o é humildade”, n?o é?

    Thread Starter antonio967

    (@antonio967)

    Hi!

    I hope it helps you.

    The name fields (fist name and last name) only appear in English, so use the code below in the functions.php and these fields will be removed and others inserted and that will be translated:
    / ** ADD FIELDS FIRST NAME AND SURNAME IN THE FORM WOOCOMMERCE REGISTER WITHOUT PLUGIN AND THAT ARE TRANSLATED NORMALLY, SINCE THE PLUGIN WOOCOMMERCE SIMPLE REGISTRATION DOES NOT TRANSLATE NAME AND SURNAME, FIRST NAME AND LAST NAME IS.
    THIS CODE IS DIVIDED INTO 4 PARTS – PART 1: ADD THE FIELDS
    Fonte: https://www.cloudways.com/blog/add-woocommerce-registration-form-fields/
    *
    * @return string Register fields HTML.
    */
    function wooc_extra_register_fields() {?>
    <p class=”form-row form-row-first”>
    <label for=”reg_billing_first_name”><?php _e( ‘First name’, ‘woocommerce’ ); ?><span class=”required”>*</span></label>
    <input type=”text” class=”input-text” name=”billing_first_name” id=”reg_billing_first_name” value=”<?php if ( ! empty( $_POST[‘billing_first_name’] ) ) esc_attr_e( $_POST[‘billing_first_name’] ); ?>” />
    </p>
    <p class=”form-row form-row-last”>
    <label for=”reg_billing_last_name”><?php _e( ‘Last name’, ‘woocommerce’ ); ?><span class=”required”>*</span></label>
    <input type=”text” class=”input-text” name=”billing_last_name” id=”reg_billing_last_name” value=”<?php if ( ! empty( $_POST[‘billing_last_name’] ) ) esc_attr_e( $_POST[‘billing_last_name’] ); ?>” />
    </p>
    <div class=”clear”></div>
    <?php
    }
    add_action( ‘woocommerce_register_form_start’, ‘wooc_extra_register_fields’ );
    / ** ADD FIELDS FIRST NAME AND SURNAME IN THE FORM WOOCOMMERCE REGISTRATION – PART 2: VALIDATE THE NEW FIELDS.
    * Validate the extra register fields.
    *
    * @param string $username Current username.
    * @param string $email Current email.
    * @param object $validation_errorsWP_Error object.
    *
    * @return void
    */
    function wooc_validate_extra_register_fields( $username, $email, $validation_errors ) {
    if ( isset( $_POST[‘billing_first_name’] ) && empty( $_POST[‘billing_first_name’] ) ) {
    $validation_errors->add( ‘billing_first_name_error’, __( ‘Error: First name is required!’, ‘woocommerce’ ) );
    }
    if ( isset( $_POST[‘billing_last_name’] ) && empty( $_POST[‘billing_last_name’] ) ) {
    $validation_errors->add( ‘billing_last_name_error’, __( ‘Error: Last name is required!.’, ‘woocommerce’ ) );
    }
    }
    add_action( ‘woocommerce_register_post’, ‘wooc_validate_extra_register_fields’, 10, 3 );
    / ** ADD FIELDS FIRST NAME AND SURNAME ON FORM WOOCOMMERCE REGISTER – PART 3: SAVE THESE VALUES ON THE DATA BANK.
    * Save the extra register fields.
    *
    * @paramint $customer_id Current customer ID.
    *
    * @return void
    */
    function wooc_save_extra_register_fields( $customer_id ) {
    if ( isset( $_POST[‘billing_first_name’] ) ) {
    // WordPress default first name field.
    update_user_meta( $customer_id, ‘first_name’, sanitize_text_field( $_POST[‘billing_first_name’] ) );
    // WooCommerce billing first name.
    update_user_meta( $customer_id, ‘billing_first_name’, sanitize_text_field( $_POST[‘billing_first_name’] ) );
    }
    if ( isset( $_POST[‘billing_last_name’] ) ) {
    // WordPress default last name field.
    update_user_meta( $customer_id, ‘last_name’, sanitize_text_field( $_POST[‘billing_last_name’] ) );
    // WooCommerce billing last name.
    update_user_meta( $customer_id, ‘billing_last_name’, sanitize_text_field( $_POST[‘billing_last_name’] ) );
    }
    }
    add_action( ‘woocommerce_created_customer’, ‘wooc_save_extra_register_fields’ );
    / ** ADD FIELDS FIRST NAME AND SURNAME IN THE FORM WOOCOMMERCE REGISTRATION – PART 4: DISABLE THE FIRST NAME AND LAST NAMES CREATED BY PLUGIN WOOCOMMERCE SIMPLE REGISTRATION, BECAUSE THEY APPEAR IN ENGLISH ONLY, NOT BEING TRANSLATED AND WITH THE 3 CODE PARTS ABOVE THOSE FIELDS ARE CREATED AND TRANSLATED. * /
    add_filter( ‘woocommerce_simple_registration_name_fields’, ‘__return_false’ );

    Thread Starter antonio967

    (@antonio967)

    I found the solution:

    Change the user role that you do not want to see your tickets for Author (as support agent he sees all tickets).
    Then in Settings / General tab / Agent Settings section / check: Allow Agents to assign tickets.

    Thread Starter antonio967

    (@antonio967)

    Hello, I got the solution, if anyone needs:

    1. Use the codes to create the fields as shown at https://www.cloudways.com/blog/add-woocommerce-registration-form-fields/

    2. Add the following code in functions.php to disable the First Name and Last Name fields that were created by the plugin and are not translated:
    Add_action ( ‘woocommerce_created_customer’, ‘wooc_save_extra_register_fields’);

    Thread Starter antonio967

    (@antonio967)

    Hi mpower9. I saw your site. If I understood correctly what you want, do so:

    In the Free Shipping method, under Method heading, replace Free Shipping by 0.00, or Shipping included or —-

    I hope I have helped.

    Thread Starter antonio967

    (@antonio967)

    Retorno para compartilhar a solu??o:

    Frete grátis n?o convive bem com PAC, SEDEX ou Carta Registrada neste plugin. Se um produto tem frete grátis e você adiciona um que tem PAC, as duas op??es aparecem e obviamente o cliente vai escolher o frete grátis, tendo o proprietário da loja prejuízo no produto que tem PAC.

    Você pode usar o código para desabilitar o frete grátis de alguns produtos (https://www.speakinginbytes.com/2013/11/disable-free-shipping-woocommerce/), mas ainda assim, se no carrinho tiver produtos com frete grátis e outro com carta registrada, ele cobrará como PAC…

    Por isso, o método que funcionou foi a TAXA FIXA, porque é o único que serve de ponte para vincular o produto às classes e seus custos.

    Ent?o, crie a taxa fixa nomeada como “Frete: R$ 0,00”, custo quando n?o possui classe de entrega = 0, restante em branco, tipo de cálculo Por pedido.

    Em seguida, crie as classes de entrega PAC e Carta Registrada.

    Crie nova taxa fixa nomeada de PAC. No campo “PAC” custo da classe de entrega, digite o valor fixo para o PAC, que foi R$ 25,00. Demais campos em branco, tipo de cálculo Por pedido.

    Crie o método Carta Registada: ative, nomeie como Carta Registrada, Em classe de entrega, escolha Carta Registrada, Log de depura??o: marque, demais campos em branco.

    No produto que deve cobrar PAC, Aba Entrega, escolha a classe de entrega PAC; no que deve cobrar Carta Registrada, escolha a classe Carta Registrada; e nos demais produtos com frete grátis mantenha em Nenhuma classe de entrega.

    No arquivo functions (Menu lateral Aparência/ Editor/ ao alto e à direita, em Selecionar um tema para editar, selecione o tema que está usando/ na lista à direita em Modelos, clique em functions.php (fun??es do tema). Role até o final e cole o código abaixo, que mostrará somente o método de entrega mais caro.

    Fonte do código: https://jeroensormani.com/only-show-freecheapestmost-expensive-shipping-in-woocommerce/

    /**
    * Mostrar somente a entrega mais cara
    */
    function my_only_show_most_expensive_shipping_rate( $rates, $package ) {
    $most_expensive_method = ”;
    // Loop through shipping rates
    if ( is_array( $rates ) ) :
    foreach ( $rates as $key => $rate ) :
    // Set variables when the rate is more expensive than the one saved
    if ( empty( $most_expensive_method ) || $rate->cost > $most_expensive_method->cost ) :
    $most_expensive_method = $rate;
    endif;
    endforeach;
    endif;
    // Return the most expensive rate when possible
    if ( ! empty( $most_expensive_method ) ) :
    return array( $most_expensive_method->id => $most_expensive_method );
    endif;
    return $rates;
    }
    add_action( ‘woocommerce_package_rates’, ‘my_only_show_most_expensive_shipping_rate’, 10, 2 );

    é isso. Espero ter ajudado.

    Se alguém souber de uma maneira melhor, desde já todos agradecem.

    Thread Starter antonio967

    (@antonio967)

    Retorno para compartilhar a solu??o, que cabe em menos linhas do que o autor do plugin usou para negá-la. Pode parecer uma pergunta boba para os mais experientes, mas que frequentemente se esquecem que já foram iniciantes em Woocommerce como sou agora:

    Em Título do método, digite: Frete: R$ 0,00. Se quiser incluir o prazo: Frete (prazo de chegada: até x dias): R$ 0,00.
    Mas antes de cada teste limpe o cache do navegador, sen?o os resultados ser?o falseados.

    • This reply was modified 8 years, 3 months ago by antonio967.
    Thread Starter antonio967

    (@antonio967)

    Muito obrigado Claudio.

    Alguma dica de plugin? Já procurei bastante e nada achei.

    Abs

    Thread Starter antonio967

    (@antonio967)

    Hi Luke!

    Thank you for your valuable assistance. It worked!

Viewing 13 replies - 16 through 28 (of 28 total)