Gift Wrapper for WooCommerce

Descripción

Since 2014! The Best Gift Wrap Plugin Option for WooCommerce, from Little Package

Gift Wrapper trata tu servicio de envoltorio como un producto de WooCommerce, permitiendo que sea inventariado, valorado y con impuestos, por separado. Crea y ofrece tantos envoltorios de regalo como quieras, donde quieras. No sólo para el envoltorio de regalo – utiliza Gift Wrapper para cualquier complemento del carrito (inventariable, con impuestos y/o con descuento). Ejemplos: añadir condimentos a un pedido de comida, o accesorios a un pedido de electrónica. Si necesitas más características y funcionalidades como opciones de envoltorio por producto, consulta la versión PLUS de The Gift Wrapper de Sagehen Studio (no confundir con un plugin de nombre similar pero diferente que vende Woocommerce desde marzo de 2020).

Algunas características

  • Crea un sencillo formulario de opción de envoltorio para regalo (u otro tipo de extensión) en el carrito y/o la página de finalización de compra o ve a por todas con robustas ofertas de envoltorios para regalo
  • Establecer precios individuales, descripciones e imágenes para los tipos de envoltorio
  • El envoltorio puede ser inventariado, con descuentos y/o impuestos, como otros productos de WooCommerce
  • Mostrar u ocultar las imágenes del envoltorio para regalo en el carrito o en finalizar compra.
  • Static (slide-down), checkbox, or modal view of gift wrap options on cart and checkout pages
  • Accept additional gift wrap note (optional) with gift wrap selection
  • 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
  • Elementor Pro cart/checkout page widget
  • Completamente etiquetado con CSS y con plantilla para tu personalización
  • Remember the paid version of this plugin (Gift Wrapper PLUS for WooCommerce) has way more features and likely does what you need!
  • If you have suggestions, or find a bug, please get in touch.

GIFT WRAPPER PLUS (paid version) features

  • Per-product gift wrapping modal/slideout options on product pages, or a simple per-product “add gift wrap for $x” checkbox
  • Per-product gift wrapping settings (control offerings per-product)
  • Per-product wrap can appear as product attribute or as separate line item (for separate taxes, inventory etc) in cart.
  • Add different gift wrap products to each item in cart, if desired
  • Add more than one wrap products to any item in the cart, if desired
  • Add/edit/and remove gift wrap to/from products inside cart, per-product
  • Control ratio of product:wrap in cart line-item wrap offerings
  • Exclude products from wrap, and/or exclude entire product categories from wrap
  • If using modal(s), option to use any of 1500+ possible entrance/exit animations, courtesy animate.css
  • Elementor Pro cart/checkout and product page compatibility
    Compatible with WooCommerce Mix and Match Products and WooCommerce Composite Products
  • Compatibility with CartPops AJAX fly-out cart

Apoyar el desarrollo futuro

¡Necesito tu soporte y tu apoyo! Si has encontrado útil este plugin gratuito y especialmente si te has beneficiado comercialmente por tener un envoltorio de regalo para WooCommerce, por favor, plantéate hacer una donación para apoyar el futuro del plugin en el repositorio de 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 la versión gratuita de Gift Wrapper

Compra Gift Wrapper Plus

Traducciones

Take a moment and help Translate the Gift Wrapper into your language

Capturas

  • Screenshot of the General Options tab (WooCommerce -> Settings -> Gift Wrapping submenu)
  • Screenshot of the Order Wrapping tab options
  • Animated GIF of cart, click of prompt causes gift wrap options to slide down
  • Animated GIF of cart, click of prompt opens modal pop-up window with gift wrap options
  • Animated GIF of checkbox gift wrap options clicked, causing add-to-cart
  • Cart with two prompt placements, before and after cart

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. Visit WooCommerce->Settings, then look for the Gift Wrapper tab to set your plugin preferences.
  4. Follow the instructions there and review your settings.

Green Geeks has created a good overview of Gift Wrapper installation and set up, which applies to the free version of Gift Wrapper.

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

Las opciones de envoltorio de regalo no se muestran

Cosas para comprobar:

  1. ¿WooCommerce está activado y configurado? y ¿todos los archivos de los temas están actualizados? (comprueba WooCommerce->Estado del sistema si no está seguro)
  2. ¿Está activado el plugin Gift Wrapper?
  3. Are you using WooCommerce version 7.2 or newer? Time to upgrade!
  4. Are you using WooCommerce block-style (Gutenberg) cart/checkout? Sorry, Gift Wrapper is not compatible with blocks (yet) The plugin is intended to work with the old-school WC cart/checkout shortcodes.
  5. Have you created at least one WooCommerce gift wrap product, given it a price (even if $0), saved it to a WooCommerce product category, and entered that product category in your Gift Wrapper settings?
  6. ¿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

6a. Does the your-theme-or-child-theme/woocommerce/checkout/form-checkout.php file include at least one of the following hooks?

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 or TwentyTwentyTwo theme and disable all plugins except WooCommerce & Gift Wrapper to rule out theme/plugin interference.

Gift Wrapper Plus (paid upgrade) allows for easy additional hook placements – just type in the name of the hook you want used.

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

¿Has añadido un envoltorio de regalo como producto de WooCommerce? Este plugin funciona creando un producto que representa virtualmente el envoltorio de regalo. Depende de ti si ese producto es visible en el catálogo o no, y de lo detallada que sea la descripción del producto. Pero tiene que haber un producto, y tiene que estar en una categoría, crees o no más de un tipo de envoltura. Esa categoría de producto se utiliza en los ajustes de Gift Wrapping.

Finally, check your browser console for JavaScript errors. This plugin uses JavaScript and sometimes depends sometimes other plugins’ broken JavaScript can interfere with ours.

¿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 gift wrap service: 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?

I’ve added CSS tags to every aspect of the cart and checkout gift wrap forms so you can style away. Please if you do not know basic CSS, hire a developer to do this for you. We need jobs, too!

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'; // default WP sizes are 'thumb', 'medium', 'medium_large', and 'large'
    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. You can also use an image size slug created by an active plugin or theme. If thumbnails do not show in your size afterward, it’s possible you need to clear caches or run thumbnail regeneration.

Gift Wrapper Plus (paid upgrade) allows users to set thumbnail size in the settings.

¡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.

I don’t want gift wrap to incur a shipping cost

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.

I don’t want to show a specific element on screen

Este plugin está fuertemente marcado con CSS. Si no quieres mostrar una parte de lo que muestra Gift Wrapper, añade CSS personalizado a los ajustes del tema de WordPress, CSS del tema de WordPress (normalmente style.css) o, mejor aún, el archivo CSS del tema hijo de WordPress (style.css). WordPress también permite añadir CSS en el personalizador.

Un ejemplo podría ser:

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

.wcgwp-note-container textarea {display: none;}

o

.wcgwp-note {display: none;}

Both lines of CSS should work (version > 6.0). I cannot support all the requests for free custom theme help any longer! Please study up CSS or hire a developer to help you make custom theme and plugin modifications. WooCommerce has provided some recommendations for where to seek help. Thank you for understanding.

To hide the text «We offer the following gift wrap options:,» 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' );

The CSS would be:

.wcgwp-details {display: none;}

You can also adjust the HTML output using the template system built into Gift Wrapper.

¿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');

How can I make this plugin work with WooCommerce Mix & Match or WooCommerce Composite Products?

Easy. The Plus version of this Gift Wrapper is compatible with the WooCommerce Mix & Match and WooCommerce Composite Products plugins.

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

There are SO many ways to customize this plugin – all the ways! Your developer will have an easy time customizing this exactly how you want it, using filter hooks, templates and/or string translations.

The PLUS version of this plugin allows for easy string translation by using a settings panel — just type what you want it to say.

Filter hooks
The easiest option is probably 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 );

Another less specific hook can be used to catch any string. Use the exact original string to match, then replace it:

function my_custom_wrap_strings( $string ) {
    if ( 'Cancel gift wrap' === $string ) { // Check for default string
        $string = 'Cancelar envolver regalo'; // Replace default string
    } else if ( 'Cancel' === $string ) { // Check for default string
        $string = 'Cancelar'; // Replace default string
    } else if ( 'Note' === $string ) { // Check for default string
        $string = 'Nota'; // Replace default string
    } else if ( 'Note fee' === $string ) { // Check for default string
        $string = 'Tarifa de nota'; // Replace default string
    } // etc
    return $string;
}
add_filter( 'wcgwp_filter_string', 'wcgwp_filter_strings', 11, 1 );

Ahora el texto dirá: «¿Quieres envolver esto?» Este código PHP puede ser añadido usando el plugin Code Snippetssi no tienes un tema hijo o no te sientes cómodo editando el archivo functions.php del tema hijo o con PHP.

Translation
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 gift-wrapper-en_US.po and putting it in the /lang/ folder inside the Gift Wrapper plugin folder (/wp-content/plugins/gift-wrapper/lang/). If your site is in French (France), your PO file would be /wp-content/plugins/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.

I recommend Poedit to get string translations done quickly and simply. Note: translation occurs after filters (mentioned above) are run.

Templating
If you want to do more about styling gift wrap presentation, this plugin includes a templating system.

¿Cómo puedo traducir los «Detalles del envoltorio para regalo» (que se encuentra en los ajustes de Gift Wrapper) al usar WPML?

Esta cadena se guarda en la tabla de opciones de la base de datos de WordPress, por lo que WPML necesita un poco más de trabajo para encontrarla. Sigue estas instrucciones en la documentación de WPML para encontrar el valor `wcgwp_details` en la base de datos y traducirlo.

La ventana emergente (emergente) no funciona con mi tema

Most likely this is due to your WordPress theme conflicting with this plugin. Oftentimes, themes use aggressive CSS z-indexing to make page sections «float». This can cause third-party modals (from any plugin, not just this one) to fail. If you do not know how to correct z-index issues with some custom CSS, please bring this issue up with your theme author and/or your developer. Usually one short line of CSS code can fix this issue. I’d share it here but it hugely depends on which theme you are using.

This plugin doesn’t look good or work with my theme

Learn more about possible theme issues. Gift Wrapper works with many themes, both paid and free, and is offered gratis and as is. Some themes just require very minor tweaking with a line or two of CSS for cooperation. If you have suggestions for how to make it work every time for your theme, we will consider hard-coding in your theme fixes. However, we are not responsible nor for hire to make this plugin work with every theme out there. Thank you for understanding.

Other problem

Please write for support before leaving negative feedback! Tickets usually get replies within 24-48 hours. This pinned ticket contains solid advice about how to troubleshoot further, and how to request help (to get quick help).

Reseñas

9 de diciembre de 2022 1 respuesta
This has been a really helpful little plugin. It works perfectly and I haven't had any issues with it. It was easy to setup and provides an easy solution if you want to add gift wrapping as an option to your site.
12 de enero de 2022 1 respuesta
This is a brilliant little plugin and I've been more than happy to pay for the Pro version as it is worth every penny. Customers can now add wrapping for any product with a gift message. The support has been absolutely excellent.
Leer todas las 48 reseñas

Colaboradores y desarrolladores

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

Colaboradores

«Gift Wrapper for WooCommerce» está traducido en 6 idiomas. Gracias a los traductores por sus contribuciones.

Traduce «Gift Wrapper for WooCommerce» 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

6.1.6

  • Tweak – provide opportunity to translate the «Gift wrap was added to your car.» string using plugin or filter hook
  • Testing with WP 6.5 and WC 8.7

6.1.5

  • Fix – Fatal error in PHP < 8 where Exception class is unassigned

6.1.4

  • Fix – Remove breaking use of woocommerce_update_cart_action_cart_updated filter hook

6.1.3

  • Fix – Default hide deactivation Thickbox on plugins.php

6.1.2

  • Fix – For themes like Martfury watching for ‘added_to_cart’ trigger, set a $thisbutton value
  • Tweak – Add optional feedback UI for users deactivating plugin
  • Tweak – Hide language settings not used in the free version of this plugin

6.1.1

  • Fix – Save default text strings
  • Tweak – Don’t refresh cart when wrap can’t be added anyway, line 294 class-gift-wrapper-wrapping.php

6.1.0

  • Elementor cart/checkout page support!
  • Remove sometimes-confusing PRO settings display and move CTA
  • Tweak – prevent editing of gift wrap quantity when no more than one allowed
  • Tweak – empty WC notice before running AJAX add_to_cart so that notices don’t pile up
  • Probando con WC 8.2

6.0.8

  • Probado con WooCommerce 8.2
  • Update contributors

6.0.7

  • Probado con WooCommerce 7.8

6.0.6

  • If language string array empty, re-save defaults

6.0.5

  • Make $wrap_in_cart public
  • Uncheck checkbox if wrap removed from cart using cart X button
  • Default suppress_filters to ‘false’, even if unclear WC is using it in wc_get_products()
  • Normalize theme templates completely with Plus version peri-cart templates, using get_strings() for strings

6.0.4

  • Declare compatibility with WooCommerce HPOS
  • Probado con WC 7.7.0

6.0.3

  • Update v6/js/wcgwp-cart.js to better handle situations where only one gift wrap option available

6.0.2

  • String translation text domain corrected to ‘woocommerce-gift-wrapper’

6.0.1

  • Don’t re-save ‘wcgwp_category_id’ option when filtered by WPML
  • CSS changes for Divi theme – z-indexing can be challenging to work around
  • Preserve gift wrap note/message in case of add-to-cart error, customer doesn’t have to re-type

6.0.0

  • New v6 templates allow for AJAX add gift wrap to cart, more seamless transition to Gift Wrapper Plus
  • Checkbox style cart/checkout gift wrap placements
  • Disallow gift product quantity changes when no more should be allowed
  • Testing with WooCommerce v7.6