Hi dsuinfo,
Glad to know you like the plugin.
In order to get help with a customization like your client wants please try to hire a developer.
Cheers,
Gabriel
Thanks for your reply but i have made it possible with the help of my friend.
Now i want to display Spread & Making charges on Product page with Purity and Gold Price.
It is possible any ready made query you have so i can put in function.php
Hi dsuinfo,
Good news that you were able to solve the requirements for your client.
I would not know about any ready made query for your custom solution.
Cheers,
Gabriel
By the way i have display purity, spread and making charges on product page. Now last remaining want to show Today’s gold price so can you let me know in which database value store or its matadata field name. Ex.
function display_custom_field_value(){
$value = get_post_meta( get_the_ID(), ‘gold_price_product_spread’, true);
if(strlen($value) != null && strlen($value) > 0) {
echo ‘<div class=”woocommerce-price”><b>Making Charges/gm :</b> (₹)’.number_format(get_post_meta( get_the_ID(), ‘gold_price_product_spread’, true ),2).'</br><b>Extra Fees : </b>(₹) ‘.number_format(get_post_meta( get_the_ID(), ‘gold_price_product_fee’, true ),2).'</br><b>Approx Weight : </b>(gm) ‘.number_format(get_post_meta( get_the_ID(), ‘_weight’, true ),2).'</br><b>Purity Level :</b> ‘.get_post_meta( get_the_ID(), ‘gold_price_karats’, true ).'</div>’;
}
}
add_action(‘woocommerce_single_product_summary’, ‘display_custom_field_value’, 22 );`
Used this code using snippet and working but now last issue is per product i want to show Today’s gold price for 22 & 24k hope you help for this. Thanks
Hi dsuinfo (@dsuinfo)
function display_custom_field_value(){
$value = get_post_meta( get_the_ID(), ‘gold_price_product_spread’, true);
if(strlen($value) != null && strlen($value) > 0) {
echo ‘<div class=”woocommerce-price”><b>Making Charges/gm :</b> (₹)’.number_format(get_post_meta( get_the_ID(), ‘gold_price_product_spread’, true ),2).'</br><b>Extra Fees : </b>(₹) ‘.number_format(get_post_meta( get_the_ID(), ‘gold_price_product_fee’, true ),2).'</br><b>Approx Weight : </b>(gm) ‘.number_format(get_post_meta( get_the_ID(), ‘_weight’, true ),2).'</br><b>Purity Level :</b> ‘.get_post_meta( get_the_ID(), ‘gold_price_karats’, true ).'</div>’;
}
}
add_action(‘woocommerce_single_product_summary’, ‘display_custom_field_value’, 22 );`
This code is not working with me can you check this screen shoot https://prnt.sc/13o9h3z
please guide me.
@sksubir hello this is not correct code. If @gabriel-reguly allow me to share code than i can post here.
Okay No problem
Please share me the code to my email ([email protected])
Thank you