Strikeout Price
-
Hello everyone,
I need some help or guidance on a project with the link I provided. I’m looking to have a sale price and the regular price be visible should the product variation be on sale and for the regular price be strikeout (line through it). I am using WC Variations Radio Buttons plugin. Any help or direction is greatly appreciated.
Thanks,
Lonard
The page I need help with: [log in to see the link]
-
Hi @l_tilford,
Normally, on most themes, the sale price is shown and the regular price is struck out.
Just to check, when you disable the WC Variations Radio Buttons plugin, are the regular prices struck out with the sale prices displayed normally?
* If yes, then I would recommend getting assistance from the plugin authors (https://wordpress.org/support/plugin/wc-variations-radio-buttons/) or a developer to modify the price display. For assistance with custom code modifications, I recommend consulting with the WooCommerce Customizations Partners.
* In case disabling the WC Variations Radio Buttons plugin does not lead to the desired price display in your variations, could you please share a copy of your site’s System Status? You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”. Once you’ve done that, paste it here in your response.
Thanks.
Hi Abwaita,
Thank you for getting back with me. Let me go ahead and give you some additional information.
1. Disabling WC Variations Radio Plugin didn’t work but there is an asterisk.
2. I’m using a Flatsome child theme.
3. The strikeout price works on the cart page but I want it on the product page.
4. The system status report is posted at the end.As to the asterisk. After a lot of reading, I learned that there is code that can put the price of a variable product. I found the code in my client’s functions.php file. I’ll post the code here and then the system status report. Maybe there is something I can write in there to help?
In any event, I want to say thank you. I am very appreciative of the response and guidance.
// Add prices to variations function display_price_in_variation_option_name( $term ) { global $wpdb, $product; $result = $wpdb->get_col( "SELECT slug FROM {$wpdb->prefix}terms WHERE name = '$term'" ); $term_slug = ( !empty( $result ) ) ? $result[0] : $term; $query = "SELECT postmeta.post_id AS product_id FROM {$wpdb->prefix}postmeta AS postmeta LEFT JOIN {$wpdb->prefix}posts AS products ON ( products.ID = postmeta.post_id ) WHERE postmeta.meta_key LIKE 'attribute_%' AND postmeta.meta_value = '$term_slug' AND products.post_parent = $product->id"; $variation_id = $wpdb->get_col( $query ); $parent = wp_get_post_parent_id( $variation_id[0] ); if ( $parent > 0 ) { $_product = new WC_Product_Variation( $variation_id[0] ); return $term . woocommerce_price( $_product->get_price() ); } return $term; } add_filter( 'woocommerce_variation_option_name', 'display_price_in_variation_option_name' );the system status report
### WordPress Environment ### WordPress address (URL): https://www.staging28.aromaticscanada.ca Site address (URL): https://www.staging28.aromaticscanada.ca WC Version: 5.2.3 REST API Version: ✔ 5.2.3 WC Blocks Version: ✔ 4.7.2 Action Scheduler Version: ✔ 3.1.6 WC Admin Version: ✔ 2.1.5 Log Directory Writable: ✔ WP Version: 5.8.1 WP Multisite: – WP Memory Limit: 768 MB WP Debug Mode: – WP Cron: – Language: en_US External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.4.24 PHP Post Max Size: 256 MB PHP Time Limit: 120 PHP Max Input Vars: 3000 cURL Version: 7.66.0 OpenSSL/1.1.1l-fips SUHOSIN Installed: – MySQL Version: 5.7.32-35-log Max Upload Size: 256 MB Default Timezone is UTC: ✔ fsockopen/cURL: ✔ SoapClient: ✔ DOMDocument: ✔ GZip: ✔ Multibyte String: ✔ Remote Post: ✔ Remote Get: ✔ ### Database ### WC Database Version: 5.2.3 WC Database Prefix: wpbr_ Total Database Size: 200.46MB Database Data Size: 117.80MB Database Index Size: 82.66MB wpbr_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpbr_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpbr_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpbr_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wpbr_woocommerce_order_items: Data: 2.52MB + Index: 0.44MB + Engine InnoDB wpbr_woocommerce_order_itemmeta: Data: 11.52MB + Index: 12.03MB + Engine InnoDB wpbr_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB wpbr_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wpbr_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpbr_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB wpbr_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpbr_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpbr_woocommerce_payment_tokenmeta: Data: 0.08MB + Index: 0.06MB + Engine InnoDB wpbr_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpbr_actionscheduler_actions: Data: 0.17MB + Index: 0.14MB + Engine InnoDB wpbr_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpbr_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpbr_actionscheduler_logs: Data: 0.14MB + Index: 0.13MB + Engine InnoDB wpbr_ajaxsearchpro: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpbr_ajaxsearchpro_priorities: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpbr_ajaxsearchpro_statistics: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpbr_aryo_activity_log: Data: 0.47MB + Index: 0.00MB + Engine InnoDB wpbr_asp_index: Data: 6.52MB + Index: 9.03MB + Engine InnoDB wpbr_commentmeta: Data: 0.14MB + Index: 0.06MB + Engine InnoDB wpbr_comments: Data: 3.52MB + Index: 1.89MB + Engine InnoDB wpbr_defender_lockout: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpbr_defender_lockout_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpbr_gpi_page_blacklist: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpbr_gpi_page_reports: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpbr_gpi_page_stats: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpbr_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpbr_ms_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpbr_offline_giftcard: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpbr_options: Data: 29.56MB + Index: 2.88MB + Engine InnoDB wpbr_popover_ip_cache: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpbr_postmeta: Data: 30.56MB + Index: 37.13MB + Engine InnoDB wpbr_posts: Data: 12.52MB + Index: 3.72MB + Engine InnoDB wpbr_revslider_css: Data: 0.13MB + Index: 0.00MB + Engine InnoDB wpbr_revslider_layer_animations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpbr_revslider_navigations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpbr_revslider_sliders: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpbr_revslider_slides: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpbr_revslider_static_slides: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpbr_smush_dir_images: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpbr_snippets: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpbr_social_users: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpbr_stock_log: Data: 0.11MB + Index: 0.00MB + Engine InnoDB wpbr_termmeta: Data: 0.08MB + Index: 0.03MB + Engine InnoDB wpbr_terms: Data: 0.05MB + Index: 0.03MB + Engine InnoDB wpbr_term_relationships: Data: 0.48MB + Index: 0.39MB + Engine InnoDB wpbr_term_taxonomy: Data: 0.06MB + Index: 0.03MB + Engine InnoDB wpbr_usermeta: Data: 7.52MB + Index: 9.03MB + Engine InnoDB wpbr_users: Data: 1.52MB + Index: 0.52MB + Engine InnoDB wpbr_wc_admin_notes: Data: 0.06MB + Index: 0.00MB + Engine InnoDB wpbr_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpbr_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpbr_wc_customer_lookup: Data: 0.16MB + Index: 0.13MB + Engine InnoDB wpbr_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpbr_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpbr_wc_order_product_lookup: Data: 1.52MB + Index: 0.78MB + Engine InnoDB wpbr_wc_order_stats: Data: 0.19MB + Index: 0.20MB + Engine InnoDB wpbr_wc_order_tax_lookup: Data: 0.13MB + Index: 0.11MB + Engine InnoDB wpbr_wc_product_meta_lookup: Data: 1.52MB + Index: 0.94MB + Engine InnoDB wpbr_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpbr_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpbr_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpbr_woocommerce_shipping_table_rates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpbr_wpfm_backup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpbr_xyz_ips_short_code: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpbr_yith_wcwl: Data: 0.11MB + Index: 0.05MB + Engine InnoDB wpbr_yith_wcwl_lists: Data: 0.13MB + Index: 0.20MB + Engine InnoDB wpbr_yoast_indexable: Data: 3.52MB + Index: 1.70MB + Engine InnoDB wpbr_yoast_indexable_hierarchy: Data: 0.17MB + Index: 0.28MB + Engine InnoDB wpbr_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB wpbr_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB wpbr_yoast_seo_links: Data: 0.09MB + Index: 0.03MB + Engine InnoDB wpbr_yoast_seo_meta: Data: 0.09MB + Index: 0.00MB + Engine InnoDB wpbr_ywrr_email_blocklist: Data: 0.02MB + Index: 0.00MB + Engine InnoDB wpbr_ywrr_email_schedule: Data: 1.52MB + Index: 0.00MB + Engine InnoDB ### Post Type Counts ### acf: 1 attachment: 973 blocks: 8 custom_css: 2 giftcard: 20 inc_popup: 2 mc4wp-form: 1 nav_menu_item: 51 o-discount: 3 oembed_cache: 12 page: 29 post: 12 product: 793 product_variation: 4473 revision: 1441 shop_coupon: 64 shop_order: 2777 shop_order_refund: 113 sidebar: 27 slide_in: 1 wafs: 1 was: 4 wpb_wtm_tab: 4 wpcf7_contact_form: 4 yith-wcbm-badge: 14 yith-wccos-ostatus: 1 ### Security ### Secure connection (HTTPS): ✔ Hide errors from visitors: ✔ ### Active Plugins (60) ### PW Advanced Woo Reporting: by Proword – 5.8 Ajax Search Lite: by Ernest Marcinko – 4.9.4 Akismet Anti-Spam: by Automattic – 4.1.12 Booster Plus for WooCommerce: by Pluggabl LLC – 5.4.6 Woocommerce Category Discount: by Ugur CELIK – 1.9 Code Snippets: by Code Snippets Pro – 2.14.2 Contact Form 7: by Takayuki Miyoshi – 5.4.2 WC Currency Switcher: by wpexpertsio – 1.5.5 Custom Order Status for WooCommerce: by Tyche Softwares – 2.0.3 Definitely allow mobile zooming: by Kybernetik Services – 1.5.0 Disable Cart Fragments: by Optimocha – 2.0 Envato Market: by Envato – 2.0.6 Export Users to CSV: by Matt Cromwell – 1.1.1 FontPress: by Luca Montanari – 3.2 Header and Footer Scripts: by Digital Liberation – 2.2.1 CAOS: by Daan from FFW.Press – 4.1.6 HTTP/2 Server Push: by David Michael Ross – 1.4 Insert Headers and Footers: by WPBeginner – 1.6.0 Insert PHP Code Snippet: by xyzscripts.com – 1.3.2 MC4WP: Mailchimp for WordPress: by ibericode – 4.8.6 Max Mega Menu: by megamenu.com – 2.9.4 Minify HTML: by Tim Eckel – 2.00 Nextend Google Connect: by Roland Soos Jamie Bainbridge – 1.6.2 Notice Bar: by WEN Solutions – 2.0.8 PayBright Payment Gateway: by PayBright – 1.0.12 PHP Code Widget: by Otto – 2.3 PW Advanced Woo Reporting - Free Version: by Proword – 2.1 reCAPTCHA in WP comments form: by Joan Miquel Viadé – 9.1.2 Regenerate Thumbnails: by Alex Mills (Viper007Bond) – 3.1.5 SiteGround Optimizer: by SiteGround – 5.9.7 String Locator: by Clorith – 2.4.2 WooCommerce Bulk Edit Product Variations: by matterico_themes – 2.6 Advanced Order Export For WooCommerce: by AlgolPlus – 3.1.9 WooCommerce Advanced Free Shipping: by Jeroen Sormani – 1.1.4 WooCommerce Advanced Shipping: by Jeroen Sormani – 1.0.14 Conditional Discounts for WooCommerce by ORION: by ORION – 4.4.1 WooCommerce 'Email Money Transfer' Gateway: by Massoud Shakeri BlazingSpider – 2.3.3 WooCommerce PayPal Checkout Gateway: by WooCommerce – 2.1.2 (update to version 2.1.3 is available) WooCommerce Stripe Gateway: by WooCommerce – 5.5.0 WooCommerce Google Analytics Integration: by WooCommerce – 1.5.3 Invoices for WooCommerce: by Bas Elbers – 3.1.8 WooCommerce Price Based on Country (Basic): by Oscar Gare – 2.0.25 WooCommerce Canada Post Shipping: by WooCommerce – 2.5.23 (update to version 2.5.25 is available) WooCommerce UPS Shipping: by WooCommerce – 3.2.35 (update to version 3.2.36 is available) Stock Manager for WooCommerce: by StoreApps – 2.8.0 WooCommerce Table Rate Shipping: by WooCommerce – 3.0.30 (update to version 3.0.34 is available) WooCommerce: by Automattic – 5.2.3 (update to version 5.7.1 is available) Woocommerce eShipper Shipping Calculator: by Eshippers – 2.1.6 WooSidebars: by WooCommerce – 1.4.5 Yoast SEO: by Team Yoast – 17.1 WP Crontrol: by John Blackbourn & crontributors – 1.10.0 WP File Manager: by mndpsingh287 – 7.1.2 Smush: by WPMU DEV – 3.9.0 WPB WooCommerce Custom Tab Manager PRO: by wpbean – 1.09.5 ReCaptcha v2 for Contact Form 7: by IQComputing – 1.3.5 YITH WooCommerce Badge Management Premium: by YITHEMES – 1.3.0 YITH WooCommerce Bulk Product Editing Premium: by YITHEMES – 1.2.9 YITH WooCommerce Custom Order Status: by YITHEMES – 1.1.5 YITH WooCommerce Review Reminder: by YITH – 1.6.9 YITH WooCommerce Wishlist: by YITH – 3.1.0 ### Inactive Plugins (2) ### WC Variations Radio Buttons: by 8manos – 2.0.5 WOOCS - WooCommerce Currency Switcher: by realmag777 – 2.3.4.1 ### Settings ### API Enabled: ✔ Force SSL: ✔ Currency: CAD ($) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) gift-card (gift-card) grouped (grouped) simple (simple) variable (variable) wgm_gift_card (wgm_gift_card) Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog) exclude-from-search (exclude-from-search) featured (featured) outofstock (outofstock) rated-1 (rated-1) rated-2 (rated-2) rated-3 (rated-3) rated-4 (rated-4) rated-5 (rated-5) Connected to WooCommerce.com: ✔ ### WC Pages ### Shop base: #63 - /shop/ Cart: #62 - /cart/ Checkout: #61 - /checkout/ My account: #60 - /my-account/ Terms and conditions: #436 - /policies/terms-and-conditions-of-use/ ### Theme ### Name: Flatsome Child Version: 3.0 Author URL: Child Theme: ✔ Parent Theme Name: Flatsome Parent Theme Version: 3.13.3 Parent Theme Author URL: http://www.uxthemes.com/ WooCommerce Support: ✔ ### Templates ### Overrides: flatsome/woocommerce/archive-product.php flatsome/woocommerce/cart/cart-empty.php flatsome/woocommerce/cart/cart-shipping.php flatsome-child/woocommerce/cart/cart-totals.php flatsome/woocommerce/cart/cart.php flatsome-child/woocommerce/cart/proceed-to-checkout-button.php flatsome/woocommerce/checkout/form-checkout.php flatsome/woocommerce/checkout/form-coupon.php flatsome-child/woocommerce/checkout/payment-method.php flatsome-child/woocommerce/checkout/review-order.php version 3.3.0 is out of date. The core version is 5.2.0 flatsome/woocommerce/checkout/terms.php flatsome/woocommerce/checkout/thankyou.php flatsome/woocommerce/content-product-cat.php flatsome/woocommerce/content-product.php flatsome/woocommerce/content-single-product.php flatsome/woocommerce/content-widget-product.php flatsome/woocommerce/global/breadcrumb.php flatsome/woocommerce/global/quantity-input.php flatsome/woocommerce/global/wrapper-end.php flatsome/woocommerce/global/wrapper-start.php flatsome/woocommerce/loop/loop-end.php flatsome/woocommerce/loop/loop-start.php flatsome/woocommerce/loop/pagination.php flatsome/woocommerce/loop/result-count.php flatsome/woocommerce/loop/sale-flash.php flatsome/woocommerce/myaccount/form-login.php flatsome/woocommerce/myaccount/navigation.php flatsome/woocommerce/notices/error.php flatsome/woocommerce/notices/notice.php flatsome/woocommerce/notices/success.php flatsome/woocommerce/product-searchform.php flatsome-child/woocommerce/single-product/add-to-cart/variation-add-to-cart-button.php flatsome/woocommerce/single-product/photoswipe.php flatsome/woocommerce/single-product/price.php flatsome/woocommerce/single-product/product-image.php flatsome/woocommerce/single-product/product-thumbnails.php flatsome/woocommerce/single-product/rating.php flatsome/woocommerce/single-product/related.php flatsome/woocommerce/single-product/review.php flatsome/woocommerce/single-product/sale-flash.php flatsome/woocommerce/single-product/share.php flatsome/woocommerce/single-product/short-description.php flatsome/woocommerce/single-product/tabs/tabs.php flatsome/woocommerce/single-product/title.php flatsome/woocommerce/single-product/up-sells.php flatsome/woocommerce/single-product-reviews.php flatsome/woocommerce/single-product.php flatsome/woocommerce/content-product_cat.php Outdated Templates: ❌ Learn how to update ### Geolocation debug info ### Default customer location: geolocation MaxMind GeoIP database: ✔ MaxMind GeoIP license: ✔ MM_COUNTRY_CODE: ❌ GEOIP_COUNTRY_CODE: ❌ HTTP_CF_IPCOUNTRY: ❌ HTTP_X_COUNTRY_CODE: ❌ HTTP_X_REAL_IP: 73.102.199.95 HTTP_X_FORWARDED_FOR: ❌ REMOTE_ADDR: 73.102.199.95 Real external IP: 2601:801:4280:e100:e4c4:4bec:d3dc:2be3 WCPBC_USE_REMOTE_ADDR: – Geolocation Test: ✔ ### PBC Settings ### Version: 2.0.25 Base location: CA:ON Base currency: CAD Price Based On: billing Shipping: ✔ Test mode: – Test country: – Load products price in background: – Prices entered with tax: – Calculate tax based on: shipping Display prices in the shop: excl ### Zone Pricing United States ### zone_id: united-states name: United States countries: AF | AX | AL | DZ | AS | AD | AO | AI | AQ | AG | AR | AM | AW | AU | AT | AZ | BS | BH | BD | BB | BY | PW | BE | BZ | BJ | BM | BT | BO | BQ | BA | BW | BV | BR | IO | BN | BG | BF | BI | KH | CM | CV | KY | CF | TD | CL | CN | CX | CC | CO | KM | CG | CD | CK | CR | HR | CU | CW | CY | CZ | DK | DJ | DM | DO | EC | EG | SV | GQ | ER | EE | ET | FK | FO | FJ | FI | FR | GF | PF | TF | GA | GM | GE | DE | GH | GI | GR | GL | GD | GP | GU | GT | GG | GN | GW | GY | HT | HM | HN | HK | HU | IS | IN | ID | IR | IQ | IE | IM | IL | IT | CI | JM | JP | JE | JO | KZ | KE | KI | KW | KG | LA | LV | LB | LS | LR | LY | LI | LT | LU | MO | MG | MW | MY | MV | ML | MT | MH | MQ | MR | MU | YT | MX | FM | MD | MC | MN | ME | MS | MA | MZ | MM | NA | NR | NP | NL | NC | NZ | NI | NE | NU | NF | KP | MK | MP | NO | OM | PK | PS | PA | PG | PY | PE | PH | PN | PL | PT | PR | QA | RE | RO | RU | RW | ST | BL | SH | KN | LC | SX | MF | PM | VC | WS | SM | SA | SN | RS | SC | SL | SG | SK | SI | SB | SO | ZA | GS | KR | SS | ES | LK | SD | SR | SJ | SZ | SE | CH | SY | TW | TJ | TZ | TH | TL | TG | TK | TO | TT | TN | TR | TM | TC | TV | UG | UA | AE | GB | US | UM | UY | UZ | VU | VA | VE | VN | VG | VI | WF | EH | YE | ZM | ZW currency: USD exchange_rate: 0.78 auto_exchange_rate: no disable_tax_adjustment: no ### Action Scheduler ### Complete: 425 Oldest: 2021-08-23 15:46:25 +0000 Newest: 2021-10-07 21:37:31 +0000 ### Status report information ### Generated at: 2021-10-07 23:51:43 -05:00Hi @l_tilford,
The strikeout price works on the cart page but I want it on the product page.
The strikeout price is expected to work both on the product page and the shop page.
Sample images:
- Shop page: https://d.pr/i/RPWFxI
- Product page: https://d.pr/i/eaY1Id
If this is not your case, I recommend running a conflict test to find out why, it could be caused by the active theme or another plugin.
Here’s how to:
– https://docs.woocommerce.com/document/how-to-test-for-conflicts/
I hope this helps.
Hi @l_tilford,
We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.
The topic ‘Strikeout Price’ is closed to new replies.