Home › Forums › WoodMart support forum › Price of products in theme options
Price of products in theme options
- This topic has 5 replies, 2 voices, and was last updated 9 months, 2 weeks ago by
Aizaz Imtiaz Awan.
-
AuthorPosts
-
November 22, 2023 at 1:21 pm #514511
av_admin_1984ParticipantHi
1-I want to change the order of price and promotion price
the promotion price comes up and the original price withtag shows under the promotion price
Also, want to change the color of the theme2-Hide Price If Out of Stock
3-Show only the lowest prices in WooCommerce variable products
With php snippet and css I achieved that already, want to add this in theme options,
ThanksNovember 23, 2023 at 9:53 am #514781
Aizaz Imtiaz AwanKeymasterHello,
Please refer to the Woocommerce community on this issue as our support does not cover the Woocommerce customization.
03. Go to Theme Settings > Shop > Variable Product > disable the option show single variation and Hide variation parent.
Best Regards.
November 28, 2023 at 12:29 am #516104
av_admin_1984Participantfor number 1 I add this code
function changeorder_sale_price_html( $price, $product ) { if ( $product->is_on_sale() ) { $sale_price = wc_get_price_to_display( $product ); $regular_price = $product->get_regular_price(); $price = '<ins>' . wc_price( $sale_price ) . '</ins> <br> <del>' . wc_price( $regular_price ) . '</del>'; } return $price; } add_filter( 'woocommerce_get_price_html', 'changeorder_sale_price_html', 10, 2 );
it works fine for products are in promotion sell, but in product with single price, it’s hide that and only on hover show the price (product style: buttons on hover)
any help would be appreciatedNovember 28, 2023 at 3:39 pm #516363
Aizaz Imtiaz AwanKeymasterHello,
Sorry to say such modification requires complicated code customization which is not covered by our support.
Hope you can understand!
Best Regards.
November 28, 2023 at 4:05 pm #516388
av_admin_1984ParticipantI fixed that
function solde_sale_price_html( $price, $product ) { if ( $product->is_on_sale() ) { $sale_price = wc_get_price_to_display( $product ); $regular_price = $product->get_regular_price(); if ( $sale_price > 0 ) { $price = '<ins>' . wc_price( $sale_price ) . '</ins> <br> <del>' . wc_price( $regular_price ) . '</del>'; } } return $price; } add_filter( 'woocommerce_get_price_html', 'solde_sale_price_html', 10, 2 );
You are too slow in answering
November 28, 2023 at 4:47 pm #516449
Aizaz Imtiaz AwanKeymasterSounds Great! that your issue has been solved.
I’m so happy to hear you are pleased with the Theme and Support. XTEMOS strives to deliver the best customer experience, and it makes our day to hear we have accomplished that.
We count ourselves lucky to have you as a customer. You can always reach us at any time. We are always here to help you.
Thanks for contacting us.
Have a great day.Topic Closed.
Best Regards. -
AuthorPosts
- You must be logged in to create new topics. Login / Register