No se han encontrado widgets en la barra lateral

Imprimir todos los fields del checkout

Agregar éste código en el archivo functions.php del tema function custom_override_checkout_fields($fields){ print_r($fields); } add_filter('woocommerce_checkout_fields', 'custom_override_checkout_fields', 100);

Leer más

Obtener Wishlist por usuario

/** * @param int $customerId */ public function getWishlistByCustomerId($customerId) { $wishlist = $this->wishlist->loadByCustomerId($customerId)->getItemCollection(); return $wishlist; } getWishlistByCustomerId($customerId); if(count($wishlistCollection)) { foreach ($wishlistCollection as $_item) { /* You can get ID, Name,…

Leer más

Quitar regiones al state field del checkout woocommerce

add_filter( 'woocommerce_states', 'custom_us_states', 10, 1 ); function custom_us_states( $states ) { $non_allowed_us_states = array( 'CL-AI', 'CL-AN', 'CL-AP', 'CL-AR', 'CL-AT', 'CL-BI', 'CL-CO', 'CL-LI', 'CL-LL', 'CL-LR', 'CL-MA', 'CL-ML', 'CL-NB', 'CL-TA', 'CL-VS'); //…

Leer más

Actualizar el contador del carrito, cuando se usa ajax

function update_cart_count($fragments) { $link = '<li id="shopping-cart-header" class="float-left"><a href="' . get_permalink(9) . '"><i class="fas fa-shopping-cart"></i>&nbsp;' . WC()->cart->get_cart_contents_count() . ' Mi carro</a></li>'; $fragments['li#shopping-cart-header'] = $link; return $fragments; } add_filter('woocommerce_add_to_cart_fragments', 'update_cart_count');

Leer más

Subir módulo a Magento

Subir carpeta a del modulo (Verificar que la carpeta no esté en el servidor, si la carpeta está, solamente subir las carpetas internas que no estén) /html/app/code Ingresar por Putty…

Leer más

Datos adjuntos en correo

En el controlador del formulario de envío recibimos los datos. Como medida de seguridad en Magento hay que usar el $this->request heredado desde el action. En este caso inyectamos mediante…

Leer más

Métodos del objeto $orden

Array ( [0] get_data_without_line_items [1] get_line_item_data [2] add_filters [3] order_class_name [4] get_report_customer_id [5] is_returning_customer [6] get_customer_first_name [7] get_customer_last_name [8] payment_complete [9] get_formatted_order_total [10] save [11] set_status [12] maybe_set_date_paid [13] update_status…

Leer más

Eliminar todos los productos por MySQL

SET FOREIGN_KEY_CHECKS = 0; TRUNCATE TABLE `catalog_category_product`; TRUNCATE TABLE `catalog_category_product_index`; TRUNCATE TABLE `catalog_category_product_index_tmp`; TRUNCATE TABLE `catalog_compare_item`; TRUNCATE TABLE `catalog_product_bundle_option`; TRUNCATE TABLE `catalog_product_bundle_option_value`; TRUNCATE TABLE `catalog_product_bundle_price_index`; TRUNCATE TABLE `catalog_product_bundle_selection`; TRUNCATE TABLE…

Leer más

Hacer Zoom In dentro de la galería en Pdp

Buscar el archivo view.xml dentro de la carpeta etc ubicada en el tema del sitio y en las líneas 223 aprox agregar al nodo de magnifier el subnodo mode con…

Leer más

Desactivar el autorelleno de campos en checkout

Agregar el sgte código al functions add_filter('woocommerce_checkout_get_value','__return_empty_string',10); Para filtrar sólo algunos campos, agregar un callback add_filter( 'woocommerce_checkout_get_value', 'radar_remove_values', 10, 2 ); function radar_remove_values( $value, $input ) { $item_to_set_null = array(…

Leer más