bigrat95
Forum Replies Created
-
Thanks for the help, but i dont want to exclude my product pages because it will slow down the site a lot.
The only issue i see for now would be to load the add to cart via an AJAX refresh.
good news, but i don’t use any cache plugin. I use WP ENGINE.
Maybe the update will work for WP ENGINE ..?
Here is the solution if someone need it.
//Add original price without the discount in the order page function action_woocommerce_admin_order_item_values( $null, $item, $absint ) { $val = ($item['type'] == 'line_item' || $item['type'] == 'shipping') ? $item['subtotal'] : ' '; $valdecimal = wc_format_decimal( $val, $dp='', $trim_zeros ); ?> <td class="item_fcost" data-sort-value="<?php echo $val; ?>"> <div class="view" style="font-weight: bold; text-align: right; padding-right: 10px;"> <?php if ($val>0) echo '$'; echo $valdecimal;?> </div> </td> <?php }; add_action( 'woocommerce_admin_order_item_values', 'action_woocommerce_admin_order_item_values', 10, 3 ); function action_woocommerce_admin_order_item_headers( $order ) { echo '<th class="item_fcost sortable" data-sort="float" style="text-align: right;">Original Cost</th>'; }; add_action( 'woocommerce_admin_order_item_headers', 'action_woocommerce_admin_order_item_headers', 10, 3 );
Forum: Plugins
In reply to: [WooCommerce] woocmmerce price displayI found a simple snippet of code to add in the Functions.php
//Add original price without the discount in the order page function action_woocommerce_admin_order_item_values( $null, $item, $absint ) { $val = ($item['type'] == 'line_item' || $item['type'] == 'shipping') ? $item['subtotal'] : ' '; $valdecimal = wc_format_decimal( $val, $dp='', $trim_zeros ); ?> <td class="item_fcost" data-sort-value="<?php echo $val; ?>"> <div class="view" style="font-weight: bold; text-align: right; padding-right: 10px;"> <?php if ($val>0) echo '$'; echo $valdecimal;?> </div> </td> <?php }; add_action( 'woocommerce_admin_order_item_values', 'action_woocommerce_admin_order_item_values', 10, 3 ); function action_woocommerce_admin_order_item_headers( $order ) { echo '<th class="item_fcost sortable" data-sort="float" style="text-align: right;">Original Cost</th>'; }; add_action( 'woocommerce_admin_order_item_headers', 'action_woocommerce_admin_order_item_headers', 10, 3 );
Thanks
Forum: Plugins
In reply to: [WP Store Locator] All stores missing in adminLast version
Forum: Plugins
In reply to: [WP Store Locator] All stores missing in adminYes, i disabled WPML and it seems to be working.
That’s wierd.
Version 5.1.1
Forum: Plugins
In reply to: [Price Based on Country for WooCommerce] Prcie by country resetThe Wp All Import team gave me this code to add in the function editor of the plugin. It makes it so that the custom prices fields cannot be updated if import ID 18 is running (i.e. ignores them). Untill now, it seems to be working fine. The issue is resolved.
add_filter('update_post_metadata', 'wpai_update_post_metadata', 10, 5); function wpai_update_post_metadata($is_update, $object_id, $meta_key, $meta_value, $prev_value) { $import_id = ( isset( $_GET['id'] ) ? $_GET['id'] : ( isset( $_GET['import_id'] ) ? $_GET['import_id'] : 'new' ) ); if ( $import_id == '18' ) { // ENTER THE IMPORT ID HERE // Do not update these fields. $fields = array( '_canada_price', '_canada_price_method', '_canada_regular_price', '_canada_sale_price', '_canada_sale_price_dates', '_canada_sale_price_dates_from', '_canada_sale_price_dates_to', '_hide-around-the-world_price', '_hide-around-the-world_price_method', '_hide-around-the-world_regular_price', '_hide-around-the-world_sale_price', '_hide-around-the-world_sale_price_dates', '_hide-around-the-world_sale_price_dates_from', '_hide-around-the-world_sale_price_dates_to' ); if ( in_array( $meta_key, $fields ) ) { return true; } } return $is_update; }
- This reply was modified 5 years, 11 months ago by bigrat95.
Forum: Plugins
In reply to: [Price Based on Country for WooCommerce] Moneris Multi CurrencyAs this been fixed ?
Forum: Plugins
In reply to: [Price Based on Country for WooCommerce] Error Refreshing PriceSorry, I just realised i didn’t included the current price to display: Meta: _canada_price
Forum: Plugins
In reply to: [Price Based on Country for WooCommerce] Hide price on other countryOh, I just realised that if I don’t add a price in a specific country, the price will not be shown.
Is there a way that I can bulk add Asia, Africa and Europe together? I need to disable the prices in these continents.
Forum: Plugins
In reply to: [Fast Velocity Minify] How can I edit CSSGreat,
Thank you ??
Forum: Plugins
In reply to: [Price Based on Country for WooCommerce] PBC with Stripe currencyOk i see thank you
Forum: Plugins
In reply to: [WooCommerce] Woocmmerce order complete custom fieldYes, sorry this was the wrong code, but I changed it for what you mentionned and it doesent work. I still have to fill in the field, save the page, then I have to change the order to complete and resave the page.
// define the woocommerce_email_order_meta_fields callback function filter_woocommerce_email_order_meta_fields( $array, $sent_to_admin, $order ) { // make filter magic happen here... if (get_field('additional-info', $order->get_id())) { // Only show if field is filled ?> <h3>Additional Info: <?php the_field('additional-info', $order->get_id()); ?></h3> <?php } }; // add the filter add_filter( 'woocommerce_email_order_meta_fields', 'filter_woocommerce_email_order_meta_fields', 10, 3 );
Forum: Plugins
In reply to: [Fast Velocity Minify] Cachinggreat, thank you ??
Forum: Plugins
In reply to: [Fast Velocity Minify] CachingOk, how come FVM have a cache enabled ? Is this backend cache or front end cache ? I want only to use Wp engine cache on front end.
thank you.