Woocommerce Gift Wrapper

Descripción

Si necesitas más características y funcionalidades como las opciones de envoltorio por producto, prueba la versión PLUS de WooCommerce Gift Wrapper

Características:

  • Crear un formulario simple de opción de envoltorio para regalo en el carrito y/o página de finalizar compra, o ir a por todas con robustas ofertas de envoltorios para regalo
  • Establecer precios individuales, descripciones e imágenes para los tipos de envoltorio
  • Mostrar u ocultar las imágenes del envoltorio para regalo en el carrito o en finalizar compra.
  • Vista estática (deslizante) o emergente de las opciones de envoltorio para regalo en el carrito y las páginas de finalizar compra
  • Recibir un aviso del mensaje de envoltorio para regalo deseado por los clientes, en el correo electrónico de aviso de nuevo pedido y en la página del pedido – el cliente también recibe la confirmación
  • Completamente etiquetado con CSS y con plantilla para tu personalización.
  • Si tienes sugerencias para otras características, encuentras un fallo, o tienes una traducción, por favor ponte en contacto.
    Necesito tu soporte y ¡aliento! Si has encontrado útil este plugin gratuito, y especialmente si te has beneficiado comercialmente de él, por favor considera hacer una donación para apoyar el futuro del plugin en el repositorio WP:

paypal.me/littlepackage

Entiendo que tienes un presupuesto y que no puedes permitirte pagar al desarrollador (yo) una pequeña propina en agradecimiento. ¿Quizás puedas dejar una reseña positiva?

Por favor, deja una reseña de WooCommerce Gift Wrapper

Comprar WooCommerce Gift Wrapper Plus

¡Gracias!

Traducciones

Russian translation by @Balya, 12/2016
Partial Portuguese translation by @Sotnas, 8/2017
German translation by @daDirtyD, 12/2017

Capturas

  • Captura de pantalla de la página de ajustes (WooCommerce -> Ajustes -> Productos -> submenú de Envoltorio para regalos)
  • Captura de pantalla de «emergente» (un sitio que utiliza el tema Mystile WooCommerce)

Instalación

Para instalar el plugin

  1. Sube toda la carpeta «woocommerce-gift-wrapper» al directorio «/wp-content/plugins/».
  2. Activa el plugin a través del menú «Plugins» en WordPress.
  3. Visita WooCommerce->Ajustes->pestaña Productos, para establecer las preferencias de tu plugin. Busca el enlace de la subpestaña «Envoltorio para regalo».
  4. Sigue las instrucciones y revisa los ajustes.

Para eliminar el plugin:

  1. Desactiva el plugin a través del menú «Plugins» de WordPress
  2. Borra el plugin a través del menú «Plugins» de WordPress
  3. NOTA: Tus ajustes serán borrados de tu base de datos de WP cuando el plugin sea eliminado

FAQ

No parece funcionar

Cosas para comprobar:

  1. ¿Está activado el plugin Gift Wrapper?
  2. ¿WooCommerce está activado y configurado? y ¿todos los archivos de los temas están actualizados? (comprueba WooCommerce->Estado del sistema si no está seguro)
  3. ¿Estás usando WooCommerce versión 3.0 o superior? ¡Es hora de actualizar!
  4. ¿Has creado al menos un producto de envoltorio para regalo, lo has guardado en una categoría de producto y has introducido esa categoría de producto en los ajustes del envoltorio para regalo?
  5. ¿El archivo your-theme-or-child-theme/woocommerce/cart/cart.php incluye al menos uno de los siguientes ganchos?

    do_action(‘woocommerce_before_cart’); o
    do_action(‘woocommerce_before_cart_collaterals’); o
    do_action(‘woocommerce_after_cart’); o

5a. ¿El archivo your-theme-or-child-theme/woocommerce/checkout/form-checkout.php incluye al menos uno de los siguientes ganchos?

do_action('woocommerce_before_checkout_form'); or 
do_action('woocommerce_after_checkout_form');

Due to third-party theme and plugin overrides, these hooks might be moved or removed. If you can’t find any of these hooks in your WooCommerce installation, you are missing a crucial hook(s) to the functioning of this plugin. Try using a different location for the «Where to Show Gift Wrapping» in the plugin settings, and if that doesn’t work, try the Storefront theme and disable all plugins except WooCommerce & Gift Wrapper to rule out theme/plugin interference.

¿Otro problema? ¡Por favor, házmelo saber antes de dejar una respuesta negativa! Normalmente puedo responder a los tiques dentro de las 24-48 horas.

¿Por qué no se añade en el carrito el envoltorio para regalo cuando hago clic en el botón?

Have you added a gift wrapping as a WooCommerce product? This plugin works by creating a product that virtually represents gift wrapping. It is up to you whether that product is visible in the catalog or not, and how fleshed-out you make the product description. But there needs to be a product, and it needs to be in a category whether or not you make more than one wrapping types. That product category is used in the Gift Wrapping settings.

¿Por qué hacer más de un tipo de envoltorio?

Maybe you want to offer «Winter Holiday» wrapping and «Birthday» wrapping separately, or maybe you have other types of wrapping paper or boxes you use that may incur different prices or shipping rules. It’s up to you whether or not you make more than one wrapping product. You don’t have to.

¿Cómo puedo dar estilo a la apariencia?

He añadido etiquetas CSS a todos los aspectos del carrito y a los formularios de envoltorio para regalo para que puedas desmarcarte.

If you would like to change the HTML structure of gift wrap lists and modals, you can use the Gift Wrapper templating system to do that easily.

You will need to create a folder called woocommerce in your theme — or better yet — child theme folder. Inside that folder, create another folder called wcgwp. Move any overwritten plugin template files into this wp-content/theme/woocommerce/wcgwp folder, and your changes will be visible. Read more information on WooCommerce templating here.

¿Puedo cambiar el tamaño de la miniatura del envoltorio para regalo?

Sí, usa el gancho ‘wcgiftwrap_change_thumbnail’ en el archivo functions.php de tu tema (hijo) de la siguiente manera:

function my_custom_thumbnail_size( $thumbnail ) {
    $thumbnail = 'medium';
    return $thumbnail;
}
add_filter( 'wcgiftwrap_change_thumbnail', 'my_custom_thumbnail_size', 10, 1 );

This is just an example. Change ‘medium’ to the size desired, using an existing WordPress image size slug.

¡No quiero que se añada más de un envoltorio al carrito!

Yeah, that could be a problem, but rather than hard-code against that possibility I leave the settings to you, and for good reason. If you don’t want more than one wrapping possible, make sure to set your wrapping product to «sold individually» under Product Data->Inventory in your Product editor. If you do this make sure your customer has a way to remove the gift wrapping from the cart on small screens, as sometimes responsive CSS designs remove the «Remove from Cart» button from the cart table for small screens.

El envoltorio para regalo parece interferir con los gastos de envío

Para evitar que esto suceda, te recomiendo que establezcas tus productos de envoltorio para regalo como productos «virtuales» de WooCommerce (virtual pero no descargable). Si los configuras como productos regulares o variables, asegúrate de arreglar los ajustes de envío para que no incurran en gastos de envío sorpresa.

No quiero mostrar el envoltorio para regalo en mi catálogo

Visit your gift wrap product (WooCommerce product editor screen) and set Catalog Visibility to «hidden» in the upper right corner near the blue update button. If you have more than one gift wrap product, do this for each one.

No quiero mostrar algo

This plugin is heavily CSS-tagged. If you don’t want to show a part of what Gift Wrapper displays, add custom CSS to your WordPress theme settings, WordPress theme css (usually style.css), or – better yet – WordPress child theme CSS file (style.css). WordPress also allows CSS to be added in the Customizer.

Un ejemplo podría ser:

Ocultemos la nota área de texto/caja de texto de regalo. Añade este CSS a tu tema:

.wc_giftwrap_notes_container textarea {display:none}

o

.wc_giftwrap_notes {display:none}

Ambas cosas funcionarían. ¡Ya no puedo dar soporte a todas las solicitudes de ayuda gratuita con temas personalizados! Por favor, estudia el CSS o contrata a un desarrollador para que te ayude a hacer las modificaciones para personalizar los temas y los plugins. Gracias por entenderlo.

To hide «Giftwrap Details,» you used to be able to just leave the setting blank (pre version 3.0.3). Now you can either use CSS or the ‘wcgwp_hide_details’ filter hook to hide it. To use the hook, add the following code to your functions.php file:

add_filter( 'wcgwp_hide_details', '__return_true' );

You can also adjust the HTML output using the template system (as of version 3.0).

¿Cómo puedo ocultar el envoltorio para regalo cuando sólo hay productos virtuales en el carrito?

Fácil, agrega la siguiente línea de código al archivo functions.php de tu tema (hijo):

add_filter( 'giftwrap_exclude_virtual_products', '__return_true' );

Si no estás familiarizado sobre cómo editar el archivo «functions.php», añade este código usando el plugin Code Snippets.

¿Cómo puedo eliminar la opción de pago contra reembolso si el envoltorio para regalo está en el carrito (la compra es probablemente un regalo)?

Fácil, agrega la siguiente línea de código al archivo functions.php de tu tema (hijo):

add_filter( 'wcgwp_remove_cod_gateway', '__return_true');

Me gustaría este plugin en mi idioma, o decir algo diferente en la pantalla

This plugin comes ready with a .POT file. If you aren’t already familiar with localisation (translation) of WordPress plugins and themes, you can learn more here. You can add .PO files to the /lang folder of this plugin to change it to your language, or even to just adjust the English currently used.

To change what this plugin says on screen, create PO/MO file(s) in your language. If your site is in English (US), then you would be creating a PO file called woocommerce-gift-wrapper-en_US.po and putting it in the /lang/ folder inside the WooCommerce Gift Wrapper plugin folder (/wp-content/plugins/woocommerce-gift-wrapper/lang/). If your site is in French (France), your PO file would be /wp-content/plugins/woocommerce-gift-wrapper/lang/woocommerce-gift-wrapper-fr_FR.po. Note in this case, you would be editing or overwriting the existing po file for French.

Yo recomiendo Poedit para realizar las traducciones de las cadenas de forma rápida y sencilla.

Another option is to use WordPress filter hooks included with most strings in this plugin. Here’s an example for changing the «Add Gift Wrap?» text:

function my_change_wrap_prompt( $prompt ) {
    $prompt = 'Would you like to wrap this?';
    return $prompt;
}
add_filter( 'wcgwp_add_wrap_prompt', 'my_change_wrap_prompt', 11, 1 );

Now the text will say «Would you like to wrap this?» This PHP code could be added using the Code Snippets plugin if you do not have a child theme and are not comfortable editing your child theme functions.php file or with PHP at all.

La ventana emergente no funciona con mi tema

If your theme uses a Bootstrap modal, there may be a conflict with this plugin. This is the case with Avada. Try dequeuing the Bootstrap JavaScript in the Gift Wrapper settings.

Este plugin rompe mi tema

I’m sorry I am not responsible nor for hire to make this plugin work with every theme out there. Some themes just, well… suck. It works with most themes I’ve tried, both paid and free, and I offer it gratis and as is. If you have suggestions for how to make it work for your theme, I will consider hard-coding in your theme fixes. Thank you for understanding.

¿Quieres enviar la traducción de tu idioma para este plugin?

Reseñas

1 de julio de 2020
It's not criticism just simple suggestions for development view. You should provide filter hooks specially for "Add gift wrap" button preview place. You shouldn't use anonymous function so developers can manually remove_action and add_action with function name on their desired place. Thanks
15 de junio de 2020
This plugin is excellent and the support too. The programmer responds quickly and gives good advice. The free version is already well done and provides the service we expect. For the moment I have a small shop, but as soon as it's on track, I'll switch to the pro version. I recommend it!
Leer todas las 21 reseñas

Colaboradores y desarrolladores

«Woocommerce Gift Wrapper» es un software de código abierto. Las siguientes personas han colaborado con este plugin.

Colaboradores

«Woocommerce Gift Wrapper» ha sido traducido a 2 idiomas locales. Gracias a los traductores por sus contribuciones.

Traduce «Woocommerce Gift Wrapper» a tu idioma.

¿Interesado en el desarrollo?

Revisa el código , echa un vistazo al repositorio SVN o suscríbete al registro de desarrollo por RSS.

Registro de cambios

1.0 October 29 2014

  • Versión inicial

1.0.1 November 6 2014

  • Clarifications on settings page to help prevent users making the wrong category invisible; multi-select may need to be removed.

1.0.2 November 6 2014

  • Removed setting to hide gift wrap from catalog as it was potentially disruptive if category was set wrong

1.0.3 December 2 2014

  • Now compatible with versions of WC < 2.2.2
  • Minor CSS fix

1.1.0 January 13 2014

  • Finished l10n install
  • Added in copyright/fork notice for Gema75
  • Modal view in cart

1.2.0 August 12 2015

  • WordPress 4.3 ready
  • Fixed JS and modal issues (modal was clipped when page was scrolled, JS now loaded in footer)
  • JS dialog option when replacing wrapping already in cart
  • User notes added below Product name in cart for customer reassurance
  • Woocommerce version < 2.2.2 support removed
  • Spanish and French translations

1.2.1 November 8 2015

  • CSS fixes (remove Bootstrap general CSS)
  • Modal product listing fixes
  • Settings link from plugin page

1.2.2 December 6 2015

  • Frontend accessibility improvements

1.2.3 December 11 2015

  • Checks for WP 4.4
  • Option to add more than one gift wrap product to cart

1.2.4 December 21 2015

  • CSS fix for modal (pop-up) in cart – textarea label display

1.2.5 June 4 2016

  • Checks for compatibility with WP 4.5.2, WC 2.5.5

1.2.6 June 7 2016

  • Increased z-index on popup modal to help with theme/plugin conflicts

1.2.7 August 1 2016

  • Checks for compatibility with WP 4.6
  • Style and script changes for Divi theme
  • Update Bootstrap modal to version 3.3.7
  • Make modal accessible

1.2.8 August 5 2016

  • Further simple CSS fixes for Divi and Avada theme, others (future plans to fix Bootstrap conflict with Avada theme)

1.2.9 September 29 2016

  • Feature: Textarea MAXLENGTH setting
  • Fix: Modal compatibility with Avada theme (e.g. not load Bootstrap twice; still problems with DOM)

1.3.0 October 28 2016

  • Feature: Gift wrapping options now on Checkout page
  • Feature: Put gift wrapping prompts in one, or more than one place
  • Feature: More CSS tags for Cart page
  • Fix: CSS clear:both for textarea header
  • Full Avada compatability with a bootstrap modal form is near-impossible. Dropping support for now.

1.3.1 October 28 2016

  • Fix: Minor PHP error thrown

1.3.2 November 30 2016

  • Fix: Text domain use string not variable

1.3.3 January 3 2017

  • Feature: Russian translation by @Balya ( http://webkit.pro/ )
  • Feature: Added rough Spanish translation back in
  • Feature: Woocommerce 2.7 ready
  • Feature: Delete DB options on plugin uninstall
  • Fix: accessing Product object directly throws warnings (line 370 woocommerce-gift-wrapper.php)

1.4 March 16 2017

  • Fix: Omit open and closing <form> tags on modal and embedded gift wrap forms
  • Fix: only run JS console once if two gift wrap locations on page
  • Feature: Add gift wrap notes to WooCommerce Thank You page.
  • Tweak: Closer to Avada modals working (not complete)
  • Tweak: Move settings and admin functions into their own class files

2.0 March 31 2017

  • Feature: Woo 3.0 ready
  • Feature: move toward correct WP l18n, rather than user-created strings (plugin still accept/use strings saved in previous versions)
  • Fix:

<

form> tags for modal below cart
* Fix: Duplicate div IDs «wc-giftwrap» in cart
* Fix: Duplicate radio IDs in modals (if two used in cart)
* Tweak: Escaping and sanitizing code
* Tweak: Code revised/evolved, Gema75 copyright updated

2.0.1 March 31 2017

  • Fix: Correct text domain to match plugin slug for l18n

2.0.2 April 21 2017

  • Fix: Don’t access order properties directly in /classes/class-gift-wrapper-admin.php

2.0.3 April 27 2017

  • Fix: Provision for smart folks who don’t want to upgrade to Woo 3.0 yet

2.0.4 June 14 2017

  • Fix: Translation strings not translating when set within variable.
  • Feature: Readme.txt edited to further explain how to translate/edit plugin text strings.

2.0.5 August 19 2017

  • Feature: Option to add gift wrap before cart added, thank you @Sotnas
  • Feature: Portuguese translation added

2.0.6 November 21 2017

  • Fix: Do not show out-of-stock gift wrap items
  • Fix: JS naming conflict between above cart and below checkout slide-out and modal where below checkout modal not working
  • Fix: WC sessions cleared after order complete

2.0.7 December 12 2017

  • Feature: ‘wcgiftwrap_change_thumbnail’ filter hook to change thumbnail image size in cart display

2.1 December 25 2017

  • Feature: German translation, thank you @daDirtyD

2.1.1 January 1 2018

  • Feature: Woocommerce version check support

2.2 March 21 2018

  • Feature: Provisional WPML support
  • .woocommerce-info box moved outside Gift Wrapper div for better theme compatibility
  • La función de desinstalación del plugin se movió a OOP y se limpió

2.3 March 22 2018

  • Gancho de filtro añadido para eliminar el envoltorio para regalo si el carrito solo está lleno de productos virtuales (‘giftwrap_exclude_virtual_products’)
  • Ocultar la caja .woocommerce-info si sólo se permite un envoltorio para regalo y ya está en el carrito.

2.3.1 April 25 2018

  • Fix: Allow more giftwrap to be added whenever there is no giftwrap in cart

2.4 October 19 2018

  • Tweak: discontinue use of WC sessions to determine if wrapping is in cart
  • Fix: preventDefault in JS to fix page scrolling on click of #
  • Fix: stripslashes() for gift wrapping notes
  • Feature: Allow different giftwraps with different customer notes in cart at same time

3.0 January 3 2019

  • Feature: Popup/modal now shows in all hooked locations, and with all themes
  • Feature: Customer note shows on order confirmation page and in order confirmation emails (confirming!)
  • Feature: Templating system to allow developers to further tweak Gift Wrap displays
  • Feature: When more than one giftwrap, allow user to set more than one note and not overwrite existing notes
  • Tweak: Bootstrap JS update, other JS split into templates and conditionally loaded

3.0.1 January 6 2019

  • Fix: wp option ‘giftwrap_product_link’ erroneously used instead of ‘giftwrap_link’ to reference giftwrap options
  • Fix: language file naming fix so translation will show, esp German; POT updated
  • Tweak: only pass 3 arguments (of 4) to add_cart_item_data for cross-plugin compatibility
  • Tweak: CSS improvements for slideouts and modals

3.0.2 January 10 2019

  • Fix: add english translation (en_US.po) files for WPML

3.0.3 February 22 2019

  • Tweak: fallback for difficult-to-translate «Giftwrap Details» string – now a string parseable by gettext if settings option left blank

3.0.4 February 22 2019

  • Fix: boolean filter hook (‘wcgwp_hide_details’) provision added for folks who may have left «Giftwrap Details» setting blank.

3.0.5 July 11 2019

  • Tweak: Also hide cart item product link for giftwrapping if linking turned off in Wrapper settings
  • Probado con WooCommerce 3.6.5

4.0 September 29 2019

  • Feature: ‘wcgwp_remove_cod_gateway’ boolean filter hook in case COD not wanted with wrap in cart/order
  • Feature: add «after checkout» location for gift wrap prompts
  • Fix: check if $terms before proceeding with foreach in check_item_for_giftwrap_cat method
  • Fix: if admin doesn’t want to show wrap link in cart, also don’t show it on order confirmation page
  • Tweak: If detect Bootstrap modal already, don’t load it again
  • Tweak: Remove redundant use of ‘woocommerce_add_cart_item_data’ hook
  • Tweak: Use new Woo action hooks to move wrap outside cart form, negating need for templates modal-coupon.php and modal-coupon-header.php
  • Tweak: Add sanitization (replacing _e with esc_html_e where appropriate) throughout
  • Tweak: add «none» selection for multiselect on cart/checkout settings page, as default (no location desired)
  • Tweak: error notice for if admin hasn’t set wrap category yet
  • Update translation files
  • Probado con WooCommerce 3.7

4.0.1 October 3 2019

  • Fix: After checkout positioned wrap not correctly added to cart d/t $_POST values not being caught
  • Fix: Slideout after checkout conflicting with before checkout position – ensure both work

4.0.2 November 22 2019

  • Fix: Stripslashes for customer input
  • Probado con WooCommerce 3.8

4.0.3 – December 4 2019

  • Fix – remove unnecessary «#» action from line item wrap forms (in templates)
  • Fix – add Post/Redirect/Get to peri-cart/peri-checkout wrapping so wrap is not added back to cart after delete + page refresh
  • Tweak – Woocommerce order item meta stored in key value ‘wcgwp_note’ – consistent with Plus version of plugin
  • Tweak – Update readme.txt to reflect changed and new hooks in use
  • Update translation files

4.0.4 – December 8 2019

  • Fix – Order meta replace ‘wcgwp_note’ with «Note» on order confirmation / admin order pages

4.0.5 – December 15 2019

  • Fix – Required WP version moved from 4.0 to 4.9

4.1

January 20 2020 =
* ? What happened?!

4.1.1 – April 9 2020

  • Probado con WP 5.4
  • Probado con WC 4.0.1
  • Actualización del archivo POT

4.1.2 – May 6 2020

  • Retoque – establecer el envoltorio para regalo seleccionado por defecto si hay más de una selección, de modo que no se envíe ningún valor $_POST vacío
  • Probado con WP 5.4.1
  • Probado con WC 4.1

4.2 – July 1 2020

  • Feature – ‘wcgwp_add_wrap_prompt’ and ‘wcgwp_add_wrap_button_text’ filters added to gift wrap prompt and button
  • Tweak – remove use of anonymous function for gift wrap placements in cart and checkout areas
  • Testing with WC 4.2.2